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

Modernization #267

Merged
merged 14 commits into from
Mar 6, 2025
24 changes: 24 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tool.bumpversion]
current_version = "0.8.7"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
tag = false
allow_dirty = false
commit = true

[[tool.bumpversion.files]]
filename = "birdy/__init__.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""

[[tool.bumpversion.files]]
filename = "docs/source/conf.py"
search = "release = \"{current_version}\""
replace = "release = \"{new_version}\""

[[tool.bumpversion.files]]
filename = "README.rst"
search = "{current_version}"
replace = "{new_version}"
13 changes: 11 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ updates:
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 5
groups:
actions:
patterns:
- "*"

- package-ecosystem: pip
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 5
groups:
ci:
patterns:
- "CI/*"
python:
patterns:
- "requirements*.txt"
46 changes: 24 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.x"
steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ matrix.python-version }}
- name: Install flake8 and black
Expand All @@ -38,23 +44,23 @@ jobs:
python-version:
- "3.9"
steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install pandoc
run: |
sudo apt-get -y install pandoc
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements 📦
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
if [ -f requirements_extra.txt ]; then pip install -r requirements_extra.txt; fi
- name: Install Birdy 🐦
run: |
python -m pip install --editable .
python -m pip install --editable ".[docs]"
- name: Check dependencies
run: |
python -m pip list
Expand All @@ -70,26 +76,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements 📦
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
if [ -f requirements_extra.txt ]; then pip install -r requirements_extra.txt; fi
- name: Install Birdy 🐦
run: |
python -m pip install --editable .
python -m pip install --editable ".[dev]"
- name: Check dependencies
run: |
python -m pip list
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ jobs:
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python3
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.x"
- name: Install packaging libraries
Expand All @@ -32,4 +34,4 @@ jobs:
run: |
python -m build --sdist --wheel .
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.2
8 changes: 5 additions & 3 deletions .github/workflows/tag-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ jobs:
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python3
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.x"
- name: Install packaging libraries
Expand All @@ -32,7 +34,7 @@ jobs:
run: |
python -m build --sdist --wheel .
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.2
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
17 changes: 8 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ repos:
- id: check-yaml
- id: debug-statements
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
args: [ '--target-version=py39' ]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort
args: [ '--profile=black' ]
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
rev: 7.1.2
hooks:
- id: flake8
args: [ '--config=setup.cfg' ]
Expand All @@ -42,15 +42,14 @@ repos:
additional_dependencies: [ 'pyupgrade==v3.19.1' ]
- id: nbqa-black
args: [ '--target-version=py39' ]
additional_dependencies: [ 'black==24.10.0' ]
additional_dependencies: [ 'black==25.1.0' ]
- id: nbqa-isort
args: [ '--profile=black' ]
additional_dependencies: [ 'isort==5.13.2' ]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
additional_dependencies: [ 'isort==6.0.1' ]
- repo: https://github.com/numpy/numpydoc
rev: v1.8.0
hooks:
- id: pydocstyle
args: [ '--convention=numpy' ]
- id: numpydoc-validation
- repo: meta
hooks:
- id: check-hooks-apply
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ sphinx:
configuration: docs/source/conf.py

build:
os: ubuntu-22.04
os: "ubuntu-24.04"
tools:
python: "mambaforge-22.9"
python: "mambaforge-23.11"
jobs:
pre_build:
- sphinx-apidoc -o docs/source/apidoc/ --private --module-first --separate birdy
Expand Down
6 changes: 5 additions & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
"affiliation": "CRIM"
},
{
"name": "David Caron"
"name": "David Caron",
"affiliation": "Jakarto"
},
{
"name": "Nathan Collier",
"affiliation": "Oak Ridge National Laboratory"
}
],

Expand Down
8 changes: 5 additions & 3 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Authors
*******

* David Huard <huard.david@ouranos.ca>
* Carsten Ehbrecht <ehbrecht@dkrz.de>
* David Huard <huard.david@ouranos.ca> `@huard <https://github.com/huard>`_
* Carsten Ehbrecht <ehbrecht@dkrz.de> `@cehbrecht <https://github.com/cehbrecht>`_

Contributors
************

* Trevor James Smith <smith.trevorj@ouranos.ca> `@Zeitsperre <https://www.github.com/Zeitsperre>`_
* David Caron `@davidcaron <https://github.com/davidcaron>`_
* Francis Pelletier `@f-PLT <@f-PLT>`_
* Nathan Collier <nathaniel.collier@gmail.com> `@nocollier <https://github.com/nocollier>`_
* Trevor James Smith <smith.trevorj@ouranos.ca> `@Zeitsperre <https://www.github.com/Zeitsperre>`_
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ include docs Makefile make.bat
recursive-include docs/source Makefile make.bat *.rst *.py *.ipynb *.svg *.ico *.txt *.yml *.cfg *.md
recursive-include tests *.py *.nc *.tif *.geojson *.xml

exclude *.toml
exclude *.yaml
exclude *.yml

recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude * *.ipynb_checkpoints
Expand Down
32 changes: 20 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Birdy
=====

|PyPI| |Docs| |Build| |License| |Gitter|
|pypi| |conda| |versions| |docs| |build| |license| |gitter|

Birdy (the bird)
*Birdy is not a bird but likes to play with them.*
Expand All @@ -23,25 +23,33 @@ Full `documentation <http://birdy.readthedocs.org/en/latest/>`_ is on ReadTheDoc

.. _Birdhouse: http://bird-house.github.io/en/latest/

.. |PyPI| image:: https://img.shields.io/pypi/v/birdhouse-birdy.svg
:target: https://pypi.python.org/pypi/birdhouse-birdy
:alt: Python Package Index Build
.. |build| image:: https://github.com/bird-house/birdy/actions/workflows/main.yml/badge.svg
:target: https://github.com/bird-house/birdy/actions/workflows/main.yml
:alt: Build Status

.. |Docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
.. |conda| image:: https://anaconda.org/conda-forge/birdy/badges/version.svg
:target: https://anaconda.org/conda-forge/birdy
:alt: Anaconda Version

.. |docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:target: http://birdy.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. |Build| image:: https://github.com/bird-house/birdy/actions/workflows/main.yml/badge.svg
:target: https://github.com/bird-house/birdy/actions/workflows/main.yml
:alt: Build Status
.. |gitter| image:: https://badges.gitter.im/bird-house/birdhouse.svg
:target: https://gitter.im/bird-house/birdhouse?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
:alt: Join the chat at https://gitter.im/bird-house/birdhouse

.. |License| image:: https://img.shields.io/github/license/bird-house/birdy.svg
.. |license| image:: https://img.shields.io/github/license/bird-house/birdy.svg
:target: https://github.com/bird-house/birdy/blob/master/LICENSE.txt
:alt: GitHub license

.. |Gitter| image:: https://badges.gitter.im/bird-house/birdhouse.svg
:target: https://gitter.im/bird-house/birdhouse?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
:alt: Join the chat at https://gitter.im/bird-house/birdhouse
.. |pypi| image:: https://img.shields.io/pypi/v/birdhouse-birdy.svg
:target: https://pypi.python.org/pypi/birdhouse-birdy
:alt: Python Package Index Build

.. |versions| image:: https://img.shields.io/pypi/pyversions/birdhouse-birdy.svg
:target: https://pypi.python.org/pypi/birdhouse-birdy
:alt: Supported Python Versions

.. |Binder| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/bird-house/birdy.git/v0.8.7?filepath=notebooks
Expand Down
Loading