Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-sim reset can't seem to work #30

Closed
zadigus opened this issue Jan 27, 2023 · 2 comments
Closed

git-sim reset can't seem to work #30

zadigus opened this issue Jan 27, 2023 · 2 comments

Comments

@zadigus
Copy link

zadigus commented Jan 27, 2023

I wanted to give git-sim a go, because it seems interesting. I therefore installed it on my windows machine, like this:

choco install manimce
pip install git-sim

I have python 3.10. Now, I wanted to quickly check if it works and in one of my repositories, I ran

git-sim reset -h

which tells me that the reset works like this:

git-sim reset [-h] [--mode MODE] [--soft] [--mixed] [--hard] [commit]

So essentially all options are optional, i.e. I should be able to run git-sim reset, which I did, with the following result:

$ git-sim reset
Simulating: git reset HEAD
Traceback (most recent call last):
  File "C:\Users\lmichel\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\lmichel\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\lmichel\AppData\Local\Programs\Python\Python310\Scripts\git-sim.exe\__main__.py", line 7, in <module>
  File "C:\Users\lmichel\AppData\Local\Programs\Python\Python310\lib\site-packages\git_sim\__main__.py", line 89, in main
    scene.render()
  File "C:\tools\Manim\Lib\site-packages\manim\scene\scene.py", line 223, in render
    self.construct()
  File "C:\Users\lmichel\AppData\Local\Programs\Python\Python310\lib\site-packages\git_sim\git_sim.py", line 56, in construct
    self.command.execute()
  File "C:\Users\lmichel\AppData\Local\Programs\Python\Python310\lib\site-packages\git_sim\git_sim_reset.py", line 41, in execute
    self.parse_commits(self.commits[self.i])
  File "C:\Users\lmichel\AppData\Local\Programs\Python\Python310\lib\site-packages\git_sim\git_sim_base_command.py", line 77, in parse_commits
    commitId, circle, arrow, hide_refs = self.draw_commit(commit, prevCircle, shift, dots)
  File "C:\Users\lmichel\AppData\Local\Programs\Python\Python310\lib\site-packages\git_sim\git_sim_base_command.py", line 173, in draw_commit
    commitId, commitMessage, commit, hide_refs = self.build_commit_id_and_message(commit, dots)
TypeError: GitSimReset.build_commit_id_and_message() takes 2 positional arguments but 3 were given

Sounds crazy, not sure I will continue to git-sim if I get such an issue after the first command. I also tried git-sim tag. That one seems fine.

@initialcommit-io
Copy link
Contributor

Hi @zadigus,

Thanks for reporting this! It's actually a bug that I accidentally introduced yesterday when fixing something else, but I fixed it now and released git-sim version 0.1.6.

Please update your git-sim version to the latest by running pip install git-sim --upgrade, which should get you the new version 0.1.6.

Sorry about the bug and let me know if it works now! Also, keep in mind this is a new project so I know there are other issues that will come up in general. I'm working with some new contributors to try and address these while also adding new features to the tool.

Please be patient with us we'd love to keep you as a git-sim user :D. If you notice any other issues please let me know. and we'll get it fixed as soon as possible.

@zadigus
Copy link
Author

zadigus commented Jan 27, 2023

Thanks for the quick-fix. I will continue to play with it then!

The big issue I see with your repository is that it completely lacks tests. I am not sure, but I can imagine that you could be able to integration test you application with some kind of snapshot testing. Indeed, you generate some output in some format that you should be able to easily snapshot test. That would be a simple way to prevent regressions in your code.

@zadigus zadigus closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants