Skip to content

Commit

Permalink
Merge pull request #13 from Ouranosinc/fast-forward
Browse files Browse the repository at this point in the history
Fast-forward cookiecutter
  • Loading branch information
Zeitsperre authored Aug 21, 2024
2 parents 90a6a62 + 977b410 commit 283a315
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/Ouranosinc/cookiecutter-pypackage",
"commit": "51f9b8dff09101af573c710ad9d30e43d87b7e02",
"commit": "fb24d9af1a97700633333a8c8246b3e504e865f7",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/first-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ jobs:
It appears that this is your first Pull Request. To give credit where it's due, we ask that you add your information to the \`AUTHORS.rst\` and \`.zenodo.json\`:
- [ ] The relevant author information has been added to \`AUTHORS.rst\` and \`.zenodo.json\`.
Please make sure you've read our [contributing guide](CONTRIBUTING.rst). We look forward to reviewing your Pull Request shortly ✨`
Please make sure you've read our [contributing guide](https://github.com/Ouranosinc/xsdba/blob/main/CONTRIBUTING.rst). We look forward to reviewing your Pull Request shortly ✨`
})
21 changes: 8 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- tox-env: "py38-coveralls"
python-version: "3.8"
- tox-env: "py39-coveralls"
python-version: "3.9"
- tox-env: "py310-coveralls"
python-version: "3.10"
- tox-env: "py311-coveralls"
python-version: "3.11"
- tox-env: "py312-coveralls"
python-version: "3.12"
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
Expand All @@ -80,10 +75,10 @@ jobs:
python -m pip install --require-hashes -r CI/requirements_ci.txt
- name: Test with tox
run: |
python -m tox -e ${{ matrix.tox-env }}
python -m tox
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-${{ matrix.tox-env }}
COVERALLS_FLAG_NAME: run-${{ matrix.python-version }}
COVERALLS_PARALLEL: true
COVERALLS_SERVICE_NAME: github

Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
- id: python-use-type-annotations
- id: rst-inline-touching-normal
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
exclude: ^docs/
Expand All @@ -42,7 +42,7 @@ repos:
- id: isort
exclude: ^docs/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.5.7
hooks:
- id: ruff
args: [ '--fix' ]
Expand All @@ -64,7 +64,7 @@ repos:
- id: yamllint
args: [ '--config-file=.yamllint.yaml' ]
- repo: https://github.com/numpy/numpydoc
rev: v1.8.0rc2
rev: v1.8.0
hooks:
- id: numpydoc-validation
exclude: ^docs/|^tests/
Expand Down
7 changes: 4 additions & 3 deletions CI/requirements_ci.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bump-my-version==0.24.3
bump-my-version==0.25.1
coveralls==4.0.1
pip==24.2
pip==24.2.0
flit==3.9.0
tox==4.16.0
tox==4.17.1
tox-gh==1.3.2
18 changes: 12 additions & 6 deletions CI/requirements_ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ bracex==2.4 \
--hash=sha256:a27eaf1df42cf561fed58b7a8f3fdf129d1ea16a81e1fadd1d17989bc6384beb \
--hash=sha256:efdc71eff95eaff5e0f8cfebe7d01adf2c8637c8c92edaf63ef348c241a82418
# via wcmatch
bump-my-version==0.24.3 \
--hash=sha256:9b8ac82458a703a968a9a438b460175494cc0e0c6bd5f316019945a6b66eb81f \
--hash=sha256:cdd86e158430dd5e5e25fc61703c140a1107579fdd8d74f8f3a5f991daa07168
bump-my-version==0.25.1 \
--hash=sha256:d5e72b1a88db4cc808009fd4f03c3b3ab5c06db7bf1501e4f8387eb50c352589 \
--hash=sha256:f9a2723999be5c4416c854ad4a7f950491644944dff82a91634f8a45d1da81ac
# via -r CI/requirements_ci.in
cachetools==5.4.0 \
--hash=sha256:3ae3b49a3d5e28a77a0be2b37dbcb89005058959cb2323858c2657c4a8cab474 \
Expand Down Expand Up @@ -393,9 +393,15 @@ tomlkit==0.13.0 \
--hash=sha256:08ad192699734149f5b97b45f1f18dad7eb1b6d16bc72ad0c2335772650d7b72 \
--hash=sha256:7075d3042d03b80f603482d69bf0c8f345c2b30e41699fd8883227f89972b264
# via bump-my-version
tox==4.16.0 \
--hash=sha256:43499656f9949edb681c0f907f86fbfee98677af9919d8b11ae5ad77cb800748 \
--hash=sha256:61e101061b977b46cf00093d4319438055290ad0009f84497a07bf2d2d7a06d0
tox==4.17.1 \
--hash=sha256:2974597c0353577126ab014f52d1a399fb761049e165ff34427f84e8cfe6c990 \
--hash=sha256:2c41565a571e34480bd401d668a4899806169a4633e972ac296c54406d2ded8a
# via
# -r CI/requirements_ci.in
# tox-gh
tox-gh==1.3.2 \
--hash=sha256:beb8d277d5d7c1a1f09c107e4ef80bd7dd2f8f5d020edfaf4c1e3ae8fd45bf6f \
--hash=sha256:c2d6e977f66712e7cd5e5d1b655a1bd4c91ebaf3be104befdb53c81587292d7e
# via -r CI/requirements_ci.in
typing-extensions==4.12.2 \
--hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \
Expand Down
15 changes: 8 additions & 7 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,14 @@ To run specific code style checks:

.. code-block:: console
python -m black --check xsdba tests
python -m isort --check xsdba tests
python -m blackdoc --check xsdba docs
python -m ruff check xsdba tests
python -m flake8 xsdba tests
To get ``black``, ``isort``, ``blackdoc``, ``ruff``, and ``flake8`` (with the ``flake8-rst-docstrings`` plugin) simply install them with ``pip`` (or ``conda``) into your environment.
python -m black --check src/xsdba tests
python -m isort --check src/xsdba tests
python -m blackdoc --check src/xsdba docs
python -m ruff check src/xsdba tests
python -m flake8 src/xsdba tests
validate-docstrings src/xsdba/**.py
To get ``black``, ``isort``, ``blackdoc``, ``ruff``, ``flake8`` (with the ``flake8-rst-docstrings`` plugin), and ``numpydoc`` (for ``validate-docstrings``), simply install them with ``pip`` (or ``conda``) into your environment.

Translations
------------
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ clean-test: ## remove test and coverage artifacts
lint/flake8: ## check style with flake8
python -m ruff check src/xsdba tests
python -m flake8 --config=.flake8 src/xsdba tests
validate-docstrings src/xsdba/**.py
python -m numpydoc lint src/xsdba/**.py

lint/black: ## check style with black
python -m black --check src/xsdba tests
Expand Down
18 changes: 9 additions & 9 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ channels:
dependencies:
- python >=3.9,<3.13
# Dev tools and testing
- pip >=24.0
- bump-my-version >=0.24.3
- pip >=24.2.0
- bump-my-version >=0.25.1
- watchdog >=4.0.0
- flake8 >=7.1.0
- flake8 >=7.1.1
- flake8-rst-docstrings >=0.3.0
- flit >=3.9.0,<4.0
- tox >=4.16.0
- tox >=4.17.1
- coverage >=7.5.0
- coveralls >=4.0.0
- coveralls >=4.0.1
- typer >=0.12.3
- pytest >=8.2.2
- pytest >=8.3.2
- pytest-cov >=5.0.0
- black ==24.4.2
- black ==24.8.0
- blackdoc ==0.3.9
- isort ==5.13.2
- numpydoc >=1.7.0
- numpydoc >=1.8.0
- pre-commit >=3.5.0
- ruff >=0.5.0
- ruff >=0.5.7
20 changes: 10 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ dependencies = [
[project.optional-dependencies]
dev = [
# Dev tools and testing
"pip >=24.0",
"bump-my-version >=0.24.3",
"pip >=24.2.0",
"bump-my-version >=0.25.1",
"watchdog >=4.0.0",
"flake8 >=7.1.0",
"flake8 >=7.1.1",
"flake8-rst-docstrings >=0.3.0",
"flit >=3.9.0,<4.0",
"tox >=4.16.0",
"tox >=4.17.1",
"coverage >=7.5.0",
"coveralls >=4.0.0",
"coveralls >=4.0.1",
"mypy",
"numpydoc >=1.7.0",
"pytest >=8.2.2",
"numpydoc >=1.8.0; python_version >='3.9'",
"pytest >=8.3.2",
"pytest-cov >=5.0.0",
"black ==24.4.2",
"black ==24.8.0",
"blackdoc ==0.3.9",
"isort ==5.13.2",
"ruff >=0.5.0",
"ruff >=0.5.7",
"pre-commit >=3.5.0"
]
docs = [
Expand All @@ -79,7 +79,7 @@ xsdba = "xsdba.cli:app"
"Changelog" = "https://xsdba.readthedocs.io/en/stable/changelog.html"
"About Ouranos" = "https://ouranos.ca/en/"
"Issue tracker" = "https://github.com/Ouranosinc/xsdba/issues"
"Source" = "https://github.com/Ouranosinc/xsdba/"
"Source" = "https://github.com/Ouranosinc/xsdba"

[tool]

Expand Down
19 changes: 14 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
[tox]
min_version = 4.16.0
min_version = 4.17.1
envlist =
lint
py{38,39,310,311,312}
docs
coveralls
requires =
flit ~= 3.9.0
pip >= 24.2.0
opts =
--verbose

[gh]
python =
3.8 = py38-coveralls
3.9 = py39-coveralls
3.10 = py310-coveralls
3.11 = py311-coveralls
3.12 = py312-coveralls

[testenv:lint]
skip_install = True
deps =
black ==24.4.2
black ==24.8.0
blackdoc ==0.3.9
isort ==5.13.2
flake8 >=7.1.0
flake8 >=7.1.1
flake8-rst-docstrings >=0.3.0
ruff >=0.5.0
numpydoc >=1.7.0
ruff >=0.5.7
numpydoc >=1.8.0
commands =
make lint
allowlist_externals =
Expand Down

0 comments on commit 283a315

Please sign in to comment.