-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from zarr-developers/chore/dump-poetry
refactor the entire build system to use hatch instead of poetry.
- Loading branch information
Showing
22 changed files
with
442 additions
and
1,753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
groups: | ||
actions: | ||
patterns: | ||
- '*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,84 @@ | ||
name: Linux Testing | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
test: | ||
name: os=${{ matrix.os }}, py=${{ matrix.python-version }}, np=${{ matrix.numpy-version }}, deps=${{ matrix.dependency-set }} | ||
|
||
strategy: | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
python-version: ['3.11', '3.12', '3.13'] | ||
numpy-version: ['1.25', '2.1'] | ||
dependency-set: ["minimal", "optional"] | ||
os: ["ubuntu-latest"] | ||
include: | ||
- python-version: '3.11' | ||
numpy-version: '1.25' | ||
dependency-set: 'optional' | ||
os: 'macos-latest' | ||
- python-version: '3.13' | ||
numpy-version: '2.1' | ||
dependency-set: 'optional' | ||
os: 'macos-latest' | ||
- python-version: '3.11' | ||
numpy-version: '1.25' | ||
dependency-set: 'optional' | ||
os: 'windows-latest' | ||
- python-version: '3.13' | ||
numpy-version: '2.1' | ||
dependency-set: 'optional' | ||
os: 'windows-latest' | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Install Hatch | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install hatch | ||
- name: Run Tests | ||
run: | | ||
hatch run test.py${{ matrix.python-version }}:test-cov | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true # optional (default = false) | ||
|
||
doctests: | ||
name: doctests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
shell: "bash -l {0}" | ||
with: | ||
fetch-depth: 0 # required for hatch version discovery, which is needed for numcodecs.zarr3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' | ||
- name: Install Hatch | ||
run: | | ||
pip install poetry | ||
poetry install | ||
- name: Test | ||
python -m pip install --upgrade pip | ||
pip install hatch | ||
- name: Run Tests | ||
run: | | ||
poetry run pytest | ||
hatch run docs:test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,44 @@ | ||
ci: | ||
autoupdate_commit_msg: "chore: update pre-commit hooks" | ||
autoupdate_schedule: "monthly" | ||
autofix_commit_msg: "style: pre-commit fixes" | ||
default_stages: [commit, push] | ||
default_language_version: | ||
python: python3 | ||
autofix_prs: false | ||
default_stages: [pre-commit, pre-push] | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.9.1 | ||
hooks: | ||
- id: ruff | ||
args: ["--fix", "--show-fixes"] | ||
- id: ruff-format | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
args: ["-L", "fo,ihs,kake,te", "-S", "fixture"] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-yaml | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.4 | ||
- id: check-yaml | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.14.1 | ||
hooks: | ||
- id: mypy | ||
files: src|tests | ||
additional_dependencies: | ||
- pytest | ||
- pydantic | ||
- repo: https://github.com/scientific-python/cookie | ||
rev: 2024.08.19 | ||
hooks: | ||
- id: sp-repo-review | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
- repo: https://github.com/numpy/numpydoc | ||
rev: v1.8.0 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
# Run the formatter. | ||
- id: ruff-format | ||
- id: numpydoc-validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.