-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3430 from GeotrekCE/improve_quality
Improve quality check and contributing guide
- Loading branch information
Showing
24 changed files
with
333 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
function dockercompose { | ||
# use docker-compose then fallback to new docker compose | ||
docker-compose "$@" | ||
docker compose "$@" | ||
} | ||
|
||
echo "Check dependency graph and fix requirements" | ||
|
||
dockercompose run -T --rm web bash -c "pip-compile -q && pip-compile requirements-dev.in" | ||
|
||
|
||
|
||
echo "run Flake8..." | ||
|
||
dockercompose run -T --rm web flake8 geotrek | ||
status=$? | ||
|
||
if test $status -eq 1 | ||
then | ||
exit $status | ||
else | ||
echo "Flake8 check is ok..." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,4 @@ jobs: | |
run: | | ||
cd docs/ | ||
pip install -r ./requirements.txt | ||
make html | ||
make html SPHINXOPTS="-W" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
============ | ||
Contributing | ||
============ | ||
|
||
Conventions | ||
----------- | ||
|
||
* Before contributing, open an issue and discuss about it with community (is it a bug or a feature ? What is the best way to achieve my goal ?) | ||
* Use flake8 | ||
* KISS & DRY as much as possible | ||
* Elegant and generic is good, simple is better | ||
* Separate bug fixes and new features in several pull requests. | ||
* Open a new Pull Request in "Draft" status until tests passed. Use at least 'bug', 'improvement' or 'feature' label. | ||
* Commits messages are explicit and mention issue number (``(ref #12)`` or ``(fixes #23)``) | ||
* Features are developed in a branch and merged from Github pull-requests. | ||
|
||
|
||
Definition of done | ||
------------------ | ||
|
||
* ``docs/changelog.rst`` is up-to-date | ||
* An explicit unit-test covers the bugfix or the new feature. | ||
* A frontend test (:path:jstests/nav-\*.js) covers the navigation bug fix or feature | ||
* A JS *Mocha* test (:path:jstests/tests.\*.js) covers the JavaScript bug fix or feature | ||
* Unit-tests total coverage is above or at least equal with previous commits. Patch coverage is 100% on new lines. | ||
* Settings have default value in ``settings/base.py`` | ||
* Installation instructions and documentation are up-to-date | ||
|
||
Check TODO in the source tree: | ||
|
||
:: | ||
|
||
find geotrek | xargs egrep -n -i '(TODO|XXX|temporary|FIXME)' | ||
|
||
|
||
Release | ||
------- | ||
|
||
On master branch: | ||
|
||
* If need be, merge ``translations`` branch managed with https://weblate.makina-corpus.net | ||
* Update files *VERSION*, *docs/conf.py* and *docs/changelog.rst* to remove ``+dev`` suffix and increment version (please use semver rules) | ||
* Run ``dch -r -D RELEASED``, update version in the same way and save | ||
* Commit with message 'Release x.y.z' to merge in ``master`` branch before release | ||
* Add git tag X.Y.Z | ||
* Update files *VERSION*, *docs/conf.py* and *docs/changelog.rst* to add ``+dev`` suffix | ||
* Run ``dch -v <version>+dev --no-force-save-on-release`` and save | ||
* Commit with message 'Back to development' | ||
* Push branch and tag | ||
* Add release on Github (copy-paste ``doc/changelog.rst`` paragraph) | ||
* When creating a new release 'x.y.z' on github, Github actions will generate the .deb package file, and publish it on https://packages.geotrek.fr (see ``.circleci/config.yml`` file for details) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.