Skip to content

Commit 7d946a4

Browse files
committed
Add unit tests, linting, and CI checks for chem-sync-local-flask
1 parent f535687 commit 7d946a4

27 files changed

Lines changed: 2002 additions & 2 deletions
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Chem Sync Local Flask App Tests
2+
3+
# Taken from https://github.com/actions/starter-workflows/blob/main/ci/python-app.yml
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
types: [opened, edited, synchronize]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test:
16+
17+
runs-on: ubuntu-20.04
18+
name: Quality Checks + Tests
19+
defaults:
20+
run:
21+
working-directory: ./examples/chem-sync-local-flask
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-python@v4
26+
with:
27+
python-version: "3.11"
28+
- name: Install requirements
29+
run: pip install -r requirements.txt
30+
- name: Install dev requirements
31+
run: pip install -r dev_requirements.txt
32+
- name: Lint
33+
run: ruff check .
34+
- name: Mypy
35+
run: mypy .
36+
- name: Run Tests
37+
run: pytest tests/unit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
flask~=3.0.0
22
# TODO Upgrade to stable SDK version once changes are released
33
# Cryptography extra needed for webhook verification
4-
benchling-sdk[cryptography]==1.10.0a9
4+
benchling-sdk[cryptography]==1.10.0a11

examples/chem-sync-local-flask/ruff.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ target-version = "py311"
44
line-length = 110
55

66
select = ["ALL"]
7-
ignore = ["D100", "D101", "D103", "D104", "EM101", "EM102", "S101", "TRY003"]
7+
ignore = ["D100", "D101", "D103", "D104", "EM101", "EM102", "S101", "TRY003"]
8+
9+
[per-file-ignores]
10+
"**/tests/*" = ["ANN001", "ANN101", "D102", "PLR2004"]

examples/chem-sync-local-flask/tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)