-
Notifications
You must be signed in to change notification settings - Fork 12
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 #278 from Living-with-machines/pre-commit
Add pre-commit
- Loading branch information
Showing
85 changed files
with
2,900 additions
and
2,413 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
### Summary | ||
|
||
Describe the problem you're trying to fix in this pull request. | ||
Describe the problem you're trying to fix in this pull request. | ||
Please reference any related issue and use fixes/close to automatically close them, if pertinent. For example: "Fixes #58", or "Addresses (but does not close) #238". --> | ||
|
||
Fixes #<NUM> | ||
|
||
### Describe your changes | ||
|
||
Describe changes/updates you have made to the code. | ||
|
||
### Checklist before assigning a reviewer (update as needed) | ||
|
||
- [ ] Self-review code | ||
- [ ] Ensure submission passes current tests | ||
- [ ] Add tests | ||
|
||
### Reviewer checklist | ||
|
||
Please add anything you want reviewers to specifically focus/comment on. | ||
|
||
- [ ] Everything looks ok? |
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 |
---|---|---|
|
@@ -41,4 +41,4 @@ jobs: | |
- name: Test with pytest | ||
run: | | ||
python -m pytest ./tests | ||
python -m pytest ./tests |
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 |
---|---|---|
|
@@ -44,4 +44,4 @@ jobs: | |
- name: Test with pytest | ||
run: | | ||
python -m pytest ./tests | ||
python -m pytest ./tests |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
|
||
build_conda: | ||
|
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,36 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: "v4.4.0" | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: name-tests-test | ||
args: ["--pytest-test-first"] | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: "23.9.1" | ||
hooks: | ||
- id: black-jupyter | ||
language_version: python3.8 | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.0.290" | ||
hooks: | ||
- id: ruff | ||
args: ["--fix", "--show-fixes"] | ||
|
||
exclude: | | ||
(?x)^( | ||
conda/.*| | ||
worked_examples/.*| | ||
.*/__init__.py| | ||
tests/test_import.py | ||
)$ |
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ python: | |
- requirements: docs/requirements.txt | ||
- method: pip | ||
path: . | ||
|
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,20 @@ | ||
select = [ | ||
"E", "F", "W", # flake8 | ||
"B", # flake8-bugbear | ||
"I", # isort | ||
"UP" # pyupgrade | ||
# "N", # pep8 naming | ||
] | ||
ignore = [ | ||
"E501", # Line too long | ||
"E722", # Do not use bare 'except' | ||
"B904", # Within an 'except' clause ... | ||
] | ||
unfixable = [ | ||
"F841", # Removes unused variables | ||
] | ||
flake8-unused-arguments.ignore-variadic-names = true | ||
isort.required-imports = ["from __future__ import annotations"] | ||
|
||
# Assume Python 3.8 | ||
target-version = "py38" |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
sphinx_rtd_theme | ||
myst-parser | ||
sphinx-autoapi | ||
sphinx-copybutton | ||
nbsphinx | ||
pandoc | ||
sphinx-autoapi | ||
sphinx-copybutton | ||
sphinx-togglebutton | ||
sphinx_rtd_theme | ||
sphinxcontrib-napoleon | ||
sphinx-togglebutton |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
Code of Conduct and Inclusivity | ||
================================ | ||
|
||
We are currently in the process of developing a Code of Conduct. | ||
We are currently in the process of developing a Code of Conduct. | ||
In the meantime, we look to the `Code of Conduct <https://github.com/alan-turing-institute/the-turing-way/blob/main/CODE_OF_CONDUCT.md>`_ from The Turing Way as a model. | ||
|
||
We aim to be inclusive of people from all walks of life and all research fields. | ||
We aim to be inclusive of people from all walks of life and all research fields. | ||
These intentions must be reflected in the contributions that we make. | ||
|
||
We therefore encourage intentional, inclusive actions from contributors to MapReader. | ||
We therefore encourage intentional, inclusive actions from contributors to MapReader. | ||
Here are a few examples of such actions: | ||
|
||
- Use respectful, gender-neutral and inclusive language. | ||
- Aim to include perspectives of researchers from different research backgrounds such as science, humanities and social sciences by not limiting the scope to only scientific domains. | ||
- Make sure that color palettes used throughout figures are accessible to color-blind readers and contributors. | ||
- Make sure that color palettes used throughout figures are accessible to color-blind readers and contributors. |
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
Oops, something went wrong.