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

MAINT: Use Hatch for project management #2

Merged
merged 1 commit into from
Jan 3, 2024
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
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
7 changes: 2 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ jobs:
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: Run the test suite
run: poetry run pytest --cov --cov-config=pyproject.toml tests/unit
run: pipx run hatch run cov
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