mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 14:51:43 +00:00
chore: contributing guide update
This commit is contained in:
@ -236,16 +236,50 @@ The projects also uses typing checks (provided by `mypy`) and some linter checks
|
||||
tox
|
||||
```
|
||||
|
||||
Must be usually done before any pushes.
|
||||
|
||||
### Generate documentation templates
|
||||
|
||||
```shell
|
||||
tox -e docs
|
||||
```
|
||||
|
||||
Must be usually done if there are changes in modules structure.
|
||||
|
||||
### Create release
|
||||
|
||||
```shell
|
||||
tox -m release -- x.y.z
|
||||
tox -m release -- major.minor.patch
|
||||
```
|
||||
|
||||
The command above will generate documentation, tags, etc., and will push them to GitHub. Other things will be handled by GitHub workflows automatically.
|
||||
|
||||
### Hotfixes policy
|
||||
|
||||
Sometimes it is required to publish hotfix with specific commits, but some features have been already committed, which should not be included to the hotfix. In this case, some manual steps are required:
|
||||
|
||||
1. Create new branch from the last stable release (`major.minor.patch`):
|
||||
|
||||
```shell
|
||||
git checkout -b release/major.minor major.minor.patch
|
||||
```
|
||||
|
||||
2. Cherry-pick desired commit(s):
|
||||
|
||||
```shell
|
||||
git cherry-pick <commit-sha>
|
||||
```
|
||||
|
||||
Alternatively, make changes to the new branch and commit them.
|
||||
|
||||
3. Push newly created branch to remote:
|
||||
|
||||
```shell
|
||||
git push --set-upstream origin release/major.minor
|
||||
```
|
||||
|
||||
4. Proceed to release as usual:
|
||||
|
||||
```shell
|
||||
tox -m release -- major.minor.patch+1
|
||||
```
|
||||
|
4
tox.ini
4
tox.ini
@ -27,8 +27,6 @@ description = Run common checks like linter, mypy, etc
|
||||
deps =
|
||||
{[tox]dependencies}
|
||||
-e .[check]
|
||||
allowlist_externals =
|
||||
bash
|
||||
setenv =
|
||||
MYPYPATH=src
|
||||
commands =
|
||||
@ -36,7 +34,7 @@ commands =
|
||||
pylint --rcfile=.pylintrc "src/{[tox]project_name}"
|
||||
bandit -c .bandit.yml -r "src/{[tox]project_name}"
|
||||
bandit -c .bandit-test.yml -r "tests/{[tox]project_name}"
|
||||
bash -c 'mypy {[mypy]flags} -p "{[tox]project_name}" --install-types --non-interactive || mypy {[mypy]flags} -p "{[tox]project_name}"'
|
||||
mypy {[mypy]flags} -p "{[tox]project_name}" --install-types --non-interactive
|
||||
|
||||
[testenv:docs]
|
||||
description = Generate source files for documentation
|
||||
|
Reference in New Issue
Block a user