Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookiecutter update #452

Merged
merged 19 commits into from
Sep 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fast-forward cookiecutter
Zeitsperre committed Sep 11, 2024
commit 400cb7e78b65b5bb83e1a691fb7445aa9a74d1d0
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": "ebbb093c373c042067047a286e3681d6543cc94b",
"commit": "14556700478b0afdb158d61dd35db26a77c2b83d",
"checkout": null,
"context": {
"cookiecutter": {
15 changes: 12 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: github-actions
directory: /.github/workflows/
directory: /.github/workflows
schedule:
interval: monthly
open-pull-requests-limit: 10
groups:
actions:
patterns:
- "*"

- package-ecosystem: pip
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 10
groups:
python:
patterns:
- "*"
40 changes: 21 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@ jobs:
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install CI libraries
run: |
python -m pip install --require-hashes -r CI/requirements_ci.txt
@@ -52,16 +53,17 @@ jobs:
python -m tox -e lint

test-pypi:
name: ${{ matrix.tox-build }} (Python${{ matrix.python-version }})
name: Test with Python${{ matrix.python-version }} (tox, ${{ matrix.os }})
needs: lint
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
env:
COVERALLS_PARALLEL: true
COVERALLS_SERVICE_NAME: github
esmf-version: 8.4.2
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
os: [ 'ubuntu-latest' ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13.0-rc.1" ]
defaults:
run:
shell: bash -l {0}
@@ -82,6 +84,11 @@ jobs:
mamba
python=${{ matrix.python-version }}
tox
- name: Environment Caching
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: .tox
key: ${{ matrix.os }}-Python${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'tox.ini') }}
- name: Test with tox
run: |
python -m tox
@@ -116,11 +123,12 @@ jobs:
# COVERALLS_SERVICE_NAME: github

test-conda:
name: Python${{ matrix.python-version }} (conda)
name: Test with Python${{ matrix.python-version }} (Anaconda, ${{ matrix.os }})
needs: lint
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
defaults:
run:
@@ -172,19 +180,13 @@ jobs:
- test-pypi
- test-conda
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
sparse-checkout: |
CI/requirements_ci.txt
- name: Install CI libraries
run: |
python -m pip install --require-hashes -r CI/requirements_ci.txt
- name: Coveralls finished
run: |
python -m coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
disable-sudo: true
egress-policy: audit
- name: Coveralls Finished
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0
with:
parallel-finished: true
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -40,4 +40,4 @@ jobs:
run: |
python -m build --sdist --wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
uses: pypa/gh-action-pypi-publish@0ab0b79471669eb3a4d647e625009c62f9f3b241 # v1.10.1
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -80,6 +80,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # 3.26.6
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/tag-testpypi.yml
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ jobs:
run: |
python -m build --sdist --wheel
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
uses: pypa/gh-action-pypi-publish@0ab0b79471669eb3a4d647e625009c62f9f3b241 # v1.10.1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
4 changes: 2 additions & 2 deletions CI/requirements_ci.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bump-my-version==0.25.1
bump-my-version==0.26.0
coveralls==4.0.1
pip==24.2.0
setuptools==65.0
setuptools-scm==8.0
tox==4.17.1
tox==4.18.0
tox-gh==1.3.2
12 changes: 6 additions & 6 deletions CI/requirements_ci.txt
Original file line number Diff line number Diff line change
@@ -12,9 +12,9 @@ bracex==2.4 \
--hash=sha256:a27eaf1df42cf561fed58b7a8f3fdf129d1ea16a81e1fadd1d17989bc6384beb \
--hash=sha256:efdc71eff95eaff5e0f8cfebe7d01adf2c8637c8c92edaf63ef348c241a82418
# via wcmatch
bump-my-version==0.25.1 \
--hash=sha256:d5e72b1a88db4cc808009fd4f03c3b3ab5c06db7bf1501e4f8387eb50c352589 \
--hash=sha256:f9a2723999be5c4416c854ad4a7f950491644944dff82a91634f8a45d1da81ac
bump-my-version==0.26.0 \
--hash=sha256:9e2c01b7639960379440c4a371b3c8c0aa66cf6979985f1c9ba2e7c2fb4a185f \
--hash=sha256:fe35ebae91e92deebe809ce06bfa37303e45e4f087ad4a371f605702e767623f
# via -r CI/requirements_ci.in
cachetools==5.4.0 \
--hash=sha256:3ae3b49a3d5e28a77a0be2b37dbcb89005058959cb2323858c2657c4a8cab474 \
@@ -385,9 +385,9 @@ tomlkit==0.13.0 \
--hash=sha256:08ad192699734149f5b97b45f1f18dad7eb1b6d16bc72ad0c2335772650d7b72 \
--hash=sha256:7075d3042d03b80f603482d69bf0c8f345c2b30e41699fd8883227f89972b264
# via bump-my-version
tox==4.17.1 \
--hash=sha256:2974597c0353577126ab014f52d1a399fb761049e165ff34427f84e8cfe6c990 \
--hash=sha256:2c41565a571e34480bd401d668a4899806169a4633e972ac296c54406d2ded8a
tox==4.18.0 \
--hash=sha256:0a457400cf70615dc0627eb70d293e80cd95d8ce174bb40ac011011f0c03a249 \
--hash=sha256:5dfa1cab9f146becd6e351333a82f9e0ade374451630ba65ee54584624c27b58
# via
# -r CI/requirements_ci.in
# tox-gh
4 changes: 1 addition & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -141,9 +141,7 @@
# templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
# You can specify multiple suffix as a dictionary of suffix: filetype
source_suffix = {'.rst': 'restructuredtext'}

# The master toctree document.
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -30,10 +30,11 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.13",
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Atmospheric Science"
]
@@ -77,7 +78,7 @@ dev = [
"babel",
"black[jupyter] ==24.8.0",
"blackdoc ==0.3.9",
"bump-my-version >=0.25.1",
"bump-my-version >=0.26.0",
"coverage >=7.5.0",
"coveralls >=4.0.1",
"flake8 >=7.1.1",
@@ -90,7 +91,7 @@ dev = [
"pytest-cov >=5.0.0",
"pytest >=8.3.2",
"ruff >=0.5.7",
"tox >=4.17.1",
"tox >=4.18.0",
"watchdog >=4.0.0",
"xdoctest"
]
@@ -129,7 +130,8 @@ target-version = [
"py39",
"py310",
"py311",
"py312"
"py312",
"py313"
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved
]

[tool.bumpversion]
@@ -208,7 +210,7 @@ py_version = 39

[tool.mypy]
files = "."
python_version = 3.9
python_version = 3.8
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved
show_error_codes = true
strict = true
warn_no_return = true
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tox]
min_version = 4.17.1
min_version = 4.18.0
envlist =
lint
py{39,310,311,312}
py{39,310,311,312,313}
docs-esmpy
requires =
pip >= 24.2.0
@@ -17,6 +17,7 @@ python =
3.10 = py310-coveralls
3.11 = py311-coveralls
3.12 = py312-esmpy-coveralls
3.13 = py313-esmpy-coveralls
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved

[testenv:lint]
description = Check for Code Compliance and missing french translations