From 806a21cb50fcd813d2cb6ba34ed9d50f3a9a3c25 Mon Sep 17 00:00:00 2001 From: Jacob Stopak Date: Sun, 19 Feb 2023 00:27:50 -0800 Subject: [PATCH 1/2] Add git-dummy dependency, entry point, and readme instructions Signed-off-by: Jacob Stopak --- README.md | 16 ++++++++++++++++ setup.py | 2 ++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 13a7833..1482ecd 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ Example: `$ git-sim merge ` - Save visualizations as a part of your team documentation to document workflow and prevent recurring issues - Create static Git diagrams (jpg) or dynamic animated videos (mp4) to speed up content creation - Help visual learners understand how Git commands work +- Combine with bundled command [git-dummy](https://github.com/initialcommit-com/git-dummy) to generate a dummy Git repo and then simulate operations on it ## Features - Run a one-liner git-sim command in the terminal to generate a custom Git command visualization (.jpg) from your repo @@ -29,6 +30,7 @@ Example: `$ git-sim merge ` - Generate an animated video (.mp4) instead of a static image using the `--animate` flag (note: significant performance slowdown, it is recommended to use `--low-quality` to speed up testing and remove when ready to generate presentation-quality video) - Choose between dark mode (default) and light mode - Specify output formats of either jpg, png, mp4, or webm +- Combine with bundled command [git-dummy](https://github.com/initialcommit-com/git-dummy) to generate a dummy Git repo and then simulate operations on it - Animation only: Add custom branded intro/outro sequences if desired - Animation only: Speed up or slow down animation speed as desired @@ -61,6 +63,20 @@ $ cd path/to/git/repo $ git-sim [global options] [subcommand options] ``` +Optional: If you don't have an existing Git repo to simulate commands on, use the bundled [git-dummy](https://github.com/initialcommit-com/git-dummy) command to generate a dummy Git repo with the desired number of branches and commits to simulate operations on with git-sim: + +```console +$ git-dummy --name="dummy-repo" --branches=3 --commits=10 +$ cd dummy-repo +$ git-sim [global options] [subcommand options] +``` + +Or if you want to do it all in a single command: + +```console +$ git-dummy --no-subdir --branches=3 --commits=10 && git-sim [global options] [subcommand options] +``` + 5) Simulated output will be created as a `.jpg` file. Output files are named using the subcommand executed combined with a timestamp, and by default are stored in a subdirectory called `git-sim_media/`. The location of this subdirectory is customizable using the command line flag `--media-dir=path/to/output`. Note that when the `--animate` global flag is used, render times will be much longer and a `.mp4` video output file will be produced. 6) For convenience, environment variables can be set for any global command-line option available in git-sim. All environment variables start with `git_sim_` followed by the name of the option. diff --git a/setup.py b/setup.py index b8bf7ac..9f306d5 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ "opencv-python-headless", "typer", "pydantic", + "git-dummy", ], keywords="git sim simulation simulate git-simulate git-simulation git-sim manim animation gitanimation image video dryrun dry-run", project_urls={ @@ -34,6 +35,7 @@ entry_points={ "console_scripts": [ "git-sim=git_sim.__main__:app", + "git-dummy=git_dummy.__main__:app", ], }, include_package_data=True, From 77652fac564d36e3b15c77bae626dde51f8abce1 Mon Sep 17 00:00:00 2001 From: Jacob Stopak Date: Sun, 19 Feb 2023 00:28:10 -0800 Subject: [PATCH 2/2] Bump version to 0.2.5 Signed-off-by: Jacob Stopak --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9f306d5..ce18cf9 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="git-sim", - version="0.2.4", + version="0.2.5", author="Jacob Stopak", author_email="jacob@initialcommit.io", description="Simulate Git commands on your own repos by generating an image (default) or video visualization depicting the command's behavior.",