Skip to content

Commit

Permalink
CI: Use URLs in pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
ajhynes7 committed Dec 29, 2022
1 parent ff67bb6 commit b30d1d6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 57 deletions.
40 changes: 13 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,30 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder_python_imports
name: reorder-python-imports
entry: reorder-python-imports
language: system
types: [python]
- id: reorder-python-imports
exclude: ^examples/
args: [--application-directories, ".:src"]
- repo: local
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
name: black
language: system
entry: black
types: [python]
- repo: local
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
hooks:
- id: add_trailing_comma
name: add-trailing-comma
entry: add-trailing-comma
language: system
types: [python]
- repo: local
- id: add-trailing-comma
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
name: flake8
entry: flake8
language: system
types: [python]
- repo: local
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
name: pydocstyle
entry: pydocstyle
language: system
types: [python]
exclude: tests|examples|conf.py
additional_dependencies: ["toml"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.2
hooks:
Expand Down
21 changes: 0 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,13 @@ matplotlib = "^3"
importlib-metadata = { version = "~1", python = "<3.8" }


[tool.poetry.group.pre_commit.dependencies]
add-trailing-comma = "^2.3.0"
black = "^22.10.0"
flake8 = "^5.0.4"
flake8-blind-except = "^0.2.1"
flake8-bugbear = "^22.9.23"
flake8-builtins = "^2.0.0"
flake8-comprehensions = "^3.10.0"
flake8-eradicate = "^1.4.0"
flake8-pytest-style = "^1.6.0"
flake8-rst-docstrings = "^0.2.7"
flake8-unused-arguments = "^0.0.11"
pre-commit = "^2.20.0"
pydocstyle = "^6.1.1"
reorder-python-imports = "^3.8.5"
toml = "^0.10.2"

[tool.poetry.group.base_test.dependencies]
pytest = "^7.1.3"
pytest-cov = "^4.0.0"

[tool.poetry.group.property_test.dependencies]
hypothesis = "^6.56.2"

[tool.poetry.group.pre_commit]
optional = true

[tool.poetry.group.base_test]
optional = true

Expand All @@ -84,7 +64,6 @@ build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
skip-string-normalization = true
include = '\.pyi?$'

[tool.pydocstyle]
convention = 'numpy'
Expand Down
13 changes: 4 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,14 @@ unused-arguments-ignore-dunder = true

[gh-actions]
python =
3.7: pre-commit, readme, doctests, unit
3.8: pre-commit, readme, doctests, unit
3.9: pre-commit, readme, doctests, unit
3.10: pre-commit, readme, doctests, unit
3.7: readme, doctests, unit
3.8: readme, doctests, unit
3.9: readme, doctests, unit
3.10: readme, doctests, unit

[testenv]
allowlist_externals = poetry

[testenv:pre-commit]
commands =
poetry install --with pre_commit
poetry run pre-commit run --all-files

[testenv:readme]
commands =
poetry run python -m doctest README.rst
Expand Down

0 comments on commit b30d1d6

Please sign in to comment.