Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
39922b5
build(deps): bump packaging from 25.0 to 26.0
dependabot[bot] Feb 13, 2026
9dc1f71
build(deps): bump pycparser from 2.23 to 3.0
dependabot[bot] Feb 26, 2026
66a6372
build(deps): bump cffi from 1.17.1 to 2.0.0
dependabot[bot] Feb 26, 2026
56f6cbf
feat(tests): relax validation rules and expand enum coverage in well-…
marissafichera Feb 26, 2026
9cbaaa2
feat(tests): relax validation rules and expand enum coverage in well-…
marissafichera Mar 3, 2026
2c21ace
`test(features): align water-level CSV feature with well-inventory-st…
marissafichera Mar 3, 2026
4382fd5
Merge pull request #548 from DataIntegrationGroup/marissa
jirhiker Mar 3, 2026
32b4c54
feat(tests): add validation error handling for various invalid CSV fi…
jirhiker Mar 3, 2026
4519fc5
Update tests/features/steps/well-inventory-csv-validation-error.py
jirhiker Mar 4, 2026
2c3cde4
feat(tests): update validation error message for well_pump_type field
jirhiker Mar 4, 2026
bc89558
feat: enhance validation error handling for contact fields and improv…
jirhiker Mar 4, 2026
bc051f3
Merge pull request #582 from DataIntegrationGroup/jir-well-inventory-…
jirhiker Mar 4, 2026
5471b0b
`test(features): enforce lexicon values for water-level descriptor fi…
marissafichera Mar 4, 2026
e00cd79
Merge pull request #583 from DataIntegrationGroup/marissa-wl-csv
ksmuczynski Mar 4, 2026
814092b
feat: add normalized chemistry results materialized view and update r…
jirhiker Mar 4, 2026
884ffc6
Formatting changes
jirhiker Mar 4, 2026
8e9f4e6
feat: update environment configuration for Docker and enhance README …
jirhiker Mar 4, 2026
ae1ce5e
feat: update database service configuration in tests to use developme…
jirhiker Mar 4, 2026
181218a
feat: add minor chemistry wells materialized view and update related …
jirhiker Mar 4, 2026
8513ad0
Formatting changes
jirhiker Mar 4, 2026
e15d366
feat: add test for normalized major chemistry to ensure latest result…
jirhiker Mar 4, 2026
7cebfcc
feat: rename normalized chemistry results to major chemistry results …
jirhiker Mar 4, 2026
f2198a6
Formatting changes
jirhiker Mar 4, 2026
3b5af5a
feat: update test configuration to use specific PostGIS version and i…
jirhiker Mar 5, 2026
4312676
Merge pull request #586 from DataIntegrationGroup/jir-remove-pg_cron-…
jirhiker Mar 5, 2026
54a6686
Merge pull request #584 from DataIntegrationGroup/ogc-chemistry
jirhiker Mar 7, 2026
1e0b253
feat(schemas): add alias validation for well inventory fields
ksmuczynski Mar 7, 2026
3b2db6b
test(well_inventory): add tests for schema alias handling
ksmuczynski Mar 7, 2026
6c38157
feat(schemas): enhance well inventory schema with flexible validation…
ksmuczynski Mar 9, 2026
1d3aa13
test(features): improve error messages and enhance contact field vali…
ksmuczynski Mar 9, 2026
4d74d1b
feat(core): expand lexicon with new terms for water-related categories
ksmuczynski Mar 9, 2026
a7e0632
feat(schemas): add `monitoring_status` field to `thing` schema
ksmuczynski Mar 9, 2026
42bae2d
feat(thing_helper): add handling for `monitoring_status` in status hi…
ksmuczynski Mar 9, 2026
cc40afb
feat: add water elevation materialized view and update configuration
jirhiker Mar 9, 2026
a1fa814
Formatting changes
jirhiker Mar 9, 2026
925be66
Merge pull request #587 from DataIntegrationGroup/water-elevation-layer
jirhiker Mar 9, 2026
36e4fad
feat: update SQL queries in ngwmn_helper.py for consistent quoting an…
jirhiker Mar 9, 2026
8629b4e
Formatting changes
jirhiker Mar 9, 2026
6b493c4
Merge pull request #588 from DataIntegrationGroup/ngwmn-fix
jirhiker Mar 9, 2026
2384f11
feat: enhance SQL queries and add null handling for water data responses
jirhiker Mar 9, 2026
661f2cf
Merge pull request #589 from DataIntegrationGroup/ngwmn-fix
jirhiker Mar 9, 2026
e3e4fde
feat: fix water elevation units to feet in materialized view and upda…
jirhiker Mar 10, 2026
d8b3f71
Merge pull request #590 from DataIntegrationGroup/water-elevation-layer
jirhiker Mar 10, 2026
75f727d
feat: enhance water elevation calculations to support both meters and…
jirhiker Mar 10, 2026
60b1c01
Merge pull request #591 from DataIntegrationGroup/water-elevation-layer
jirhiker Mar 10, 2026
e64d6c8
feat: add refresh step for materialized views in production and stagi…
jirhiker Mar 10, 2026
13f0050
Merge pull request #592 from DataIntegrationGroup/water-elevation-layer
jirhiker Mar 10, 2026
7e14b06
Assess branch readiness for staging
jirhiker Mar 10, 2026
c6c1997
Formatting changes
jirhiker Mar 10, 2026
d79d761
Merge pull request #593 from DataIntegrationGroup/deployment-optimiza…
jirhiker Mar 10, 2026
6f09392
Fix OGC API boolean parsing import
jirhiker Mar 10, 2026
dbdfea2
Stabilize shared-db API tests
jirhiker Mar 10, 2026
ccc295f
Merge pull request #594 from DataIntegrationGroup/deployment-optimiza…
jirhiker Mar 10, 2026
81faed4
test(features): isolate well inventory scenarios with unique well ids…
ksmuczynski Mar 9, 2026
5bbff15
refactor(helpers): tighten helper transactions to avoid refresh and r…
ksmuczynski Mar 9, 2026
6c5d46e
feat(services): improve well inventory handling and align well invent…
ksmuczynski Mar 10, 2026
4a4e249
feat(tests): adjust validation scenarios to allow partial imports wit…
ksmuczynski Mar 10, 2026
f5530ff
feat: add restore-local-db command for restoring local databases from…
jirhiker Mar 11, 2026
3898894
Formatting changes
jirhiker Mar 11, 2026
c350555
Merge staging
ksmuczynski Mar 11, 2026
6302d80
test(features): enhance CSV reading to handle empty values and ensure…
ksmuczynski Mar 11, 2026
9742c03
fix(schemas): fix well inventory schema mismatch for `SampleMethod` a…
ksmuczynski Mar 11, 2026
86aa582
fix(contacts): allow nullable role and contact_type in well inventory…
ksmuczynski Mar 12, 2026
3072e41
test(well-inventory): preserve structural CSV fixtures in BDD setup
ksmuczynski Mar 12, 2026
dbe7074
test(well-inventory): require distinct matches for expected validatio…
ksmuczynski Mar 12, 2026
76a450c
test(well-inventory): align BDD expectations with best-effort import …
ksmuczynski Mar 12, 2026
10b0a3d
Update cli/db_restore.py
jirhiker Mar 12, 2026
6e54e0c
Update cli/db_restore.py
jirhiker Mar 12, 2026
3024a43
refactor: remove unused variable from LocalDbRestoreResult
jirhiker Mar 12, 2026
b4be5f1
refactor: remove input data limit from _get_dfs method
jirhiker Mar 12, 2026
3d17413
Merge pull request #597 from DataIntegrationGroup/restore-local-db
jirhiker Mar 12, 2026
024b5ce
build(deps-dev): bump black from 26.1.0 to 26.3.1 (#598)
dependabot[bot] Mar 12, 2026
ce742fd
test(well-inventory): align autogen placeholder tests with case-insen…
ksmuczynski Mar 13, 2026
ad86bf6
test(well-inventory): update expected values for `SampleMethod` and `…
ksmuczynski Mar 13, 2026
55872b2
test(well-inventory): expand contact tests for missing name and organ…
ksmuczynski Mar 13, 2026
8c9ea27
Merge branch 'staging' into kas-well-BDMS-626-inventory-ingestion-upd…
ksmuczynski Mar 13, 2026
517c36b
build(deps): bump pyjwt from 2.11.0 to 2.12.0 (#601)
dependabot[bot] Mar 14, 2026
8c6c25a
build(deps): bump pillow from 11.3.0 to 12.1.1
dependabot[bot] Mar 14, 2026
c74bbc7
build(deps): bump astral-sh/setup-uv in the gha-minor-and-patch group…
dependabot[bot] Mar 16, 2026
68d3843
build(deps): bump authlib from 1.6.8 to 1.6.9 (#604)
dependabot[bot] Mar 16, 2026
7143ed3
refactor(enums): update `MonitoringStatus` to use `status_value` lexi…
ksmuczynski Mar 16, 2026
8e583ea
refactor(well-inventory): update field mappings and naming convention…
ksmuczynski Mar 16, 2026
a7bad53
fix(cli): handle UTF-8 BOM in CSV decoding for well inventory import
ksmuczynski Mar 16, 2026
6d2d810
fix(well-inventory): preserve attempted water-level records when dept…
ksmuczynski Mar 16, 2026
4f2b3cd
fix(well-inventory): improve error handling for database exceptions
ksmuczynski Mar 17, 2026
b2df9ab
fix(well-inventory): normalize blank contact values and add missing o…
ksmuczynski Mar 17, 2026
27e0695
• fix(well-inventory): make CSV import reruns idempotent
ksmuczynski Mar 17, 2026
a4e9412
Merge pull request #605 from DataIntegrationGroup/kas-BDMS-626-resolv…
jacob-a-brown Mar 17, 2026
7bf0032
build(deps): bump pyasn1 from 0.6.2 to 0.6.3 (#606)
dependabot[bot] Mar 17, 2026
1e0fd84
fix(test): encore ocotilloapi_test for bdd tests
jacob-a-brown Mar 17, 2026
3ad295a
feat(test): print exit_code when assert fails
jacob-a-brown Mar 17, 2026
e768d8a
fix(contact): Make contact role and type non-nullable
jacob-a-brown Mar 17, 2026
a0ea88d
fix(test): remove print debugging statement
jacob-a-brown Mar 17, 2026
0a30676
fix(well inventory): extract role/contact_type from enum
jacob-a-brown Mar 17, 2026
0fada74
fix(test): ensure different step test names
jacob-a-brown Mar 17, 2026
965bcc7
test(well-inventory): align invalid well_hole_status scenario with de…
ksmuczynski Mar 17, 2026
bf65262
Merge pull request #607 from DataIntegrationGroup/jab-bdms-626
ksmuczynski Mar 18, 2026
1dfc24d
feat(well inventory): add groundwater level field activity for well i…
jacob-a-brown Mar 18, 2026
fe9fc0d
fix(test): compare dt aware objects for optional water level tests
jacob-a-brown Mar 18, 2026
0c9e8fa
fix(test): use enums when testing helper functions
jacob-a-brown Mar 18, 2026
815cfc6
fix(test): utilize autouse fixture to clean up tests
jacob-a-brown Mar 18, 2026
3e9dcf3
fix(test): fix failing well inventory tests
jacob-a-brown Mar 18, 2026
d6e1dc4
fix(well inventory): use correct activity type for water level records
jacob-a-brown Mar 18, 2026
b2bc17d
fix(well inventory): retrieve groundwater level reason enum value, el…
jacob-a-brown Mar 18, 2026
e899412
fix(test): ensure sample references correct field activity
jacob-a-brown Mar 18, 2026
44c598a
feat(test): ensure more robust water level tests
jacob-a-brown Mar 18, 2026
6fb61cf
Merge pull request #609 from DataIntegrationGroup/jab-bdms-626-field-…
jacob-a-brown Mar 18, 2026
fe7fba2
feat(well inventory): require measuring_point_height_ft or mp_height_…
jacob-a-brown Mar 18, 2026
1763df2
fix(test): make test name more accurate
jacob-a-brown Mar 18, 2026
4c0db46
fix(well inventory): test if mp height not None to avoid truthiness trap
jacob-a-brown Mar 18, 2026
aac5c95
fix(well inventory): check for Nones to avoid truthiness traps
jacob-a-brown Mar 18, 2026
b6e5d80
fix(test): make docstring more accurate
jacob-a-brown Mar 18, 2026
4a0f0da
fix(test): clarify docstrings
jacob-a-brown Mar 18, 2026
6df12f6
fix(test): clarify docstrings
jacob-a-brown Mar 18, 2026
6fe2bc1
Merge pull request #610 from DataIntegrationGroup/jab-bdms-626-mp-height
ksmuczynski Mar 18, 2026
c6ae994
Optimize transducer observation pagination
jirhiker Mar 19, 2026
bf7d3ab
Set Google credentials path in docker compose
jirhiker Mar 19, 2026
5488e85
Fix restore local db result payload
jirhiker Mar 19, 2026
dda88c8
Revert "Merge pull request #610 from DataIntegrationGroup/jab-bdms-62…
ksmuczynski Mar 19, 2026
771b9b3
Merge pull request #612 from DataIntegrationGroup/optimize-transducer…
jirhiker Mar 19, 2026
b80bd32
fix(cli): include staged sql path in local db restore result
ksmuczynski Mar 19, 2026
2932721
fix(well-inventory): validate invalid well_hole_status before persist…
ksmuczynski Mar 19, 2026
525a9fd
test(environment): use default test database settings for BDD runs
ksmuczynski Mar 19, 2026
a22f99a
Add actively monitored wells OGC collection
jirhiker Mar 20, 2026
e341f5f
Formatting changes
jirhiker Mar 20, 2026
1460d4f
fix(well-inventory): avoid creating empty project groups on failed im…
ksmuczynski Mar 20, 2026
3e93bb6
fix(well-inventory): treat whitespace-only lexicon values as blank
ksmuczynski Mar 20, 2026
1e4cbd4
Merge pull request #613 from DataIntegrationGroup/codex/ogc-actively-…
jirhiker Mar 20, 2026
919222e
feat: add command to import project area boundaries and create associ…
jirhiker Mar 20, 2026
4c4a833
Formatting changes
jirhiker Mar 20, 2026
73fc69e
Merge pull request #614 from DataIntegrationGroup/codex/ogc-actively-…
jirhiker Mar 20, 2026
a01e091
fix(well inventory): allow null mp heights
jacob-a-brown Mar 20, 2026
fe6cfbc
Merge branch 'kas-well-BDMS-626-inventory-ingestion-updates_v2' into …
jacob-a-brown Mar 20, 2026
6d03bf4
fix(well inventory): use one mp height for thing and gwl
jacob-a-brown Mar 20, 2026
cf7ca5a
fix(test): fix typo in doc string
jacob-a-brown Mar 20, 2026
467c87e
feat(cli): add progress updates for well inventory imports
ksmuczynski Mar 23, 2026
eb6792c
Merge pull request #615 from DataIntegrationGroup/jab-bdms-626-mp-height
ksmuczynski Mar 23, 2026
9b08049
Merge remote-tracking branch 'origin/kas-well-BDMS-626-inventory-inge…
ksmuczynski Mar 23, 2026
0ec4da9
feat(well-inventory): emit per-row progress during imports
ksmuczynski Mar 23, 2026
f482b5a
fix(well-inventory): normalize "Complete" monitoring frequency to "No…
ksmuczynski Mar 23, 2026
6c0af3a
Merge pull request #602 from DataIntegrationGroup/dependabot/uv/pillo…
jirhiker Mar 23, 2026
5fabcd1
fix(well-inventory): stop defaulting missing observation data quality…
ksmuczynski Mar 23, 2026
2493ddc
Merge pull request #494 from DataIntegrationGroup/dependabot/uv/stagi…
jirhiker Mar 23, 2026
ca8e4fa
Merge pull request #530 from DataIntegrationGroup/dependabot/uv/stagi…
jirhiker Mar 23, 2026
75d2cb5
Merge pull request #596 from DataIntegrationGroup/kas-well-BDMS-626-i…
jirhiker Mar 23, 2026
2aa4d20
Merge pull request #493 from DataIntegrationGroup/dependabot/uv/stagi…
jirhiker Mar 23, 2026
dbceb75
feat: enhance project area import with created and skipped counts
jirhiker Mar 23, 2026
989e678
Merge pull request #616 from DataIntegrationGroup/cli/import-project-…
jirhiker Mar 23, 2026
a242b36
feat: implement dynamic loading of pygeoapi app and improve descripti…
jirhiker Mar 25, 2026
2dd6628
fix: add unmatched locations to the import process and update test as…
jirhiker Mar 25, 2026
61fedba
Formatting changes
jirhiker Mar 25, 2026
4750f9d
Merge pull request #617 from DataIntegrationGroup/fix-ogc-mounting
jirhiker Mar 25, 2026
1f09e7f
build(deps): bump requests from 2.32.5 to 2.33.0 (#618)
dependabot[bot] Mar 26, 2026
53fee18
feat(water-level-import): normalize standalone CSV schema
ksmuczynski Mar 26, 2026
eccf31f
feat(water-level-import): enhance validation and resolve mp_height
ksmuczynski Mar 26, 2026
6a09881
feat(water-level-import): add idempotent groundwater persistence
ksmuczynski Mar 26, 2026
2f2f923
feat(water-level-import): add best-effort row savepoints
ksmuczynski Mar 27, 2026
250f2c7
feat: enhance GCS upload handling with async support and improved err…
jirhiker Mar 27, 2026
4c3eea0
feat(water-level-import): align partial-success API and CLI behavior
ksmuczynski Mar 27, 2026
5cfbe80
build(deps): bump ecdsa from 0.19.1 to 0.19.2 (#620)
dependabot[bot] Mar 27, 2026
355706d
Merge pull request #619 from DataIntegrationGroup/api-hardening
jirhiker Mar 27, 2026
83bc1d9
fix(well-transfer): exclude monitoring_status from Thing creation
ksmuczynski Mar 27, 2026
fa257cd
fix(water-level-import): harden real-file import cleanup
ksmuczynski Mar 27, 2026
44102db
test(bdd): align water-level CSV feature coverage with current import…
ksmuczynski Mar 27, 2026
0785cac
Formatting changes
ksmuczynski Mar 28, 2026
0e9b5af
feat: enhance GCS upload handling with async support and improved err…
jirhiker Mar 28, 2026
8407bed
Merge pull request #622 from DataIntegrationGroup/api-hardening
jirhiker Mar 28, 2026
cc296ee
build(deps): bump cryptography from 45.0.6 to 46.0.6
dependabot[bot] Mar 29, 2026
3a57354
Merge pull request #623 from DataIntegrationGroup/dependabot/uv/crypt…
jirhiker Mar 29, 2026
a7cc3c9
build(deps): bump astral-sh/setup-uv from 7.6.0 to 8.0.0
dependabot[bot] Mar 30, 2026
47f12d6
build(deps): bump codecov/codecov-action from 5 to 6
dependabot[bot] Mar 30, 2026
40fda2f
build(deps): bump the uv-non-major group with 42 updates (#626)
dependabot[bot] Mar 30, 2026
65e51c6
feat: enhance logging with debug timing for various operations and ad…
jirhiker Mar 30, 2026
8d0be60
feat: add location properties to water well response and enhance test…
jirhiker Mar 30, 2026
452fe0c
test(water-level-import): ensure unrelated observations are preserved…
ksmuczynski Mar 30, 2026
2ffbd27
feat: optimize logging for request and asset upload processes, and en…
jirhiker Mar 30, 2026
14e9066
feat: update well response validation and enhance type safety for con…
jirhiker Mar 30, 2026
16b7197
Merge pull request #631 from DataIntegrationGroup/field-compilation-o…
jirhiker Mar 30, 2026
9741d41
fix(water-level-import): skip persistence when no valid rows exist
ksmuczynski Mar 30, 2026
e0d7e45
fix(water-level-import): handle savepoint initialization failure grac…
ksmuczynski Mar 30, 2026
8490550
fix(well-transfer): defer WellTransferer external I/O until needed
ksmuczynski Mar 30, 2026
814b976
Merge pull request #624 from DataIntegrationGroup/dependabot/github_a…
jirhiker Mar 30, 2026
78e899d
Merge pull request #625 from DataIntegrationGroup/dependabot/github_a…
jirhiker Mar 30, 2026
81a016c
fix(well-transfer): improve aquifer persistence with nested savepoint…
ksmuczynski Mar 31, 2026
623206e
fix(water-level-import): refine handling of alias and canonical heade…
ksmuczynski Mar 31, 2026
fbdc18b
fix(well-transfer): preload shared elevation cache before parallel wo…
ksmuczynski Mar 31, 2026
a3ce92c
Update services/water_level_csv.py
ksmuczynski Mar 31, 2026
91aaaf4
fix(well-transfer): preload measuring point estimator before parallel…
ksmuczynski Mar 31, 2026
a2584c9
feat(water-level-csv): warn when uploaded mp height differs from well…
ksmuczynski Mar 31, 2026
6ccdc7c
Merge remote-tracking branch 'origin/kas-water-level-import' into kas…
ksmuczynski Mar 31, 2026
256af68
test(well-transfer): isolate parallel preload tests from external est…
ksmuczynski Mar 31, 2026
e4d94ae
Merge pull request #621 from DataIntegrationGroup/kas-water-level-import
ksmuczynski Mar 31, 2026
7f83e4c
fix(importers): prevent duplicate well-name collisions during CSV imp…
ksmuczynski Apr 1, 2026
ae6b153
refactor(importers): share water well lookup by Thing.name
ksmuczynski Apr 8, 2026
48ed5ce
build(deps): bump cryptography from 46.0.6 to 46.0.7 (#643)
dependabot[bot] Apr 8, 2026
1d98063
Merge pull request #632 from DataIntegrationGroup/BDMS-658-well-api-u…
jirhiker Apr 9, 2026
b2b60e5
feat(cli): add scoped transfer command for targeted imports
ksmuczynski Apr 10, 2026
f22a560
test(cli): add comprehensive unit tests and regression coverage for s…
ksmuczynski Apr 10, 2026
f7a1a98
docs(cli): add beginner's guide for scoped transfer command
ksmuczynski Apr 10, 2026
6471060
Merge pull request #645 from DataIntegrationGroup/kas-scoped-transfer…
ksmuczynski Apr 10, 2026
8cd1103
Merge pull request #633 from DataIntegrationGroup/kas-reinforce-dupli…
jirhiker Apr 13, 2026
5cfe398
feat(api/thing): Add optional flag to see contacts
TylerAdamMartinez Apr 10, 2026
03cebb9
feat(thing_helper): Query now go through search
TylerAdamMartinez Apr 10, 2026
284a2f2
Formatting changes
TylerAdamMartinez Apr 10, 2026
e4fbed0
build(deps): bump actions/github-script from 8 to 9
dependabot[bot] Apr 13, 2026
58d4518
build(deps): bump dependabot/fetch-metadata from 2 to 3
dependabot[bot] Apr 13, 2026
c449466
Merge pull request #647 from DataIntegrationGroup/dependabot/github_a…
jirhiker Apr 13, 2026
a1ae7a9
Merge pull request #648 from DataIntegrationGroup/dependabot/github_a…
jirhiker Apr 13, 2026
66ae686
build(deps): bump pytest from 9.0.2 to 9.0.3 (#649)
dependabot[bot] Apr 13, 2026
42ccd65
Merge pull request #644 from DataIntegrationGroup/TAM-BDMS-690
jirhiker Apr 13, 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 .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DB_DRIVER=postgres

POSTGRES_USER=admin
POSTGRES_PASSWORD=password
POSTGRES_DB=ocotillo
POSTGRES_DB=ocotilloapi_dev
POSTGRES_HOST=localhost
POSTGRES_PORT=5432

Expand Down
9 changes: 7 additions & 2 deletions .github/app.template.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
service: ${SERVICE_NAME}
runtime: python313
entrypoint: gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app
instance_class: F4
entrypoint: ${ENTRYPOINT}
service_account: "${CLOUD_SQL_USER}.gserviceaccount.com"
instance_class: F4
inbound_services:
- warmup
automatic_scaling:
min_instances: ${MIN_INSTANCES}
max_instances: ${MAX_INSTANCES}
handlers:
- url: /.*
secure: always
Expand Down
73 changes: 58 additions & 15 deletions .github/workflows/CD_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
contents: write

jobs:
staging-deploy:
production-deploy:

runs-on: ubuntu-latest
environment: production
Expand All @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0

- name: Install uv in container
uses: astral-sh/setup-uv@v7.3.1
uses: astral-sh/setup-uv@v8.0.0
with:
version: "latest"

Expand All @@ -47,16 +47,25 @@ jobs:
run: |
uv run alembic upgrade head

- name: Refresh materialized views on production database
env:
DB_DRIVER: "cloudsql"
CLOUD_SQL_INSTANCE_NAME: "${{ secrets.CLOUD_SQL_INSTANCE_NAME }}"
CLOUD_SQL_DATABASE: "${{ vars.CLOUD_SQL_DATABASE }}"
CLOUD_SQL_USER: "${{ secrets.CLOUD_SQL_USER }}"
CLOUD_SQL_IAM_AUTH: true
run: |
uv run python -m cli.cli refresh-pygeoapi-materialized-views

- name: Ensure envsubst is available
run: |
if ! command -v envsubst >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y gettext-base
fi

- name: Render app.yaml
- name: Render App Engine configs
env:
SERVICE_NAME: "ocotillo-api"
ENVIRONMENT: "production"
CLOUD_SQL_INSTANCE_NAME: "${{ secrets.CLOUD_SQL_INSTANCE_NAME }}"
CLOUD_SQL_DATABASE: "${{ vars.CLOUD_SQL_DATABASE }}"
Expand All @@ -77,25 +86,59 @@ jobs:
SESSION_SECRET_KEY: "${{ secrets.SESSION_SECRET_KEY }}"
APITALLY_CLIENT_ID: "${{ vars.APITALLY_CLIENT_ID }}"
run: |
export MAX_INSTANCES="10"
export SERVICE_NAME="ocotillo-api"
export ENTRYPOINT="gunicorn -w 1 -k uvicorn.workers.UvicornWorker main:app"
export MIN_INSTANCES="0"
envsubst < .github/app.template.yaml > app.yaml

- name: Deploy to Google Cloud
run: |
gcloud app deploy app.yaml --quiet --project ${{ vars.GCP_PROJECT_ID }}
gcloud app deploy \
app.yaml \
--quiet \
--project ${{ vars.GCP_PROJECT_ID }}

# Clean up old versions - delete only the oldest version, one created and one destroyed
- name: Clean up oldest version
- name: Clean up oldest versions
run: |
OLDEST_VERSION=$(gcloud app versions list --service=ocotillo-api --project=${{ vars.GCP_PROJECT_ID}} --format="value(id)" --sort-by="version.createTime" | head -n 1)
if [ ! -z "$OLDEST_VERSION" ]; then
echo "Deleting oldest version: $OLDEST_VERSION"
gcloud app versions delete $OLDEST_VERSION --service=ocotillo-api --project=${{ vars.GCP_PROJECT_ID }} --quiet
echo "Deleted oldest version: $OLDEST_VERSION"
SERVICE="ocotillo-api"
VERSIONS_JSON="$(gcloud app versions list --service="$SERVICE" --project=${{ vars.GCP_PROJECT_ID }} --format=json --sort-by="version.createTime" 2>/dev/null || printf '[]')"
export VERSIONS_JSON
DELETE_VERSION="$(python - <<'PY'
import json
import os

versions = json.loads(os.environ.get("VERSIONS_JSON", "[]") or "[]")
if len(versions) <= 1:
print("")
raise SystemExit(0)

def traffic_split(version):
for key in ("traffic_split", "trafficSplit"):
value = version.get(key)
if value is not None:
try:
return float(value)
except (TypeError, ValueError):
return 0.0
return 0.0

for version in versions:
if traffic_split(version) == 0.0:
print(version.get("id", ""))
break
else:
print("")
PY
)"
if [ -n "$DELETE_VERSION" ]; then
echo "Deleting old non-serving version for $SERVICE: $DELETE_VERSION"
gcloud app versions delete "$DELETE_VERSION" --service="$SERVICE" --project=${{ vars.GCP_PROJECT_ID }} --quiet
else
echo "No versions to delete"
echo "No old non-serving versions to delete for $SERVICE"
fi

- name: Remove app.yaml
- name: Remove rendered configs
run: |
rm app.yaml

Expand All @@ -108,5 +151,5 @@ jobs:
# ":" are not alloed in git tags, so replace with "-"
- name: Tag commit
run: |
git tag -a "production-deploy-$(date -u +%Y-%m-%d)T$(date -u +%H-%M-%S%z)" -m "staging gcloud deployment: $(date -u +%Y-%m-%d)T$(date -u +%H:%M:%S%z)"
git tag -a "production-deploy-$(date -u +%Y-%m-%d)T$(date -u +%H-%M-%S%z)" -m "production gcloud deployment: $(date -u +%Y-%m-%d)T$(date -u +%H:%M:%S%z)"
git push origin --tags
69 changes: 56 additions & 13 deletions .github/workflows/CD_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0

- name: Install uv in container
uses: astral-sh/setup-uv@v7.3.1
uses: astral-sh/setup-uv@v8.0.0
with:
version: "latest"

Expand All @@ -47,16 +47,25 @@ jobs:
run: |
uv run alembic upgrade head

- name: Refresh materialized views on staging database
env:
DB_DRIVER: "cloudsql"
CLOUD_SQL_INSTANCE_NAME: "${{ secrets.CLOUD_SQL_INSTANCE_NAME }}"
CLOUD_SQL_DATABASE: "${{ vars.CLOUD_SQL_DATABASE }}"
CLOUD_SQL_USER: "${{ secrets.CLOUD_SQL_USER }}"
CLOUD_SQL_IAM_AUTH: true
run: |
uv run python -m cli.cli refresh-pygeoapi-materialized-views

- name: Ensure envsubst is available
run: |
if ! command -v envsubst >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y gettext-base
fi

- name: Render app.yaml
- name: Render App Engine configs
env:
SERVICE_NAME: "ocotillo-api-staging"
ENVIRONMENT: "staging"
CLOUD_SQL_INSTANCE_NAME: "${{ secrets.CLOUD_SQL_INSTANCE_NAME }}"
CLOUD_SQL_DATABASE: "${{ vars.CLOUD_SQL_DATABASE }}"
Expand All @@ -77,25 +86,59 @@ jobs:
SESSION_SECRET_KEY: "${{ secrets.SESSION_SECRET_KEY }}"
APITALLY_CLIENT_ID: "${{ vars.APITALLY_CLIENT_ID }}"
run: |
export MAX_INSTANCES="10"
export SERVICE_NAME="ocotillo-api-staging"
export ENTRYPOINT="gunicorn -w 1 -k uvicorn.workers.UvicornWorker main:app"
export MIN_INSTANCES="0"
envsubst < .github/app.template.yaml > app.yaml

- name: Deploy to Google Cloud
run: |
gcloud app deploy app.yaml --quiet --project ${{ vars.GCP_PROJECT_ID }}
gcloud app deploy \
app.yaml \
--quiet \
--project ${{ vars.GCP_PROJECT_ID }}

# Clean up old versions - delete only the oldest version, one created and one destroyed
- name: Clean up oldest version
- name: Clean up oldest versions
run: |
OLDEST_VERSION=$(gcloud app versions list --service=ocotillo-api-staging --project=${{ vars.GCP_PROJECT_ID}} --format="value(id)" --sort-by="version.createTime" | head -n 1)
if [ ! -z "$OLDEST_VERSION" ]; then
echo "Deleting oldest version: $OLDEST_VERSION"
gcloud app versions delete $OLDEST_VERSION --service=ocotillo-api-staging --project=${{ vars.GCP_PROJECT_ID }} --quiet
echo "Deleted oldest version: $OLDEST_VERSION"
SERVICE="ocotillo-api-staging"
VERSIONS_JSON="$(gcloud app versions list --service="$SERVICE" --project=${{ vars.GCP_PROJECT_ID }} --format=json --sort-by="version.createTime" 2>/dev/null || printf '[]')"
export VERSIONS_JSON
DELETE_VERSION="$(python - <<'PY'
import json
import os

versions = json.loads(os.environ.get("VERSIONS_JSON", "[]") or "[]")
if len(versions) <= 1:
print("")
raise SystemExit(0)

def traffic_split(version):
for key in ("traffic_split", "trafficSplit"):
value = version.get(key)
if value is not None:
try:
return float(value)
except (TypeError, ValueError):
return 0.0
return 0.0

for version in versions:
if traffic_split(version) == 0.0:
print(version.get("id", ""))
break
else:
print("")
PY
)"
if [ -n "$DELETE_VERSION" ]; then
echo "Deleting old non-serving version for $SERVICE: $DELETE_VERSION"
gcloud app versions delete "$DELETE_VERSION" --service="$SERVICE" --project=${{ vars.GCP_PROJECT_ID }} --quiet
else
echo "No versions to delete"
echo "No old non-serving versions to delete for $SERVICE"
fi

- name: Remove app.yaml
- name: Remove rendered configs
run: |
rm app.yaml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependabot_automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
uses: dependabot/fetch-metadata@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

# Auto-approve (only matters if your branch protection requires reviews)
- name: Approve PR
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
uses: actions/github-script@v8
uses: actions/github-script@v9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jira_codex_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Set up uv (with cache)
uses: astral-sh/setup-uv@bd870193dd98cea382bc44a732c2e0d17379a16d # v4
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v4
with:
enable-cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jira_issue_on_open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
echo "jira_browse_url=${JIRA_BASE_URL}/browse/${JIRA_KEY}" >> "$GITHUB_OUTPUT"

- name: Comment Jira link back on the GitHub issue
uses: actions/github-script@v8
uses: actions/github-script@v9
env:
JIRA_KEY: ${{ steps.jira.outputs.jira_key }}
JIRA_URL: ${{ steps.jira.outputs.jira_browse_url }}
Expand Down
56 changes: 35 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,26 @@ jobs:
SESSION_SECRET_KEY: supersecretkeyforunittests
AUTHENTIK_DISABLE_AUTHENTICATION: 1

services:
postgis:
image: postgis/postgis:17-3.5
# don't test against latest. be explicit in version being tested to avoid breaking changes
# image: postgis/postgis:latest
env:
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Check out source repository
uses: actions/checkout@v6.0.2

- name: Start database (PostGIS)
run: |
docker compose build db
docker compose up -d db

- name: Wait for database readiness
run: |
for i in {1..60}; do
Expand All @@ -52,7 +63,7 @@ jobs:
exit 1

- name: Install uv
uses: astral-sh/setup-uv@v7.3.1
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
Expand Down Expand Up @@ -86,15 +97,11 @@ jobs:
run: uv run pytest -vv --durations=20 --cov --cov-report=xml --junitxml=junit.xml --ignore=tests/transfers

- name: Upload results to Codecov
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v6
with:
report_type: test_results
token: ${{ secrets.CODECOV_TOKEN }}

- name: Stop database
if: always()
run: docker compose down -v

bdd-tests:
runs-on: ubuntu-latest

Expand All @@ -116,15 +123,26 @@ jobs:
AUTHENTIK_DISABLE_AUTHENTICATION: 1
DROP_AND_REBUILD_DB: 1

services:
postgis:
image: postgis/postgis:17-3.5
# don't test against latest. be explicit in version being tested to avoid breaking changes
# image: postgis/postgis:latest
env:
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Check out source repository
uses: actions/checkout@v6.0.2

- name: Start database (PostGIS)
run: |
docker compose build db
docker compose up -d db

- name: Wait for database readiness
run: |
for i in {1..60}; do
Expand All @@ -137,7 +155,7 @@ jobs:
exit 1

- name: Install uv
uses: astral-sh/setup-uv@v7.3.1
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
Expand Down Expand Up @@ -169,7 +187,3 @@ jobs:

- name: Run BDD tests
run: uv run behave tests/features --tags="@backend and @production and not @skip" --no-capture

- name: Stop database
if: always()
run: docker compose down -v
Loading
Loading