Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9492002
docs: add Strawberry migration log + Phase 0 inventory (solvis, final…
chrisbc Jun 23, 2026
ef51476
chore: migrate Poetry → uv, flake8/black/isort → ruff
chrisbc Jun 23, 2026
47ff2c3
Merge pull request #87 from GNS-Science/poetry2uv
chrisbc Jun 24, 2026
1ca0440
Phase 0: baseline legacy Graphene SDL as migration parity target
chrisbc Jun 24, 2026
1fc51d2
Phase 0: vendor client-query corpus (test-sourced) + replay gate
chrisbc Jun 24, 2026
176a2ae
Phase 0: extend corpus with kororaa frontend queries (gateway -> solvis)
chrisbc Jun 24, 2026
d2a5c6e
Phase 1: stacked-PR CI fix + yarn supply-chain age gate
chrisbc Jun 24, 2026
6e1e86c
Phase 1: FastAPI/Mangum scaffold + container entry swap to Mangum
chrisbc Jun 24, 2026
5847bb7
Phase 2a: PynamoDB -> pydantic + boto3 (keep BinaryLargeObject wrappe…
chrisbc Jun 24, 2026
6b7a14e
Phase 2b: port Graphene schema to Strawberry at byte-identical SDL pa…
chrisbc Jun 24, 2026
f7e640a
Phase 3a: differential parity harness + rupture-detail resolvers
chrisbc Jun 24, 2026
6fd8e37
Phase 3b(i): implement filter_ruptures pagination (differential parity)
chrisbc Jun 24, 2026
c98f39d
Phase 3b: CompositeRuptureSections + node; runtime parity complete
chrisbc Jun 24, 2026
7922243
Phase 4: deploy/CI/deps hardening (clean pass)
chrisbc Jun 24, 2026
c1c2b5e
Phase 5: pre-stage cutover plan (deploy held for creds + go-ahead)
chrisbc Jun 24, 2026
766904f
fix(ci): drop follow_untyped_imports (poetry2uv regression) + SetOper…
chrisbc Jun 24, 2026
3334e10
Merge Graphene→Strawberry migration (Phases 0–5) into deploy-test
chrisbc Jun 24, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

call-deploy-workflow:
needs: call-test-workflow
uses: GNS-Science/nshm-github-actions/.github/workflows/deploy-to-aws.yml@main
uses: GNS-Science/nshm-github-actions/.github/workflows/deploy-to-aws-uv.yml@main
with:
operating-system: 'ubuntu-latest'
python-version: '3.12'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
# schedule:
# - cron: '45 6 * * 0' # At 06:45 on Sunday
pull_request:
branches: [main, deploy-test]
# No `branches:` filter — stacked migration PRs target feature branches, not
# main/deploy-test, and a filter would silently skip their CI (runbook Trap #14).

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -14,10 +15,10 @@ on:

jobs:
call-test-workflow:
uses: GNS-Science/nshm-github-actions/.github/workflows/python-run-tests.yml@main
uses: GNS-Science/nshm-github-actions/.github/workflows/python-run-tests-uv.yml@main
with:
operating-systems: "['ubuntu-latest']"
python-versions: "['3.12']"
delete-poetry-lock: ${{ github.event_name == 'schedule' }} # the scheduled build tests against newer dependencies
delete-uv-lock: ${{ github.event_name == 'schedule' }} # the scheduled build tests against newer dependencies
optional-dependency-groups: dev
secrets: inherit
11 changes: 11 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
nodeLinker: node-modules

# Supply-chain hardening (runbook §4.6): refuse npm packages younger than 7 days,
# but allow project-internal packages through so dev velocity isn't blocked.
npmMinimalAgeGate: "7d"
npmPreapprovedPackages:
- "nshm-*"
- "nzshm-*"
- "solvis-*"
- "weka-*"
- "toshi-*"
4 changes: 2 additions & 2 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public.ecr.aws/lambda/python:3.12
```

### Update the requirements
poetry export --without-hashes --format=requirements.txt > requirements.txt
uv export --no-hashes --no-emit-project --format requirements-txt > requirements.txt

### test wsgi handlers

```
ENABLE_METRICS=0 poetry run yarn sls wsgi serve
ENABLE_METRICS=0 uv run yarn sls wsgi serve
```

## A Dockerfile
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN dnf install git-core -y &&\
dnf remove git-core -y &&\
dnf clean all

# lambda entry point
CMD ["solvis_graphql_api.solvis_graphql_api.app"]
ENTRYPOINT ["/bin/bash", "-c"]
# lambda entry point — Mangum handler (was the serverless-wsgi handler.py workaround).
# ENTRYPOINT is the base image's Runtime Interface Client (/lambda-entrypoint.sh); CMD is
# the handler. Matches serverless.yml functions.ecr-app.image.{entryPoint,command}.
CMD ["solvis_graphql_api.app.handler"]
4 changes: 2 additions & 2 deletions MIGRATION_v0.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Since version v0.9.x this API uses a dynamoDB/S3 data_store for the CompositeRup
Below is the one-time script output from the cli which creates the table and pushes up the archive file.

```
% AWS_PROFILE=chrisbc S3_BUCKET_NAME=nzshm22-solvis-graphql-api-prod REGION=ap-southeast-2 DEPLOYMENT_STAGE=prod poetry run cli -T -R ~/Downloads/NSHM_v1.0.4_CompositeSolution.zip NSHM_v1.0.4
% AWS_PROFILE=chrisbc S3_BUCKET_NAME=nzshm22-solvis-graphql-api-prod REGION=ap-southeast-2 DEPLOYMENT_STAGE=prod uv run cli -T -R ~/Downloads/NSHM_v1.0.4_CompositeSolution.zip NSHM_v1.0.4
WARNING: optional `toshi` dependencies are not installed.
Running without `toshi` options
WARNING: geometry.section_distance() uses the optional dependency pyvista.
Expand All @@ -31,7 +31,7 @@ solvis_graphql_api cli uploaded solvis composite solution <solvis_graphql_api.da
And below is the A/B test showing that Prod/Test APIs are working and agree.

```
chrisbc@MLX01 solvis-graphql-api % poetry run cli_ab_test WORK/ab.toml -A prod -B test -v
chrisbc@MLX01 solvis-graphql-api % uv run cli_ab_test WORK/ab.toml -A prod -B test -v
WARNING: optional `toshi` dependencies are not installed.
Running without `toshi` options
config `WORK/ab.toml` has service keys: dict_keys(['prod', 'test', 'dev'])
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ Java is required .


```
poetry install
poetry lock
poetry shell
uv sync --all-groups
```

Make sure the dynamodb plugin for local tests is installed
Expand All @@ -41,20 +39,20 @@ yarn sls dynamodb install
### Run full stack locally

```
npx serverless dynamodb start --stage local &\
npx serverless s3 start &\
SLS_OFFLINE=1 poetry run yarn sls wsgi serve
# npx serverless dynamodb start --stage local &\
# npx serverless s3 start &\
SLS_OFFLINE=1 uv run uvicorn solvis_graphql_api.app:app --reload
```

then

```
AWS_PROFILE=*** SLS_OFFLINE=1 poetry run python ./solvis_graphql_api/scripts/cli.py WORKING/NSHM_v1.0.4_CompositeSolution.zip NSHM_v1.0.4 -R --ensure_table
AWS_PROFILE=*** SLS_OFFLINE=1 uv run cli WORKING/NSHM_v1.0.4_CompositeSolution.zip NSHM_v1.0.4 -R --ensure_table
```

### Unit tests

`poetry run pytest` note that some environment variables are set in `setup.cfg`.
`uv run pytest` note that some environment variables are set in `setup.cfg`.


### Push a composite solution
Expand Down
Loading
Loading