Skip to content

Commit 66ba278

Browse files
author
Phil Varner
committed
Merge branch 'pv/build' into pv/pagination-link-incorrect
2 parents d97be24 + 2c9388e commit 66ba278

File tree

10 files changed

+77
-25
lines changed

10 files changed

+77
-25
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
## Checklist
1010

11-
- [ ] Tests pass: `uv run pytest`
11+
- [ ] Tests pass: `./scripts/run-tests.sh`
1212
- [ ] Checks pass: `uv run pre-commit run --all-files`
1313
- [ ] CHANGELOG is updated (if necessary)

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Pre-Commit Hooks
3131
run: uv run pre-commit run --all-files
3232
- name: Test
33-
run: uv run pytest
33+
run: ./scripts/run-tests.sh
3434
- name: Validate test server
3535
run: uv run scripts/validate-stapi-fastapi
3636
- name: Docs

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ uv sync
6262
Test:
6363

6464
```shell
65-
uv run pytest
65+
./scripts/run-tests.sh
6666
```
6767

6868
Check formatting and other lints:

pyproject.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@ dependencies = [
1313

1414
[dependency-groups]
1515
dev = [
16-
"pytest>=8.1.1",
1716
"mypy>=1.15.0",
18-
"pytest>=8.3.5",
1917
"ruff>=0.11.2",
2018
"pymarkdownlnt>=0.9.25",
2119
"pre-commit>=4.2.0",
2220
"pre-commit-hooks>=5.0.0",
23-
"fastapi[standard]>=0.115.12",
24-
"types-click>=7.1.8",
2521
"pygithub>=2.6.1",
26-
"respx>=0.22.0",
2722
]
2823
docs = [
2924
"mkdocs-material>=9.6.11",

pystapi-client/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ readme = "README.md"
66
authors = [
77
{ name = "Kaveh Karimi-Asli", email = "[email protected]" },
88
{ name = "Philip Weiss", email = "[email protected]" },
9-
{ name = "Stella Reinhardt", email = "[email protected]"}
9+
{ name = "Stella Reinhardt", email = "[email protected]" },
1010
]
1111
maintainers = [{ name = "Pete Gadomski", email = "[email protected]" }]
1212
keywords = ["stapi"]
@@ -18,6 +18,8 @@ dependencies = [
1818
"python-dateutil>=2.8.2",
1919
"click>=8.1.8",
2020
]
21+
[dependency-groups]
22+
dev = ["pytest>=8.3.5", "respx>=0.22.0", "types-click>=7.1.8"]
2123

2224
[project.scripts]
2325
stapi = "pystapi_client.scripts.cli:cli"

scripts/run-tests.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
set -Eeuo pipefail
3+
# set -x # print each command before executing
4+
5+
for path in stapi-fastapi pystapi-validator pystapi-client stapi-pydantic; do
6+
name=$(basename "$path")
7+
8+
set +e
9+
uv sync --package "$name"
10+
uv run --package "$name" --directory "$path" pytest -p no:sugar
11+
code=$?
12+
set -e
13+
14+
case "$code" in
15+
0) : ;;
16+
5) echo " (no tests in $name, skipping)";;
17+
*) echo " pytest failed in $name (exit $code)"; exit "$code";;
18+
esac
19+
done

scripts/validate-stapi-fastapi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
scripts="$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
66
root=$(dirname "$scripts")
77

8-
uv run fastapi dev "$root/stapi-fastapi/tests/application.py" >/dev/null 2>&1 &
8+
uv run --package stapi-fastapi fastapi dev "$root/stapi-fastapi/tests/application.py" >/dev/null 2>&1 &
99
server_pid=$!
1010

1111
set +e

stapi-fastapi/pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ dependencies = [
2424
"stapi-pydantic>=0.0.3",
2525
]
2626

27+
[dependency-groups]
28+
dev = [
29+
"fastapi[standard]>=0.115.0",
30+
"pytest>=8.3.5",
31+
]
32+
2733
[tool.hatch.build.targets.sdist]
2834
include = ["src/stapi_fastapi"]
2935

stapi-pydantic/pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ authors = [
1010
requires-python = ">=3.11"
1111
dependencies = ["pydantic>=2.12", "cql2>=0.3.6", "geojson-pydantic>=1.2.0"]
1212

13+
[dependency-groups]
14+
dev = [
15+
"pytest>=8.3.5",
16+
]
17+
1318
[project.scripts]
1419
stapi-pydantic = "stapi_pydantic:main"
1520

uv.lock

Lines changed: 40 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)