Skip to content

Commit ec599fd

Browse files
authored
Migrate to src/ layout and replace setup.py with pyproject.toml (#97)
Migrate to src/ layout and replace setup.py with pyproject.toml (#97) Signed-off-by: Manuel Stausberg <m.stausberg@pm.me> Signed-off-by: Jacob Stopak <jacob@initialcommit.io>
1 parent 0995601 commit ec599fd

33 files changed

+65
-45
lines changed

CONTRIBUTING.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,19 @@ $ pip uninstall git-sim
5151

5252
```console
5353
$ cd path/to/git-sim
54-
$ python -m pip install -e .
54+
$ python -m pip install -e .[dev]
5555
```
5656

57+
> Explanation: `python -m pip` uses the `pip` module of the currently active python interpreter.
58+
>
59+
> `install -e .[dev]` is the command that `pip` executes, where
60+
>
61+
> `-e` means to make it an [editable install](https://setuptools.pypa.io/en/latest/userguide/development_mode.html),
62+
>
63+
> the dot `.` refers to the current directory,
64+
>
65+
> and `[dev]` tells pip to install the "`dev`" [Extras](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-extras) (which are defined in the `project.optional-dependencies` section of [`pyproject.toml`](./pyproject.toml)).
66+
5767
This will install sources from your cloned repo such that you can edit the source and the changes are reflected instantly.
5868

5969
If you already have the dependencies, you can ignore those using the `--no-deps` flag:

pyproject.toml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "git-sim"
7+
authors = [{ name = "Jacob Stopak", email = "jacob@initialcommit.io" }]
8+
description = "Simulate Git commands on your own repos by generating an image (default) or video visualization depicting the command's behavior."
9+
readme = "README.md"
10+
requires-python = ">=3.7"
11+
keywords = [
12+
"git",
13+
"sim",
14+
"simulation",
15+
"simulate",
16+
"git-simulate",
17+
"git-simulation",
18+
"git-sim",
19+
"manim",
20+
"animation",
21+
"gitanimation",
22+
"image",
23+
"video",
24+
"dryrun",
25+
"dry-run",
26+
]
27+
license = { text = "MIT License" }
28+
classifiers = [
29+
"Programming Language :: Python :: 3",
30+
"License :: OSI Approved :: MIT License",
31+
"Operating System :: OS Independent",
32+
]
33+
dependencies = [
34+
"git-dummy",
35+
"gitpython",
36+
"manim",
37+
"opencv-python-headless",
38+
"pydantic_settings",
39+
"typer",
40+
]
41+
dynamic = ["version"]
42+
43+
[tool.setuptools.dynamic]
44+
version = { attr = "git_sim.__version__" }
45+
46+
[project.optional-dependencies]
47+
dev = ["black", "numpy", "pillow", "pytest"]
48+
49+
[project.scripts]
50+
git-sim = "git_sim.__main__:app"
51+
52+
[project.urls]
53+
Homepage = "https://initialcommit.com/tools/git-sim"
54+
Source = "https://github.com/initialcommit-com/git-sim"

setup.py

-44
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)