Debian Codegraph @

docs/development/workflow.md

raw symbols SCIP
1 # Workflow
2
3 This page describes the tooling used during development of this project. It also
4 serves as a reference for the various commands that you would use when working
5 on this project.
6
7 ## Overview
8
9 This project uses the [GitHub Flow] for collaboration. The codebase is Python.
10
11 - [flit] is used for automating development tasks.
12 - [nox] is used for automating development tasks.
13 - [pre-commit] is used for running the linters.
14 - [sphinx] is used for generating this documentation.
15 - [pytest] is used for running the automated tests.
16
17 ## Repository Layout
18
19 The repository layout is pretty standard for a modern pure-Python project.
20
21 - `CODE_OF_CONDUCT.md`
22 - `LICENSE`
23 - `README.md`
24 - `.nox/` -- Generated by [nox].
25 - `dist/` -- Generated as part of the release process.
26 - `docs/` -- Sources for the documentation.
27 - `src/`
28 - `installer/` -- Actual source code for the package
29 - `tests/` -- Automated tests for the package.
30 - `noxfile.py` -- for [nox].
31 - `pyproject.toml` -- for packaging and tooling configuration.
32
33 ## Initial Setup
34
35 To work on this project, you need to have git 2.17+ and Python 3.8+.
36
37 - Clone this project using git:
38
39 ```sh
40 git clone https://github.com/pypa/installer.git
41 cd installer
42 ```
43
44 - Install the project's main development dependencies:
45
46 ```sh
47 pip install nox
48 ```
49
50 You're all set for working on this project.
51
52 ## Commands
53
54 ### Code Linting
55
56 ```sh
57 nox -s lint
58 ```
59
60 Run the linters, as configured with [pre-commit].
61
62 ### Testing
63
64 ```sh
65 nox -s test
66 ```
67
68 Run the tests against all supported Python versions, if an interpreter for that
69 version is available locally.
70
71 ```sh
72 nox -s test-3.14
73 ```
74
75 Run the tests against Python 3.14. It is also possible to specify other supported
76 Python versions (like `3.12` or `pypy3`).
77
78 ### Documentation
79
80 ```sh
81 nox -s docs
82 ```
83
84 Generate the documentation for installer into the `build/docs` folder. This
85 (mostly) does the same thing as `nox -s docs-live`, except it invokes
86 `sphinx-build` instead of [sphinx-autobuild].
87
88 ```sh
89 nox -s docs-live
90 ```
91
92 Serve this project's documentation locally, using [sphinx-autobuild]. This will
93 open the generated documentation page in your browser.
94
95 The server also watches for changes made to the documentation (`docs/`), which
96 will trigger a rebuild. Once the build is completed, server will automagically
97 reload any open pages using livereload.
98
99 ## Release process
100
101 - Update the changelog.
102 - Update the version number in `__init__.py`.
103 - Commit these changes.
104 - Create a signed git tag.
105 - Run `flit publish`.
106 - Update the version number in `__init__.py`.
107 - Commit these changes.
108 - Push tag and commits.
109
110 [github flow]: https://guides.github.com/introduction/flow/
111 [flit]: https://flit.readthedocs.io/en/stable/
112 [nox]: https://nox.readthedocs.io/en/stable/
113 [pytest]: https://docs.pytest.org/en/stable/
114 [sphinx]: https://www.sphinx-doc.org/en/master/
115 [sphinx-autobuild]: https://github.com/executablebooks/sphinx-autobuild
116 [pre-commit]: https://pre-commit.com/