Skip to content

Commit

Permalink
MAINT: Use Hatch for project management
Browse files Browse the repository at this point in the history
  • Loading branch information
ghisvail committed Jan 3, 2024
1 parent d9b33a0 commit dab63ca
Show file tree
Hide file tree
Showing 6 changed files with 232 additions and 8,169 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ trim_trailing_whitespace = false
[*.py]
max_line_length = 88

[*.{yaml,yml}]
[*.{toml,yaml,yml}]
indent_size = 2

[Makefile]
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
unit:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
steps:
- uses: actions/checkout@v4
- uses: snok/install-poetry@v1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: poetry install --with dev
cache: pip
- name: Install Hatch
run: pipx install hatch
- name: Run the test suite
run: poetry run pytest --cov --cov-config=pyproject.toml tests/unit
run: hatch run +py=${{ matrix.python-version }} cov
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ repos:
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/python-poetry/poetry
rev: '1.7.1'
hooks:
- id: poetry-check

- repo: https://github.com/FHPythonUtils/LicenseCheck
rev: '2023.5.2'
hooks:
Expand Down
20 changes: 4 additions & 16 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
version: 2

# Adapted from:
# - <https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-poetry>
# - <https://docs.readthedocs.io/en/stable/faq.html#how-can-i-deploy-jupyter-book-projects-on-read-the-docs>
build:
os: ubuntu-22.04
apt_packages:
- graphviz
- libsndfile1
tools:
python: "3.11"
jobs:
post_create_environment:
- pip install poetry
- poetry config --local virtualenvs.create false
post_install:
- poetry install --all-extras --with docs
pre_build:
- jupyter-book config sphinx docs/

sphinx:
configuration: docs/conf.py
fail_on_warning: false
python: '3.11'
commands:
- pip install hatch
- hatch run docs:build $READTHEDOCS_OUTPUT/html
Loading

0 comments on commit dab63ca

Please sign in to comment.