Comments (9)
Ah yes, well the reason is that so far I have only implemented the bare bones $ git-sim stash
command which only accepts filename arguments to add to the stash. Currently sub-sub commands like pop
and apply
are not implemented, but I'll work on it and update this ticket when deployed!
from git-sim.
@abhijitnathwani I am not sure if you saw it in the discussion of #43, HERE are the docs for nested subcommands in Typer :)
from git-sim.
Hi @initialcommit-io
I was working on this issue and made some progress. I was thinking to add support for push
, pop
, and apply
subcommands for stash as others such as list
, patch
will be difficult to represent in the current schema of 3 columns. So git-sim stash
and git-sim stash push
will be effectively the same.
For pop
and apply
I was thinking to mark data from staging
to working
dir. However, to differentiate between pop
(which does delete the stash entry after getting POPed) and apply
(which does not delete the stash entry), could have strikethrough
effect on the file name for pop
which indicates those changes will no longer be available in the stash and for apply
we could leave it as is.
Proposed apply
subcommand sim:
Let me know your thoughts on it.
Also, do you know how to apply the strikethrough
effect on Manim text objects? I believe we need to switch to MarkUpText
but even then, I couldn't find how to apply the effect after populating the names dictionary that we have. I have 0 idea about Manim and any pointers here are appreciated!
from git-sim.
@abhijitnathwani Thanks a lot for this and great work on it so far. Good points about only using subcommands that make sense in a 3-column layout for now.
Also I like your idea for the strikethough for commands that delete the stashed entry. I just did some testing in Manim and was able to get the strikethrough to work like this:
m.MarkupText(
"<span strikethrough='true' strikethrough_color='"
+ self.fontColor
+ "'>"
+ self.trim_path(f)
+ "</span>",
font="Monospace",
font_size=24,
color=self.fontColor,
)
The text objects are currently created in the setup_and_draw_zones()
method in GitSimBaseCommand
. I see 2 options for integrating this:
-
Add a keyword argument like
strikethrough=False
to that method, where you can pass in one or more column indexes to strike through. -
Separate the text object creation starting on line 617 into a new method like "createZoneText()" that can be overridden in command subclasses like
GitSimStash
to implement the strikethrough there.
I'll leave that decision up to you, if you think one option works better than the other.
from git-sim.
@abhijitnathwani FYI I worked with @paketb0te to do some pretty significant refactoring to switch from argparse to Typer. Just wanted to give you a heads up since I know you already started on this.
from git-sim.
@initialcommit-io yeah, I saw the PR getting merged into the main branch. I was following the discussion on the Typer. I thought I'd finish this PR before that :D
Anyway, I'll go through the required changes for parsing the arguments using Typer and implement accordingly. Thanks for the heads up!
from git-sim.
@abhijitnathwani Thanks for this and for accommodating the big changes...
from git-sim.
Hi @initialcommit-io ,
Sorry for the delay in completing this. I am done with the feature development. I had one quick question for you. I am not sure how do we want to handle the files list in stash pop
or stash apply
? Generally, files are not a part of the git stash subcommand as it accepts the stash entry to be applied. I was thinking to add a print if the user adds files as the argument to apply/pop and simulate it on all the changed files in the working directory.
Proposed approach:
PS D:\git-sim> git-sim stash pop git_sim/stash.py
Files are not required in apply/pop subcommand. Ignoring the file list.....
Simulating: git stash pop git_sim/stash.py
Output image location: D:\foss_contribution\git-sim\git-sim_media\images\git-sim-stash_02-15-23_21-42-48.jpg
PS D:\git-sim> git-sim stash pop
Simulating: git stash pop
Output image location: D:\foss_contribution\git-sim\git-sim_media\images\git-sim-stash_02-15-23_21-43-01.jpg
from git-sim.
@abhijitnathwani Sure I think that sounds good. One thing to note, I added a --stdout
option that writes the image data directly to standard output, so in the case that is set we need to suppress all printed output so it doesn't interfere with the raw image data.
Feel free to submit the PR when ready and I'll take a look.
from git-sim.
Related Issues (20)
- Error in Dockerfile during 'apt update' HOT 3
- git-sim not recognized as command in M1 Apple HOT 3
- Clarify license HOT 5
- TypeError: can only concatenate str (not "ManimColor") to str HOT 4
- Thank you! HOT 1
- Request: Make CHENGELOG.md HOT 1
- Font size is wrong HOT 5
- Cannot run git-sim to generate only images HOT 6
- Error on simple actions HOT 7
- Auto-completion is extremely slow HOT 6
- git submodule not support HOT 2
- Add -v, --version flag to display program version info HOT 2
- Implement PEP 621 (pyproject.toml) and migrate to "src" layout HOT 14
- Support gif animations HOT 1
- Extremely slow on larger repos HOT 9
- Arrow direction HOT 2
- AttributeError: module 'manim' has no attribute 'ArrowTriangleFilledTip' HOT 7
- Two branches without common commit? git-annex use case HOT 14
- --animate log in chronological order of the commits HOT 9
- Refine test suite HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-sim.