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
19 changes: 10 additions & 9 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ jobs:
name: Build package documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.11
- name: Install dependencies
enable-cache: true
- name: Install hatch
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pdoc
uv pip install hatch
- name: Build docs
run: pdoc -o docs pydexcom
- uses: actions/upload-pages-artifact@v2
run: hatch run docs:build
- uses: actions/upload-pages-artifact@v3
with:
path: docs
pages:
Expand All @@ -39,4 +40,4 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
9 changes: 6 additions & 3 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
name: Run pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
- name: Checkout repository
uses: actions/checkout@v4
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
with:
extra_args: "--all-files"
19 changes: 12 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build setuptools setuptools_scm
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.11
enable-cache: true
- name: Install hatch
run:
uv pip install hatch
- name: Build package distributions
run: python3 -m build
run: hatch build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@v1.12.4
19 changes: 11 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: test
on:
pull_request:
push:
branches:
- main

jobs:
test:
Expand All @@ -13,14 +15,15 @@ jobs:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r tests/requirements.txt
enable-cache: true
- name: Install hatch
run:
uv pip install hatch
- name: Run tests
run: python -m pytest --record-mode=none
run: hatch test --python ${{ matrix.python-version }} --parallel
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ build/
.pytest_cache/
.DS_Store
.ruff_cache
uv.lock
docs/
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-yaml

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.16.0
hooks:
- id: mypy
additional_dependencies: [types-requests]
exclude: ^tests/ # pre-commit does not support mypy_path for stubs

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.6.7
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.13
hooks:
- id: ruff
- id: ruff-check
- id: ruff-format
40 changes: 23 additions & 17 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{
"mypy.dmypyExecutable": "${workspaceFolder}/.venv/bin/dmypy",
"python.testing.pytestArgs": [
"tests",
"--record-mode=none"
],
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"mypy.configFile": "pyproject.toml",
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "charliermarsh.ruff"
"mypy.dmypyExecutable": "${workspaceFolder}/.venv/bin/dmypy",
"python.testing.pytestArgs": ["tests", "--record-mode=none"],
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"mypy.configFile": "pyproject.toml",
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"cSpell.words": [
"pydexcom"
],
}
"editor.defaultFormatter": "charliermarsh.ruff"
},
"cSpell.words": [
"addinivalue",
"addoption",
"autouse",
"fixturename",
"getgroup",
"mmol",
"mypy",
"pdoc",
"pydexcom",
"vcrpy"
]
}
Loading
Loading