Change the branching model (#827)

* Update workflows and add requirements-dev.txt
* Remove codecov from dev requirements
* Update readme and contributing guide
* Update PR template
This commit is contained in:
Veronica Berglyd Olsen
2021-07-13 15:34:10 +02:00
committed by GitHub
parent 6890b278ea
commit fb5347b8e4
8 changed files with 45 additions and 59 deletions
+15 -34
View File
@@ -7,35 +7,16 @@ request directly.
## Branching Structure
There are three protected branches on this repository. They are used in the following way:
* `main` This is the Stable branch. It is used for releases and subsequent patches. No
development code should be merged into this branch starting from version 1.0.
* `dev` This is the Unstable (development) branch. It is where new features are merged, and where
pre-releases are taken from.
* `testing` This is the Testing branch. It is populated from the `dev` branch for pre-releases
that need a longer testing phase.
Stable releases and patches will be tagged in the `main` branch, pre-releases may be tagged from
either `testing` or `dev` branch.
### What Branch to Use for Contributions
* If your contribution is a fix for the latest stable release, branch from the `main` branch.
* If your contribution is a new feature, branch from the `dev` branch.
* The `testing` branch is used infrequently. It is only used for pre-releases when new code is
being developed that is not a part of the current testing release.
The current status of each branch is described in a pinned issue titled
"[Development Flow & Status](https://github.com/vkbo/novelWriter/issues/707)".
Please do not make your changes on a branch with the same name as any of the above mentioned
branches. You should make a unique and descriptive branch name in your fork for your changes.
This project mainly follows the OneFlow branching structure. The `main` branch is the default
branch. If your contribution is a bugfix for a specific version, please make a bugfix branch from
the tag you want the fix to be applied to. For other changes, make a feature branch from the
current `main` branch.
## Pull Request Process
1. Make sure your code passes all tests and conforms to the style guide. You can check that the
code conforms by running `flake8` from the root of the project folder.
code conforms by running `flake8` from the root of the project folder. The same check is also
run on pull requests by the maintainer.
2. Please provide a complete description of the changes in the pull request, and a summary that can
be copied into the [CHANGELOG](CHANGELOG.md). Remember to reference any issue related by
providing the issue number.
@@ -70,7 +51,7 @@ lines should wrap at 79 characters, not 99. If wrapping can be avoided by going
generally preferrable.
For text files, the text should also be wrapped at 99 character. The exception is markdown image
tags and urls.
tags and urls which can run past that limit.
Please do not submit pull requests that re-wrap existing source or text unless this has been
discussed beforehand.
@@ -84,22 +65,22 @@ The `setup.cfg` file in the root of this project has the following settings for
matches the coding standard:
```conf
[flake8]
ignore = E203,E221,E226,E228,E241,E251
ignore = E221,E226,E228,E241
max-line-length = 99
exclude = docs/*
```
The command line equivalent, with reporting, is:
```bash
flake8 . --count --ignore E203,E221,E226,E228,E241,E251 --max-line-length=99 --show-source --statistics
flake8 . --count --ignore E221,E226,E228,E241 --max-line-length=99 --show-source --statistics
```
Passing this check is required before contributions are merged into the `main`, `testing` or `dev`
branches. This is checked automatically when you make a pull request. You can run the `flake8`
command locally to check beforehand. The full command will give you a detailed description of the
code lines that do not conform to the standard.
Passing this check is required before contributions are merged into the `main` branch. This is
checked automatically when you make a pull request. You can run the `flake8` command locally to
check beforehand. The full command will give you a detailed description of the code lines that do
not conform to the standard.
## Ignored Errors
### Ignored Errors
Some `flake8` error codes are ignored for this project for various reasons. The source also uses
camelCase function and variable names. This is the standard for the Qt libraries novelWriter
@@ -108,7 +89,7 @@ integrates with. It also happens to be the author's personal preferences. (Yay!)
The reason behind the other ignored error codes are listed below. Two of them are due to PEP8 not
permitting column alignment as opposed to many other coding styles, like for instance for Go. I
find them useful in regions of bulk value assignments. There's a reason why tables are more
readable than lists. They should be used sparingly though.
readable than lists. They should be used sparingly though. If you're unsure, follow PEP8.
The ignored errors are all `pycodestyle` errors, and they are documented
[here](https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes).