Skip to content

Commit

Permalink
Merge pull request #92 from zest-derm/juliand/zst-1157
Browse files Browse the repository at this point in the history
Implement patient programs
  • Loading branch information
samamorgan authored Feb 28, 2024
2 parents 80f1c99 + 8d2eb93 commit 69d0296
Show file tree
Hide file tree
Showing 36 changed files with 2,585 additions and 76 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pre-commit-autoupdate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pre-commit auto-update

on:
# every day at midnight
schedule:
- cron: "0 0 * * *"
# on demand
workflow_dispatch:

jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2

- uses: browniebroke/pre-commit-autoupdate-action@main

- uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-hooks
title: Update pre-commit hooks
commit-message: "chore: update pre-commit hooks"
body: Update versions of pre-commit hooks to latest version.
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
23 changes: 19 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- main
- develop

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
get-python-versions:
runs-on: ubuntu-latest
Expand All @@ -15,12 +19,14 @@ jobs:
- uses: snok/latest-python-versions@v1
id: get-python-versions-action
with:
min-version: 3.7
min-version: 3.8

test:
permissions: write-all
needs: [get-python-versions]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(needs.get-python-versions.outputs.python-matrix) }}

Expand Down Expand Up @@ -50,7 +56,16 @@ jobs:
run: poetry install --with test --no-interaction

- name: Run tests
run: poetry run pytest --cov
run: |
poetry run pytest \
--junitxml=pytest.xml \
--cov-report=term-missing:skip-covered \
--cov=welkin test/ | tee pytest-coverage.txt
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
continue-on-error: true
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
unique-id-for-comment: ${{ matrix.python-version }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
pytest-coverage.txt
pytest.xml

# Translations
*.mo
Expand Down
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
args: [--unsafe]
- id: debug-statements
- id: mixed-line-ending

## Python
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
types: [python]

- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
types: [python]
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
}
},
"editor.formatOnSave": true,
Expand Down
Loading

0 comments on commit 69d0296

Please sign in to comment.