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
This commit is contained in:
Alexander Hess 2020-08-10 16:51:02 +02:00
commit ac5804174d
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
3 changed files with 108 additions and 9 deletions

View file

@ -10,6 +10,12 @@ repos:
language: system
stages: [commit]
types: [python]
- id: local-fix-branch-references
name: Adjust the branch references
entry: poetry run nox -s fix-branch-references --
language: system
stages: [commit]
types: [text]
- id: local-pre-merge-checks
name: Run the entire test suite
entry: poetry run nox -s pre-merge --