|
4 | 4 |
|
5 | 5 | # Contributing |
6 | 6 |
|
7 | | -## Development environment |
| 7 | +As an open source project, libvcs accepts contributions through GitHub. Below you will find |
| 8 | +resources on the internals of the project. |
8 | 9 |
|
9 | | -[poetry] is a required package to develop. |
10 | | - |
11 | | -``` |
12 | | -git clone https://github.com/vcs-python/libvcs.git |
13 | | -cd libvcs |
14 | | -poetry install -E "docs test coverage lint format" |
15 | | -``` |
16 | | - |
17 | | -Makefile commands prefixed with `watch_` will watch files and rerun. |
18 | | - |
19 | | -## Tests |
20 | | - |
21 | | -``` |
22 | | -poetry run py.test |
| 10 | +```{toctree} |
| 11 | +workflow |
| 12 | +internals |
23 | 13 | ``` |
24 | | - |
25 | | -Helpers: `make test` Rerun tests on file change: `make watch_test` (requires [entr(1)]) |
26 | | - |
27 | | -## Documentation |
28 | | - |
29 | | -Default preview server: http://localhost:8068 |
30 | | - |
31 | | -[sphinx-autobuild] will automatically build the docs, watch for file changes and launch a server. |
32 | | - |
33 | | -From home directory: `make start_docs` From inside `docs/`: `make start` |
34 | | - |
35 | | -[sphinx-autobuild]: https://github.com/executablebooks/sphinx-autobuild |
36 | | - |
37 | | -### Manual documentation (the hard way) |
38 | | - |
39 | | -`cd docs/` and `make html` to build. `make serve` to start http server. |
40 | | - |
41 | | -Helpers: `make build_docs`, `make serve_docs` |
42 | | - |
43 | | -Rebuild docs on file change: `make watch_docs` (requires [entr(1)]) |
44 | | - |
45 | | -Rebuild docs and run server via one terminal: `make dev_docs` (requires above, and a `make(1)` with |
46 | | -`-J` support, e.g. GNU Make) |
47 | | - |
48 | | -## Formatting / Linting |
49 | | - |
50 | | -The project uses [black] and [isort] (one after the other) and runs [flake8] via CI. See the |
51 | | -configuration in `pyproject.toml` and `setup.cfg`: |
52 | | - |
53 | | -`make black isort`: Run `black` first, then `isort` to handle import nuances `make flake8`, to watch |
54 | | -(requires `entr(1)`): `make watch_flake8` |
55 | | - |
56 | | -## Releasing |
57 | | - |
58 | | -As of 0.10, [poetry] handles virtualenv creation, package requirements, versioning, building, and |
59 | | -publishing. Therefore there is no setup.py or requirements files. |
60 | | - |
61 | | -Update `__version__` in `__about__.py` and `pyproject.toml`:: |
62 | | - |
63 | | - git commit -m 'build(libvcs): Tag v0.1.1' |
64 | | - git tag v0.1.1 |
65 | | - git push |
66 | | - git push --tags |
67 | | - poetry build |
68 | | - poetry publish |
69 | | - |
70 | | -[poetry]: https://python-poetry.org/ |
71 | | -[entr(1)]: http://eradman.com/entrproject/ |
72 | | -[black]: https://github.com/psf/black |
73 | | -[isort]: https://pypi.org/project/isort/ |
74 | | -[flake8]: https://flake8.pycqa.org/ |
0 commit comments