You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand instructions for contributions and releases (#69)
And use absolute links everywhere.
This is because the page is viewable on both GitHub and on the website.
Also the Python-Markdown parsing of link references is partly faulty, so avoid its quirks.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+63-26Lines changed: 63 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ The ProperDocs project welcomes contributions from developers and
6
6
users in the open source community. Contributions can be made in a number of
7
7
ways, a few examples are:
8
8
9
-
- Code patches via pull requests
10
-
- Documentation improvements
11
-
- Bug reports and patch reviews
9
+
* Code patches via pull requests
10
+
* Documentation improvements
11
+
* Bug reports and patch reviews
12
12
13
13
For information about available communication channels please refer to the
14
14
[README](https://github.com/properdocs/properdocs#readme) file in our
@@ -52,7 +52,7 @@ Note that for development you can just use [Hatch] directly as described below.
52
52
53
53
The main tool that is used for development is [Hatch]. It manages dependencies (in a virtualenv that is created on the fly) and is also the command runner.
54
54
55
-
So first, [install it][install Hatch]. Ideally in an isolated way with **`pipx install hatch`** (after [installing `pipx`]), or just `pip install hatch` as a more well-known way.
55
+
So first, [install it](https://hatch.pypa.io/latest/install/#pip). Ideally in an isolated way with **`pipx install hatch`** (after [installing `pipx`](https://pypa.github.io/pipx/installation/)), or just `pip install hatch` as a more well-known way.
56
56
57
57
## Running all checks
58
58
@@ -64,7 +64,7 @@ hatch run all
64
64
65
65
**This will encompass all of the checks mentioned below.**
66
66
67
-
All checks need to pass.
67
+
All checks need to pass. If you make a pull request, [GitHub Actions] will also validate that all checks are passing.
68
68
69
69
### Running tests
70
70
@@ -75,21 +75,19 @@ hatch run test:test
75
75
hatch run integration:test
76
76
```
77
77
78
-
It will attempt to run the tests against all of the Python versions we
79
-
support. So don't be concerned if you are missing some. The rest
80
-
will be verified by [GitHub Actions] when you submit a pull request.
78
+
It will attempt to run the tests against all of the Python versions we support.
81
79
82
80
### Python code style
83
81
84
-
Python code within ProperDocs' code base is formatted using [Black] and [Isort] and lint-checked using [Ruff], all of which are configured in `pyproject.toml`.
82
+
Python code within ProperDocs' code base is formatted using [Ruff](https://docs.astral.sh/ruff/), and all style settings are configured near the bottom of [`pyproject.toml`](https://github.com/ProperDocs/properdocs/blob/master/pyproject.toml).
85
83
86
84
You can automatically check and format the code according to these tools with the following command:
87
85
88
86
```bash
89
87
hatch run style:fix
90
88
```
91
89
92
-
The code is also type-checked using [mypy] - also configured in `pyproject.toml`, it can be run like this:
90
+
The code is also type-checked using [mypy](https://mypy-lang.org/) - also configured in [`pyproject.toml`](https://github.com/ProperDocs/properdocs/blob/master/pyproject.toml), it can be run like this:
93
91
94
92
```bash
95
93
hatch run types:check
@@ -111,22 +109,29 @@ After making edits to files under the `docs/` dir, you can preview the site loca
111
109
hatch run docs:serve
112
110
```
113
111
114
-
Note that any 'WARNING' should be resolved before submitting a contribution.
112
+
Note that any 'WARNING' should be resolved before submitting a contribution. This is also validated by GitHub Actions.
115
113
116
114
Documentation files are also checked by markdownlint, so you should run this as well:
117
115
118
116
```bash
119
117
hatch run lint:check
120
118
```
121
119
122
-
If you add a new plugin to properdocs.yml, you don't need to add it to any "requirements" file, because that is managed automatically.
120
+
If you add a new plugin to properdocs.yml, you don't need to add it to any "requirements" file, because that is managed automatically via [hatch-properdocs](https://github.com/ProperDocs/hatch-properdocs).
123
121
124
-
> INFO: If you don't want to use Hatch, for documentation you can install requirements into a virtualenv, in one of these ways (with `.venv` being the virtualenv directory):
122
+
> INFO: If you don't want to use Hatch, for documentation you can install requirements into a virtualenv, in **one of** these ways (with `.venv` being the virtualenv directory):
125
123
>
126
-
> ```bash
127
-
> .venv/bin/pip install -r requirements/requirements-docs.txt # Exact versions of dependencies.
128
-
> .venv/bin/pip install -r $(properdocs get-deps)# Latest versions of all dependencies.
@@ -144,7 +149,7 @@ most likely need to have tests and documentation if it is a new feature.
144
149
When working with a pull request branch:
145
150
Unless otherwise agreed, prefer `commit` over `amend`, and `merge` over `rebase`. Avoid force-pushes, otherwise review history is much harder to navigate. For the end result, the "unclean" history is fine because most pull requests are squash-merged on GitHub.
146
151
147
-
Do *not* add to *release-notes.md*, this will be written later.
152
+
Do *not* add to [`release-notes.md`](https://github.com/ProperDocs/properdocs/blob/master/docs/about/release-notes.md), this will be written later.
148
153
149
154
### Submitting changes to the builtin themes
150
155
@@ -177,20 +182,52 @@ Contributors are not expected to provide translations with their changes to
177
182
a theme's templates. However, they are expected to include an updated `pot`
178
183
file so that everything is ready for translators to do their job.
179
184
185
+
### Merging policy
186
+
187
+
Pull requests should be merged as squash-merge. If a commit description is missing, try to incorporate it from the PR description.
188
+
189
+
Alternatively, pull requests can be merged as a merge commit, if the PR consists of many clean separate commits.
190
+
191
+
## Cutting a release
192
+
193
+
Note: First see additional important information in [`packages/README.md`](https://github.com/ProperDocs/properdocs/blob/master/packages/README.md).
194
+
195
+
In order to make a release of ProperDocs, do the following:
196
+
197
+
* Create a pull request that bumps the version in all [`__init__.py`](https://github.com/ProperDocs/properdocs/blob/master/properdocs/__init__.py) files **and** writes down all user-visible changes since the previous version in [`release-notes.md`](https://github.com/ProperDocs/properdocs/blob/master/docs/about/release-notes.md).
198
+
199
+
* Changes specific to themes (if any) need separate headings, because they will go into separate releases. Search for `Version 1.6.7` as an example of this.
200
+
201
+
* After squash-merging that pull request, create a tag that exactly corresponds to that version number and push it:
202
+
203
+
```bash
204
+
git tag v1.22.333
205
+
git push origin v1.22.333
206
+
```
207
+
208
+
* GitHub Actions will automatically produce a PyPI release for the main package.
209
+
210
+
But subpackages need to be released manually, if there were any changes to them. See [`packages/README.md`](https://github.com/ProperDocs/properdocs/blob/master/packages/README.md).
211
+
212
+
* Finally, make a release post at [GitHub releases](https://github.com/ProperDocs/properdocs/releases) - "Draft a new release".
213
+
214
+
Select the latest tag, don't enter any title, and copy the release notes into the description.
215
+
216
+
### Versioning policy
217
+
218
+
The specific version number in [`__init__.py`](https://github.com/ProperDocs/properdocs/blob/master/properdocs/__init__.py) consists of 3 components in sequence:
219
+
220
+
* Major - permanently at 1
221
+
* Minor - bump for new features and possibly minor breaking changes (breaking changes only if they aren't expected to affect anyone OR there have been sufficient warnings in previous versions.)
222
+
* Patch - bump forbugfixes and (rarely) reverts of somethingin the current minor release.
223
+
180
224
## Code of Conduct
181
225
182
226
Everyone interacting in the ProperDocs project's codebases, issue trackers, chat
183
-
rooms, and mailing lists is expected to follow the [PyPA Code of Conduct].
227
+
rooms, and mailing lists is expected to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
0 commit comments