Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 17 additions & 13 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ jobs:
name: Run lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
python-version: 3.11
- name: Install tox
run: python -m pip install tox
version: "0.11.16"
python-version: "3.11"
enable-cache: true
- name: Install tox with tox-uv
run: uv tool install tox --with tox-uv
- name: check-manifest
run: tox -e check-manifest
- name: flake8
Expand All @@ -39,26 +41,28 @@ jobs:
fail-fast: false
matrix:
py:
- "3.14"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
os:
- ubuntu-latest
- macos-13
- windows-latest
env:
MPLBACKEND: Agg # https://github.com/orgs/community/discussions/26434
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: "0.11.16"
python-version: ${{ matrix.py }}
- name: Install tox
run: python -m pip install tox-gh>=1.2
enable-cache: true
- name: Install tox with tox-uv
run: uv tool install tox --with tox-uv
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
Expand Down
36 changes: 17 additions & 19 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,32 @@ jobs:
name: Test if documentation can be rendered
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
python-version: 3.11
- name: Install package and sphinx
run: |
pip install .
pip install sphinx>=4.5 sphinx-book-theme pytest sphinx_gallery plotly
sphinx-build -b doctest doc .
version: "0.11.16"
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --extra doc
- name: Run doctest
run: uv run sphinx-build -b doctest doc .
docdeploy:
name: Render the documentation and push it to gh-pages
runs-on: ubuntu-latest
needs: doctest
if: ${{github.ref == 'refs/heads/main'}}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
python-version: 3.11
- name: Install package and sphinx
run: |
pip install .
pip install sphinx>=4.5 sphinx-book-theme pytest sphinx_gallery plotly
version: "0.11.16"
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --extra doc
- name: Sphinx build
run: |
sphinx-build doc _build
run: uv run sphinx-build doc _build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
python-version: "3.x"
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install build twine
version: "0.11.16"
enable-cache: true
- name: Build a binary wheel and a source tarball
run: python3 -m build
run: uv build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
Expand All @@ -46,8 +43,12 @@ jobs:
with:
name: resourcecode
path: dist/
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: "0.11.16"
- name: Publish Resourcecode 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
run: uv publish

github-release:
name: >-
Expand All @@ -62,7 +63,7 @@ jobs:
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Download all the dists
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -113,8 +114,9 @@ jobs:
with:
name: resourcecode
path: dist/
- name: Publish Resourcecode 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
version: "0.11.16"
- name: Publish Resourcecode 📦 to TestPyPI
run: uv publish --token ${{ secrets.TEST_PYPI_TOKEN }} --publish-url https://test.pypi.org/legacy/
196 changes: 5 additions & 191 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,192 +1,6 @@
# Created by https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks
# Edit at https://www.toptal.com/developers/gitignore?templates=python,jupyternotebooks
# uv
uv.lock
.venv/

### JupyterNotebooks ###
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/

.ipynb_checkpoints
*/.ipynb_checkpoints/*

# IPython
profile_default/
ipython_config.py

# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
.doctrees/*
public/*
output.txt

# Sphinx documentation
doc/_build/
doc/auto_examples

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
tests/output/*.png

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook

# IPython

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks

#Additional stuff
joss_paper/paper.log
joss_paper/paper.Rmd
joss_paper/paper.html
joss_paper/paper.bib.bak
joss_paper/paper.pdf
# Jupyter checkpoints
**/.ipynb_checkpoints/
8 changes: 6 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ include LICENSE
include CITATION.cff
include tox.ini
include mypy.ini
include config/config.ini
include dev_requirements.txt
include fp_hs.png
exclude .gitlab-ci.yml .gitlab-ci-ifremer.yml
include *.md
include uv.lock
include *.txt

recursive-include config *.ini
recursive-include notebooks *.ipynb
global-exclude **/.ipynb_checkpoints/*
recursive-include resourcecode *.py
recursive-include resourcecode/data *.feather *.json
recursive-include resourcecode *.csv
recursive-include resourcecode/config *.ini

recursive-include examples *.py
recursive-include examples *.rst
Expand All @@ -22,6 +25,7 @@ recursive-include CLA *.pdf

recursive-exclude joss_paper *
exclude joss_paper
exclude dev_requirements.txt

prune codes_to_migrate
prune doc
Loading
Loading