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
+3 -2
View File
@@ -2,18 +2,19 @@
Please check the following before you make a pull request: Please check the following before you make a pull request:
* The branch you are making the pull request from (in your own fork) has a unique and descriptive * The branch you are making the pull request from (in your own fork) has a unique and descriptive
name. Do not make a pull request directly from your copy of `main`, `dev` or `testing`. name. Do not make a pull request directly from your copy of `main`.
* If you are submitting translation files, only submit the files that you have added translations * If you are submitting translation files, only submit the files that you have added translations
to, not the other .ts files that may have been updated in the process. to, not the other .ts files that may have been updated in the process.
* Make sure your contribution follows the style guide and other requirements mentioned in the * Make sure your contribution follows the style guide and other requirements mentioned in the
CONTRIBUTING.md file in the repository. CONTRIBUTING.md file in the repository.
* Fill in the Summary section below, and if relevant, mention the issue numbers related to the PR.
--> -->
**Summary:** **Summary:**
**Related Issue(s):** **Related Issue(s):**
**Checklist:** **Reviewer's Checklist:**
* [ ] The header of all files contain a reference to the repository license * [ ] The header of all files contain a reference to the repository license
* [ ] The overall test coverage is increased or remains the same as before * [ ] The overall test coverage is increased or remains the same as before
+4 -2
View File
@@ -2,9 +2,11 @@ name: flake8
on: on:
push: push:
branches: [ main, testing, dev ] branches:
- main
pull_request: pull_request:
branches: [ main, testing, dev ] branches:
- main
jobs: jobs:
checkSyntax: checkSyntax:
+6 -7
View File
@@ -2,9 +2,11 @@ name: Linux
on: on:
push: push:
branches: [ main, testing, dev ] branches:
- main
pull_request: pull_request:
branches: [ main, testing, dev ] branches:
- main
jobs: jobs:
testLinux: testLinux:
@@ -21,17 +23,14 @@ jobs:
- name: Install Packages (apt) - name: Install Packages (apt)
run: | run: |
sudo apt update sudo apt update
sudo apt install libenchant-dev qt5-default qttools5-dev-tools sudo apt install libenchant-dev qttools5-dev-tools
- name: Checkout Source - name: Checkout Source
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install Dependencies (pip) - name: Install Dependencies (pip)
run: | run: |
pip install --upgrade pip pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
pip install pytest-timeout pip install -r requirements-dev.txt
pip install pytest-cov
pip install pytest-qt
pip install codecov
- name: Run Build Commands - name: Run Build Commands
run: python setup.py qtlrelease sample run: python setup.py qtlrelease sample
- name: Run Tests - name: Run Tests
+5 -6
View File
@@ -2,9 +2,11 @@ name: macOS
on: on:
push: push:
branches: [ main, testing, dev ] branches:
- main
pull_request: pull_request:
branches: [ main, testing, dev ] branches:
- main
jobs: jobs:
testMac: testMac:
@@ -24,11 +26,8 @@ jobs:
run: | run: |
pip install --upgrade pip pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install pyobjc pip install pyobjc
pip install pytest-timeout
pip install pytest-cov
pip install pytest-qt
pip install codecov
- name: Run Tests - name: Run Tests
run: | run: |
export QT_QPA_PLATFORM=offscreen export QT_QPA_PLATFORM=offscreen
+5 -6
View File
@@ -2,9 +2,11 @@ name: Windows
on: on:
push: push:
branches: [ main, testing, dev ] branches:
- main
pull_request: pull_request:
branches: [ main, testing, dev ] branches:
- main
jobs: jobs:
testWin: testWin:
@@ -21,10 +23,7 @@ jobs:
run: | run: |
pip install --upgrade pip pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
pip install pytest-timeout pip install -r requirements-dev.txt
pip install pytest-cov
pip install pytest-qt
pip install codecov
- name: Run Tests - name: Run Tests
run: | run: |
pytest -v --cov=nw --timeout=60 pytest -v --cov=nw --timeout=60
+15 -34
View File
@@ -7,35 +7,16 @@ request directly.
## Branching Structure ## Branching Structure
There are three protected branches on this repository. They are used in the following way: 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
* `main` This is the Stable branch. It is used for releases and subsequent patches. No the tag you want the fix to be applied to. For other changes, make a feature branch from the
development code should be merged into this branch starting from version 1.0. current `main` branch.
* `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.
## Pull Request Process ## Pull Request Process
1. Make sure your code passes all tests and conforms to the style guide. You can check that the 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 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 be copied into the [CHANGELOG](CHANGELOG.md). Remember to reference any issue related by
providing the issue number. 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. generally preferrable.
For text files, the text should also be wrapped at 99 character. The exception is markdown image 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 Please do not submit pull requests that re-wrap existing source or text unless this has been
discussed beforehand. 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: matches the coding standard:
```conf ```conf
[flake8] [flake8]
ignore = E203,E221,E226,E228,E241,E251 ignore = E221,E226,E228,E241
max-line-length = 99 max-line-length = 99
exclude = docs/* exclude = docs/*
``` ```
The command line equivalent, with reporting, is: The command line equivalent, with reporting, is:
```bash ```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` Passing this check is required before contributions are merged into the `main` branch. This is
branches. This is checked automatically when you make a pull request. You can run the `flake8` checked automatically when you make a pull request. You can run the `flake8` command locally to
command locally to check beforehand. The full command will give you a detailed description of the check beforehand. The full command will give you a detailed description of the code lines that do
code lines that do not conform to the standard. 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 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 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 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 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 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 The ignored errors are all `pycodestyle` errors, and they are documented
[here](https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes). [here](https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes).
+3 -2
View File
@@ -32,8 +32,9 @@ met. It is regularly tested on Debian and Ubuntu Linux, Windows, and macOS.
## Project Contributions ## Project Contributions
The project isn't taking feature contributions at the moment. If you have an idea, please make a Please don't make feature pull requests without first having discussed them with the maintainer.
feature request in the issue tracker. Fixes and patches are welcome. So are new translations. You can make a feature request in the issue tracker, or if the idea isn't fully formed, start a
discussion on the discussion page. Fixes and patches are welcome. So are new translations.
Contributions related to packaging and installing novelWriter will also be appreciated. Contributions related to packaging and installing novelWriter will also be appreciated.
If you want to help translating novelWriter into another language, please see the If you want to help translating novelWriter into another language, please see the
+4
View File
@@ -0,0 +1,4 @@
pytest>=4.0.0
pytest-timeout
pytest-cov
pytest-qt