-
Notifications
You must be signed in to change notification settings - Fork 14
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 #119 from ax3l/pre-commit-setup
Install pre-commit
- Loading branch information
Showing
99 changed files
with
2,691 additions
and
2,048 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,136 @@ | ||
# To use: | ||
# | ||
# pre-commit run -a | ||
# | ||
# Or: | ||
# | ||
# pre-commit install # (runs every time you commit in git) | ||
# | ||
# To update this file: | ||
# | ||
# pre-commit autoupdate | ||
# | ||
# See https://pre-commit.com for more information | ||
|
||
# Do not check/format anything from third party directories | ||
#exclude: '^share/openPMD/thirdParty' | ||
|
||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
args: [--allow-multiple-documents] | ||
- id: check-added-large-files | ||
args: ['--maxkb=40'] | ||
- id: requirements-txt-fixer | ||
# - id: fix-encoding-pragma | ||
# exclude: ^noxfile.py$ | ||
|
||
# documentation files: .rst | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: rst-backticks | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
|
||
#- repo: https://github.com/asottile/pyupgrade | ||
# rev: v2.29.0 | ||
# hooks: | ||
# - id: pyupgrade | ||
|
||
# Changes tabs to spaces | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.5.4 | ||
hooks: | ||
- id: remove-tabs | ||
|
||
# CMake formatting | ||
#- repo: https://github.com/cheshirekow/cmake-format-precommit | ||
# rev: v0.6.13 | ||
# hooks: | ||
# - id: cmake-format | ||
# additional_dependencies: [pyyaml] | ||
# types: [file] | ||
# files: (\.cmake|CMakeLists.txt)(.in)?$ | ||
|
||
# Autoremoves unused Python imports | ||
- repo: https://github.com/hadialqattan/pycln | ||
rev: v2.2.2 | ||
hooks: | ||
- id: pycln | ||
name: pycln (python) | ||
|
||
# Sorts Python imports according to PEP8 | ||
# https://www.python.org/dev/peps/pep-0008/#imports | ||
#- repo: https://github.com/pycqa/isort | ||
# rev: 5.12.0 | ||
# hooks: | ||
# - id: isort | ||
# name: isort (python) | ||
|
||
# Python: Flake8 (checks only, does this support auto-fixes?) | ||
#- repo: https://github.com/PyCQA/flake8 | ||
# rev: 4.0.1 | ||
# hooks: | ||
# - id: flake8 | ||
# additional_dependencies: &flake8_dependencies | ||
# - flake8-bugbear | ||
# - pep8-naming | ||
# exclude: ^(docs/.*|tools/.*)$ | ||
# Alternatively: use autopep8? | ||
|
||
# Docstring formatting according to numpy style | ||
- repo: https://github.com/pycqa/pydocstyle | ||
rev: 6.3.0 | ||
hooks: | ||
- id: pydocstyle | ||
additional_dependencies: | ||
- tomli | ||
exclude: | | ||
(?x)( | ||
^examples/multitask_lpa_fbpic_waket/custom_*| | ||
^setup.py| | ||
^doc/source/conf.py | ||
) | ||
# Python Formatting | ||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 # Keep in sync with blacken-docs | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.16.0 | ||
hooks: | ||
- id: blacken-docs | ||
args: [--line-length=80] | ||
additional_dependencies: | ||
- black==23.9.1 # keep in sync with black hook | ||
# TODO: black-jupyter | ||
|
||
# Jupyter Notebooks: clean up all cell outputs | ||
# - repo: https://github.com/roy-ht/pre-commit-jupyter | ||
# rev: v1.2.1 | ||
# hooks: | ||
# - id: jupyter-notebook-cleanup | ||
# args: | ||
# - --pin-patterns | ||
# - "[pin];[donotremove]" | ||
# # - --remove-kernel-metadata | ||
|
||
# Checks the manifest for missing files (native support) | ||
- repo: https://github.com/mgedmin/check-manifest | ||
rev: "0.49" | ||
hooks: | ||
- id: check-manifest | ||
# This is a slow hook, so only run this if --hook-stage manual is passed | ||
stages: [manual] | ||
additional_dependencies: [cmake, ninja] |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
ax-platform >= 0.2.9 | ||
libensemble >= 0.9.2 | ||
matplotlib | ||
numpydoc | ||
pydata-sphinx-theme | ||
sphinx-design | ||
sphinx-gallery | ||
numpydoc | ||
matplotlib | ||
libensemble >= 0.9.2 | ||
ax-platform >= 0.2.9 |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. auto{{ objtype }}:: {{ objname }} | ||
.. auto{{ objtype }}:: {{ objname }} |
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 |
---|---|---|
|
@@ -31,4 +31,4 @@ | |
{% endif %} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} | ||
{% endblock %} |
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
Oops, something went wrong.