Skip to content

Commit 9827748

Browse files
committed
docs(contributing): Add internals and workflow
1 parent 31dc12f commit 9827748

File tree

3 files changed

+97
-66
lines changed

3 files changed

+97
-66
lines changed

docs/contributing/index.md

Lines changed: 5 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4,71 +4,10 @@
44

55
# Contributing
66

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.
89

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
2313
```
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/

docs/contributing/internals.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
(internals)=
2+
3+
# Internals
4+
5+
:::{warning}
6+
7+
Internal APIs can break at any time and are not covered by semantic versioning or any other
8+
stability policy.
9+
10+
:::
11+
12+
```{eval-rst}
13+
.. autoapimodule:: libvcs.exc
14+
:members:
15+
```
16+
17+
```{eval-rst}
18+
.. autoapimodule:: libvcs.types
19+
:members:
20+
```

docs/contributing/workflow.md

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

0 commit comments

Comments
 (0)