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

Add type hints - beef up docstrings - test examples, etc. #72

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
18 changes: 14 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
]
include:
- environment-file: ci/py312-latest.yaml
os: macos-latest
os: macos-13 # Intel
- environment-file: ci/py312-latest.yaml
os: macos-14 # Apple Silicon
- environment-file: ci/py312-latest.yaml
Expand Down Expand Up @@ -60,7 +60,7 @@

- name: environment info
run: "micromamba info && micromamba list"

- name: run tests
run: |
pytest \
Expand All @@ -71,8 +71,18 @@
--cov fastpair \
--cov-append \
--cov-report term-missing \
--cov-report xml .

--cov-report xml . \

- name: run doctests (dev only)
if: contains(matrix.environment-file, 'dev')
run: |
pytest \
fastpair/ \
--verbose \
-r a \
--color yes \
--doctest-only

- name: codecov
uses: codecov/codecov-action@v4
with:
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ repos:
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.10.1"
hooks:
- id: mypy

ci:
autofix_prs: false
autoupdate_schedule: quarterly
1 change: 1 addition & 0 deletions ci/py310-oldest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
- python=3.10
- numpy=1.24
- scipy=1.10
- typing_extensions
# testing
- pytest
- pytest-cov
1 change: 1 addition & 0 deletions ci/py311-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
dependencies:
- python=3.11
- scipy
- typing_extensions
# testing
- pytest
- pytest-cov
2 changes: 2 additions & 0 deletions ci/py312-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ channels:
dependencies:
- python=3.12
- pip
- typing_extensions
# testing
- pytest
- pytest-cov
- pytest-doctestplus
- pip:
# nightly builds
- --pre \
Expand Down
1 change: 1 addition & 0 deletions ci/py312-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
dependencies:
- python=3.12
- scipy
- typing_extensions
# testing
- pytest
- pytest-cov
Loading