Commit graph

4 commits

Author SHA1 Message Date
db119ea776
Adjust the branch reference fixer's logic
- change references to temporary branches (e.g., "release-*" and
  "publish") to point to the 'main' branch
- add --branch=BRANCH_NAME option to the nox session so that
  one can pass in a target branch to make all references point to
- run "fix-branch-references" as the first pre-commit hook
  as it fails the fastest
- bug fix: allow dots in branch references (e.g., "release-0.1.0")
2020-09-30 12:16:00 +02:00
4ee5a50fc6
Simplify the pre-commit hooks
- run "format" and "lint" separately
  => remove the nox session "pre-commit"
- execute the entire "test-suite" before merges
  + rename "pre-merge" into "test-suite"
  + do not "format" and "lint" here any more
  + do not execute this before pushes
    * allow branches with <100% test coverage to exist on GitHub
      (they cannot be merged into 'main' until 100% coverage)
    * GitHub Actions executes the test suite
2020-08-11 10:41:43 +02:00
ac5804174d
Add a branch reference fixer as a pre-commit hook
- many *.py and *.ipynb files will contain links to resources on
  GitHub or nbviewer that have branch references in them
- add a pre-commit hook implemented as the nox session
  "fix-branch-references" that goes through these files and
  changes all the branch labels to the current one
2020-08-11 10:35:18 +02:00
da233e2e35
Set up pre-commit hooks
- add pre-commit and pre-merge hooks:
  + run `poetry run nox -s pre-commit` on staged *.py files
  + run common pre-commit hooks for validations that could not be
    achieved with tools in the develop environment so easily
  + run `poetry run nox -s pre-merge` before merges and pushes
- implement the "pre-commit" and "pre-merge" sessions in nox
  + include a little hack to deal with the positional arguments
    passed by the pre-commit framework
- provide more documentation on the nox sessions
2020-08-04 17:58:35 +02:00