Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1007 commits
Select commit Hold shift + click to select a range
f2b53c2
refactor: organize API and implement thing helper functions
jacob-a-brown Aug 26, 2025
151bf37
test: implement GET tests for water well things
jacob-a-brown Aug 26, 2025
7fd1fe1
test: implement get spring thing tests
jacob-a-brown Aug 26, 2025
87024e4
feat: refactor asset transfer and CSV reading logic for improved main…
jirhiker Aug 27, 2025
62f965a
Formatting changes
jirhiker Aug 27, 2025
11b2eee
refactor: revert to pre-production transfers/
jacob-a-brown Aug 27, 2025
245c1cd
ci: remove assets
jacob-a-brown Aug 27, 2025
5a1a81d
Merge branch 'jab-api-coverage-lexicon' into jab-api-coverage-thing
jacob-a-brown Aug 27, 2025
4120d35
feat: implement GET well screens
jacob-a-brown Aug 27, 2025
03a7f52
feat: implement GET thing id link
jacob-a-brown Aug 27, 2025
03f8343
refactor: remove location info from thing responses
jacob-a-brown Aug 27, 2025
a0a9de4
Merge pull request #106 from DataIntegrationGroup/jab-api-coverage-le…
jirhiker Aug 27, 2025
3b9d8b9
feat: implement POST water well
jacob-a-brown Aug 27, 2025
67a20a9
fix: remove location/thing artifact
jacob-a-brown Aug 27, 2025
d69b0ca
feat: add functions to handle alternate site IDs and PLSS links in tr…
jirhiker Aug 27, 2025
c67c704
Formatting changes
jirhiker Aug 27, 2025
c7887bd
feat: add site ID handling and improve location creation logic
jirhiker Aug 27, 2025
d7b7223
Formatting changes
jirhiker Aug 27, 2025
b5ab395
feat: enhance well data handling by adding NMA primary key and reorga…
jirhiker Aug 27, 2025
4fb09d1
Formatting changes
jirhiker Aug 27, 2025
f0e9bc1
feat: implement POST well screen
jacob-a-brown Aug 27, 2025
15aede3
doc: remove outdate note
jacob-a-brown Aug 27, 2025
04d587e
feat: implement POST thing id link
jacob-a-brown Aug 27, 2025
6815ee9
feat: enable location's name to be PATCHed
jacob-a-brown Aug 27, 2025
c0bc1df
feat: improve link ID handling by adding null checks and enhancing da…
jirhiker Aug 28, 2025
ea66f72
Formatting changes
jirhiker Aug 28, 2025
d46710d
fix: close all database sessions
jacob-a-brown Aug 28, 2025
ee93a3f
fix: change tests to use spring/water well fixtures
jacob-a-brown Aug 28, 2025
a9d5294
feat: add functions to retrieve state, county, and quad name from geo…
jirhiker Aug 28, 2025
9c7a131
Formatting changes
jirhiker Aug 28, 2025
b435dcd
feat: add elevation retrieval function and refactor location creation…
jirhiker Aug 28, 2025
c26c4a6
Formatting changes
jirhiker Aug 28, 2025
4d7813a
refactor: let thing_type by set by request or string
jacob-a-brown Aug 28, 2025
626ef37
feat: implement group transfer functionality and add projects CSV
jirhiker Aug 28, 2025
039f978
Formatting changes
jirhiker Aug 28, 2025
04aa5ae
fix: correct GCS_SERVICE_ACCOUNT_KEY echo syntax and update relations…
jirhiker Aug 25, 2025
1619181
fix: update staging deployment configuration for dev environment
jirhiker Aug 25, 2025
e919636
fix: correct syntax for GCS_SERVICE_ACCOUNT_KEY in staging deployment…
jirhiker Aug 25, 2025
159f169
fix: correct syntax for GCS_SERVICE_ACCOUNT_KEY in staging deployment…
jirhiker Aug 25, 2025
2e3f007
fix: correct syntax for GCS_SERVICE_ACCOUNT_KEY in staging deployment…
jirhiker Aug 25, 2025
44461ea
fix: correct syntax for GCS_SERVICE_ACCOUNT_KEY in staging deployment…
jirhiker Aug 25, 2025
2e9c5ca
fix: add debug prints for GCS_SERVICE_ACCOUNT_KEY in production mode
jirhiker Aug 26, 2025
8d01b4c
fix: add debug prints for GCS_SERVICE_ACCOUNT_KEY in production mode
jirhiker Aug 26, 2025
32ca139
fix: update debug prints for GCS_SERVICE_ACCOUNT_KEY and correct YAML…
jirhiker Aug 26, 2025
9e13319
Formatting changes
jirhiker Aug 26, 2025
874d28c
fix: escape single quotes for GCS_SERVICE_ACCOUNT_KEY in staging depl…
jirhiker Aug 26, 2025
26f36ac
fix: update GCS_SERVICE_ACCOUNT_KEY syntax in staging deployment conf…
jirhiker Aug 26, 2025
ed6dae2
fix: decode GCS_SERVICE_ACCOUNT_KEY from base64 in production mode
jirhiker Aug 26, 2025
1d3033f
fix: remove debug print for GCS_SERVICE_ACCOUNT_KEY in production mode
jirhiker Aug 26, 2025
b0f2dc7
feat: add dev deployment configuration for Google Cloud
jirhiker Aug 26, 2025
2210710
fix: update deployment configuration name from Staging to Development
jirhiker Aug 26, 2025
e2df3fa
fix: remove unnecessary git setup and tagging steps from dev deployme…
jirhiker Aug 26, 2025
d8020d3
refactor: rename lexicon.py lexicon_helper.py for standard style
jacob-a-brown Aug 23, 2025
db0c073
feat: allow user to add multiple categories for a new term
jacob-a-brown Aug 23, 2025
32c8b62
feat: allow user to add multiple categories for a new term
jacob-a-brown Aug 23, 2025
e2c0359
refactor: if no TermCategoryAssociation return empty list
jacob-a-brown Aug 23, 2025
3d73ce8
feat: implement tests to add lexicon terms
jacob-a-brown Aug 23, 2025
fe35097
refactor: organize lexicon api
jacob-a-brown Aug 25, 2025
46bb189
feat: implement GET lexicon terms and by ID
jacob-a-brown Aug 25, 2025
990e922
test: implement test GET by ID 404 not found
jacob-a-brown Aug 25, 2025
cd6d147
feat: implement PATCH lexicon term
jacob-a-brown Aug 25, 2025
beba963
feat: implement DELETE lexicon term
jacob-a-brown Aug 25, 2025
4e82be2
test: implement POST test for category
jacob-a-brown Aug 25, 2025
cc79934
refactor: update init_lexicon and lexicon.json to allow term to be as…
jacob-a-brown Aug 25, 2025
ad7ee46
refactor: make transfers2 calleable as module from root directory
jacob-a-brown Aug 26, 2025
299f8af
feat: implement GET lexicon category
jacob-a-brown Aug 26, 2025
5696257
doc: update README about staging data
jacob-a-brown Aug 26, 2025
6fd0b57
feat: have Pydantic serialize response for PATCH lexicon
jacob-a-brown Aug 26, 2025
019b443
refactor: connect term/category through their IDs
jacob-a-brown Aug 26, 2025
403d36b
feat: test PATCH category
jacob-a-brown Aug 26, 2025
e2a0e75
feat: enable DELETE lexicon category
jacob-a-brown Aug 26, 2025
36d6839
feat: POST lexicon triple endpoint and tests
jacob-a-brown Aug 26, 2025
0f467b9
feat: implement GET lexicon triple
jacob-a-brown Aug 26, 2025
48e56f8
feat: implement PATCH lexicon triple
jacob-a-brown Aug 26, 2025
50a882d
refactor: consolidate lexicon tests
jacob-a-brown Aug 26, 2025
992408d
feat: implement DELETE lexicon triple
jacob-a-brown Aug 26, 2025
0d58588
refactor: rename Lexicon LexiconTerm and Category LexiconCategory
jacob-a-brown Aug 26, 2025
36874fe
refactor: move adder to crud_helper and rename model_adder
jacob-a-brown Aug 26, 2025
4fa694e
fix: add assets to import
jacob-a-brown Aug 26, 2025
164f59e
refactor: revert to pre-production transfers/
jacob-a-brown Aug 27, 2025
2938784
ci: remove assets
jacob-a-brown Aug 27, 2025
f71df86
refactor: refactored transfer2 script
jirhiker Aug 26, 2025
67a7843
feat: refactor asset transfer and CSV reading logic for improved main…
jirhiker Aug 27, 2025
ccfc998
Formatting changes
jirhiker Aug 27, 2025
35fc7aa
feat: implement group transfer functionality and add projects CSV
jirhiker Aug 28, 2025
d0d5dc7
feat: implement PATCH water well
jacob-a-brown Aug 28, 2025
380feee
feat: implement PATCH spring thing
jacob-a-brown Aug 28, 2025
1fa14d6
feat: implement PATCH thing id link
jacob-a-brown Aug 28, 2025
bfefba8
feat: implement PATCH well screen
jacob-a-brown Aug 28, 2025
add9f71
feat: implement DELETE for all thing models
jacob-a-brown Aug 28, 2025
6420519
Merge branch 'pre-production' into jab-api-coverage-thing
jacob-a-brown Aug 28, 2025
1cb1e84
feat: refactor initialization logic and enhance location handling
jirhiker Aug 28, 2025
55d03c9
Merge branch 'pre-production' into jir-transfer
jirhiker Aug 28, 2025
79e2af9
Formatting changes
jirhiker Aug 28, 2025
05963f7
Merge pull request #108 from DataIntegrationGroup/jab-api-coverage-thing
jirhiker Aug 28, 2025
f191996
Merge pull request #107 from DataIntegrationGroup/jir-transfer
jirhiker Aug 28, 2025
401cd25
feat: update location point format to include Z coordinate
jirhiker Aug 29, 2025
b2418e7
feat: add role extraction for owner contacts in transfer process
jirhiker Aug 29, 2025
3dc61cf
Formatting changes
jirhiker Aug 29, 2025
4f4157e
feat: enhance deployment configurations and refactor transfer logic
jirhiker Aug 29, 2025
241dfcb
Formatting changes
jirhiker Aug 29, 2025
404eeae
feat: rename transfer2 to transfer
jirhiker Aug 29, 2025
c6eef24
Merge pull request #109 from DataIntegrationGroup/jir-hot-testing-fix
jirhiker Aug 29, 2025
a664d2b
feat: rename transfer2 to transfer
jirhiker Aug 29, 2025
29e8c2e
Merge branch 'pre-production' into jir-transfer3
jirhiker Aug 29, 2025
a5a4e58
Merge pull request #110 from DataIntegrationGroup/jir-transfer3
jirhiker Aug 29, 2025
a11ee6b
feat: enhance contact creation and improve thing retrieval logic
jirhiker Aug 30, 2025
38948a3
Formatting changes
jirhiker Aug 30, 2025
a75e05b
Bump authlib from 1.6.1 to 1.6.3
dependabot[bot] Sep 1, 2025
005012e
Bump typing-extensions from 4.14.1 to 4.15.0
dependabot[bot] Sep 1, 2025
5ab64a1
feat: add warmup endpoint and load environment variables
jirhiker Sep 1, 2025
c64e5b4
Formatting changes
jirhiker Sep 1, 2025
a7d48f1
refactor: addressed pr feedback
jirhiker Sep 2, 2025
c3abfef
Formatting changes
jirhiker Sep 2, 2025
26ede4d
Merge pull request #111 from DataIntegrationGroup/jir-support-ui
jirhiker Sep 2, 2025
4fa8d15
Bump pandas from 2.3.1 to 2.3.2
dependabot[bot] Sep 2, 2025
ba183e3
refactor: remove thing_id from sample response
jacob-a-brown Sep 2, 2025
06c0e7c
feat: create base Create, Update, Response schemas
jacob-a-brown Sep 2, 2025
fb103c0
refactor: make add_contacts flexible for schema/model updates
jacob-a-brown Sep 2, 2025
ed7dea8
feat: require release_status for all create, optional for all update
jacob-a-brown Sep 2, 2025
141ea71
feat: ensure all thing endpoints return active_location
jacob-a-brown Sep 2, 2025
398cae6
fix: close sessions in conftest
jacob-a-brown Sep 2, 2025
6b70cea
feat: ensure all endpoints are async
jacob-a-brown Sep 2, 2025
f1f81ad
Merge pull request #117 from DataIntegrationGroup/jab-release-status-…
jirhiker Sep 2, 2025
a3a2205
feat: created transfer branch for cloud build
jirhiker Sep 3, 2025
1e4665b
Formatting changes
jirhiker Sep 3, 2025
d9b0488
feat: update asset transfer logic to handle filenames correctly
jirhiker Sep 3, 2025
0689d77
Formatting changes
jirhiker Sep 3, 2025
3fcccb4
feat: add missing fields from nm aquifer to contact
jacob-a-brown Sep 3, 2025
e3a834c
feat: ensure name or organization are populated
jacob-a-brown Sep 3, 2025
bde2d19
test: update tests for new fields/schemas
jacob-a-brown Sep 3, 2025
2426eaa
feat: update contact transfer for new fields
jacob-a-brown Sep 3, 2025
b422780
refactor: rename owners to contacts for consistent style
jacob-a-brown Sep 3, 2025
92f6268
refactor: enable transfers to be called from root dir
jacob-a-brown Sep 3, 2025
ddbb9f6
feat: added clear print statements to help navigate transfers
jacob-a-brown Sep 3, 2025
8ca80e1
feat: add company to owners data
jacob-a-brown Sep 3, 2025
a08439e
feat: ensure name/organization are not both null on update
jacob-a-brown Sep 3, 2025
99e71ec
Merge pull request #119 from DataIntegrationGroup/jab-contact-updates
jirhiker Sep 3, 2025
37d691b
Merge branch 'pre-production' into transfer
jirhiker Sep 3, 2025
0b6e98c
feat: update contact transfer logic to extract roles from OwnerCommen…
jirhiker Sep 3, 2025
3cdd19b
Formatting changes
jirhiker Sep 3, 2025
197c061
feat: update contact and group transfer logic to use new CSV filename…
jirhiker Sep 4, 2025
3907d7a
Formatting changes
jirhiker Sep 4, 2025
ff6c51b
feat: add health check endpoint and middleware for improved service m…
jirhiker Sep 4, 2025
bdad4d9
Formatting changes
jirhiker Sep 4, 2025
6398a02
feat: add FastAPI entrypoint with trigger endpoint for transfer service
jirhiker Sep 4, 2025
5cc8fae
Formatting changes
jirhiker Sep 4, 2025
afdbecc
fix: fix not-null name/organization constraints
jacob-a-brown Sep 4, 2025
fda9d27
feat: add main entry point for FastAPI application with configurable …
jirhiker Sep 4, 2025
9ca5c14
Formatting changes
jirhiker Sep 4, 2025
a4dce0c
feat: remove uvicorn entrypoint and add Procfile for Gunicorn deployment
jirhiker Sep 4, 2025
0fdb227
Formatting changes
jirhiker Sep 4, 2025
9f515b5
feat: update Procfile to use UvicornWorker for Gunicorn deployment
jirhiker Sep 4, 2025
121dabc
WIP: adding nma pk wellscreens to well screens
jacob-a-brown Sep 4, 2025
7428d07
feat: type hint contact tables with Mapped
jacob-a-brown Sep 4, 2025
aaf5141
feat: enable contact to have editable contact type
jacob-a-brown Sep 4, 2025
8ba1f46
feat: make primary/secondary contact type, not role
jacob-a-brown Sep 4, 2025
007bdc7
feat: add requirements_transfer.txt for transfer service dependencies
jirhiker Sep 4, 2025
487234b
refactor: use Pydantic to validate incoming data
jacob-a-brown Sep 4, 2025
53e8f6d
feat: add requirements.txt for transfer service dependencies
jirhiker Sep 4, 2025
d316cd7
feat: add psycopg-binary dependency to pyproject.toml and update lock…
jirhiker Sep 4, 2025
e182688
feat: simplify requirements.txt by removing direct file references
jirhiker Sep 4, 2025
3c1b91a
feat: use uv requirements
jirhiker Sep 4, 2025
b19e53f
feat: update psycopg dependencies to use psycopg2-binary and remove p…
jirhiker Sep 4, 2025
6073590
style: use pydantic to validate well screens
jacob-a-brown Sep 4, 2025
a352adf
refactor: infer nullability from Mapped annotation
jacob-a-brown Sep 4, 2025
03e4509
Merge pull request #120 from DataIntegrationGroup/jab-contact-updates
jirhiker Sep 4, 2025
64e36c0
Merge branch 'pre-production' into transfer
jirhiker Sep 4, 2025
98db56b
Merge branch 'pre-production' into jab-contact-updates
jacob-a-brown Sep 4, 2025
c30feb6
Merge branch 'jab-contact-updates' into jab-well-screen-updates
jacob-a-brown Sep 4, 2025
5dcb5cb
refactor: redo annotations for mapped columns
jacob-a-brown Sep 4, 2025
b6fa6ad
Merge pull request #121 from DataIntegrationGroup/jab-well-screen-upd…
jirhiker Sep 5, 2025
986e6b2
Formatting changes
jirhiker Sep 5, 2025
7f06627
feat: update Procfile to use transfers.entrypoint for web server
jirhiker Sep 5, 2025
db8967d
Merge branch 'pre-production' into transfer
jirhiker Sep 5, 2025
14a9961
feat: enhance contact transfer logic and reduce batch limit
jirhiker Sep 5, 2025
a182088
Formatting changes
jirhiker Sep 5, 2025
bd9bc86
feat: add wells endpoint and health check to transfer service
jirhiker Sep 5, 2025
936814e
Formatting changes
jirhiker Sep 5, 2025
0b09d6b
feat: add wells endpoint and health check to transfer service
jirhiker Sep 5, 2025
ee11ade
feat: update wells endpoint to support pagination with start index an…
jirhiker Sep 5, 2025
6bc8f69
Formatting changes
jirhiker Sep 5, 2025
764e39f
feat: update health check endpoint to use POST method with JSON payload
jirhiker Sep 5, 2025
d86240e
refactor: update model syntax to conform to the latest type-hinting/m…
ksmuczynski Sep 7, 2025
6425e65
refactor: update relationships in the LocationThingAssociation model …
ksmuczynski Sep 8, 2025
c5df34f
feat: add new fields and relationship to Location model
ksmuczynski Sep 8, 2025
2f47ccc
Formatting changes
ksmuczynski Sep 8, 2025
217f643
refactor: import UUID and reference to Thing model
ksmuczynski Sep 8, 2025
14babdd
refactor: import UUID from uuid
ksmuczynski Sep 8, 2025
1914032
refactor: remove import reference to db.Thing
ksmuczynski Sep 8, 2025
69e1df2
Merge pull request #122 from DataIntegrationGroup/location_model_upda…
jirhiker Sep 8, 2025
c62a2cf
Merge pull request #116 from DataIntegrationGroup/dependabot/uv/pre-p…
jacob-a-brown Sep 9, 2025
1cb9a14
Merge pull request #115 from DataIntegrationGroup/dependabot/uv/pre-p…
jacob-a-brown Sep 9, 2025
8ffd6fa
Bump phonenumbers from 9.0.12 to 9.0.13
dependabot[bot] Sep 9, 2025
0e24285
Bump sqlalchemy-utils from 0.41.2 to 0.42.0
dependabot[bot] Sep 9, 2025
b987b1a
Merge pull request #114 from DataIntegrationGroup/dependabot/uv/pre-p…
jacob-a-brown Sep 9, 2025
4ee1286
Merge pull request #113 from DataIntegrationGroup/dependabot/uv/pre-p…
jacob-a-brown Sep 9, 2025
0f435be
Merge pull request #112 from DataIntegrationGroup/dependabot/uv/pre-p…
jacob-a-brown Sep 9, 2025
d549947
feat: add missing fields
ksmuczynski Sep 9, 2025
3bc45f0
feat: add missing fields
ksmuczynski Sep 9, 2025
8936a2b
feat: add missing fields to the CREATE schema
ksmuczynski Sep 9, 2025
011fa73
feat: add missing fields to the RESPONSE schema
ksmuczynski Sep 9, 2025
fa95778
feat: add missing fields to the RESPONSE schema
ksmuczynski Sep 9, 2025
1f796f0
feat: add missing fields to the CREATE schema
ksmuczynski Sep 9, 2025
75c4782
refactor: relocate `notes` field so it matches the field order in th…
ksmuczynski Sep 9, 2025
afe97ab
feat: add missing fields to the RESPONSE schema
ksmuczynski Sep 9, 2025
f83b127
feat: add missing fields to the UPDATE schema
ksmuczynski Sep 9, 2025
1f359eb
refactor: remove `county` and `quad_name` fields from UPDATE schema.
ksmuczynski Sep 9, 2025
7ccbb48
refactor: remove `state`, `county`, `quad_name` fields from CREATE sc…
ksmuczynski Sep 9, 2025
956eb65
feat: add missing payload fields and `assert` statements to the POST …
ksmuczynski Sep 9, 2025
2ced402
refactor: reorder payload fields to match UPDATE schema
ksmuczynski Sep 9, 2025
af1f7bb
feat: add missing payload fields
ksmuczynski Sep 9, 2025
ed5f147
feat: add missing `assert` statements to PATCH test
ksmuczynski Sep 9, 2025
c987748
feat: add missing fields to location fixture in support of updating t…
ksmuczynski Sep 9, 2025
28071fa
feat: add missing `assert` statements to GET test
ksmuczynski Sep 9, 2025
37543c4
feat: add multiple transfer endpoints for assets, contacts, groups, a…
jirhiker Sep 9, 2025
c6d8836
Formatting changes
jirhiker Sep 9, 2025
4610105
feat: add missing fields to `make_location` function
ksmuczynski Sep 9, 2025
da0bfa1
refactor: add note about the mapping of PointID to location.name
ksmuczynski Sep 9, 2025
3fe448b
feat: add all lookup tables to lexicon
jacob-a-brown Sep 9, 2025
384718d
feat: update README to discuss revisions
jacob-a-brown Sep 9, 2025
5ac0efa
Formatting changes
ksmuczynski Sep 9, 2025
8307ae0
feat: implement public OpenAPI schema and enhance Swagger UI integration
jirhiker Sep 10, 2025
09d880b
Formatting changes
jirhiker Sep 10, 2025
864e785
feat: enable logging for transfers
jacob-a-brown Sep 10, 2025
b241f89
refactor: update level_status for new lexicon
jacob-a-brown Sep 10, 2025
f75dae9
Merge pull request #124 from DataIntegrationGroup/jir-public-openapi-…
jirhiker Sep 10, 2025
b7c8f8f
refactor: remove `coordiante_accuracy_unit` field from the database m…
ksmuczynski Sep 10, 2025
e86a0b0
feat: add missing fields to `test_get_location_by_id` function.
ksmuczynski Sep 10, 2025
f5f4af2
refactor: update `county` name to a valid lexicon term.
ksmuczynski Sep 10, 2025
db8fc0e
feat: git ignore transfer log files
jacob-a-brown Sep 10, 2025
3e7156d
feat: write new log files with timestamps
jacob-a-brown Sep 10, 2025
4ea1d66
refactor: remove formation and lithology until they are cleaned
jacob-a-brown Sep 10, 2025
6ce68bb
Merge pull request #126 from DataIntegrationGroup/jab-lexicon-updates
jirhiker Sep 10, 2025
263397e
Merge branch 'pre-production' into location_model_update_kas
ksmuczynski Sep 10, 2025
072e586
feat: update service name to ocotillo-api-staging in deployment confi…
jirhiker Sep 11, 2025
eebf76e
Merge pull request #125 from DataIntegrationGroup/jab-transfer-logging
jirhiker Sep 11, 2025
909ee35
Merge branch 'transfer' into jab-transfer-logging
jacob-a-brown Sep 11, 2025
49225bf
fix: set dtype for OSEWelltagID
jacob-a-brown Sep 11, 2025
b0d1338
feat: redirect errors to log
jacob-a-brown Sep 11, 2025
8087192
fix: set limit correctly for well transfer
jacob-a-brown Sep 11, 2025
7bdf53d
refactor: update lexicon-referenced fields with valid lexicon values
ksmuczynski Sep 11, 2025
c17ecb3
refactor: populate db credentials file for docker
ksmuczynski Sep 11, 2025
076c024
fix: remove print debugging statement
jacob-a-brown Sep 11, 2025
3a8c042
Merge branch 'transfer' into jab-transfer-logging
jacob-a-brown Sep 11, 2025
ab381ad
Merge pull request #127 from DataIntegrationGroup/jir-staging
jirhiker Sep 11, 2025
d39b956
Merge pull request #123 from DataIntegrationGroup/location_model_upda…
jirhiker Sep 11, 2025
5e7a2c2
feat: validate addresses with pydantic
jacob-a-brown Sep 11, 2025
1565bef
Merge branch 'pre-production' into jab-transfer-logging
jacob-a-brown Sep 11, 2025
d19fc51
Merge pull request #128 from DataIntegrationGroup/jab-transfer-logging
jirhiker Sep 12, 2025
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.venv
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
DB_DRIVER=postgres

POSTGRES_USER=admin
POSTGRES_PASSWORD=password
POSTGRES_DB=

# asset storage
GCS_BUCKET_NAME=
GOOGLE_APPLICATION_CREDENTIALS=/path/to/gcs_credentials.json
12 changes: 12 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839


tests
migration
gcs_credentials.json
launcher.sh
test.sh
docker/*
alembic/*
.gitattributes
.git/*

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
Expand Down Expand Up @@ -210,6 +221,7 @@ celerybeat.pid
.venv
env/
venv/
.venv/*
ENV/
env.bak/
venv.bak/
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
83 changes: 83 additions & 0 deletions .github/workflows/dev_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CD (Development)

on:
push:
branches: [dev]

permissions:
contents: write

jobs:
staging-deploy:

runs-on: ubuntu-latest
environment: staging

steps:
- name: Check out source repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install uv in container
uses: astral-sh/setup-uv@v6
with:
version: "latest"

- name: Generate requirements.txt
run: |
uv export -o requirements.txt

- name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.CLOUD_DEPLOY_SERVICE_ACCOUNT_KEY }}

# Uses Google Cloud Secret Manager to store secret credentials
- name: Create app.yaml
run: |
echo "service: dev-ocotillo-api" > app.yaml
echo "runtime: python313" >> app.yaml
echo "entrypoint: gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app" >> app.yaml
echo "instance_class: F4" >> app.yaml
echo "inbound_services:" >> app.yaml
echo " - warmup" >> app.yaml
echo "automatic_scaling:" >> app.yaml
echo " min_instances: 0" >> app.yaml
echo " max_instances: 10" >> app.yaml
echo "" >> app.yaml
echo "env_variables:" >> app.yaml
echo " MODE: \"production\"" >> app.yaml
echo " DB_DRIVER: \"cloudsql\"" >> app.yaml
echo " CLOUD_SQL_INSTANCE_NAME: \"${{ secrets.CLOUD_SQL_INSTANCE_NAME }}\"" >> app.yaml
echo " CLOUD_SQL_DATABASE: \"${{ secrets.CLOUD_SQL_DATABASE }}\"" >> app.yaml
echo " CLOUD_SQL_USER: \"${{ secrets.CLOUD_SQL_USER }}\"" >> app.yaml
echo " CLOUD_SQL_PASSWORD: \"${{ secrets.CLOUD_SQL_PASSWORD }}\"" >> app.yaml
echo " GCS_SERVICE_ACCOUNT_KEY: \"${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}\"" >> app.yaml
echo " GCS_BUCKET_NAME: \"${{secrets.GCS_BUCKET_NAME}}\"" >> app.yaml
echo " AUTHENTIK_URL: \"${{secrets.AUTHENTIK_URL}}\"" >> app.yaml
echo " AUTHENTIK_CLIENT_ID: \"${{secrets.AUTHENTIK_CLIENT_ID}}\"" >> app.yaml
echo " AUTHENTIK_AUTHORIZE_URL: \"${{secrets.AUTHENTIK_AUTHORIZE_URL}}\"" >> app.yaml
echo " AUTHENTIK_TOKEN_URL: \"${{secrets.AUTHENTIK_TOKEN_URL}}\"" >> app.yaml


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

# Clean up old versions - delete only the oldest version, one created and one destroyed
- name: Clean up oldest version
run: |
OLDEST_VERSION=$(gcloud app versions list --service=dev-ocotillo-api --project=${{ secrets.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=dev-ocotillo-api --project=${{ secrets.GCP_PROJECT_ID }} --quiet
echo "Deleted oldest version: $OLDEST_VERSION"
else
echo "No versions to delete"
fi

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

94 changes: 94 additions & 0 deletions .github/workflows/staging_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: CD (Staging)

on:
push:
branches: [pre-production]

permissions:
contents: write

jobs:
staging-deploy:

runs-on: ubuntu-latest
environment: staging

steps:
- name: Check out source repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install uv in container
uses: astral-sh/setup-uv@v6
with:
version: "latest"

- name: Generate requirements.txt
run: |
uv export -o requirements.txt

- name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.CLOUD_DEPLOY_SERVICE_ACCOUNT_KEY }}

# Uses Google Cloud Secret Manager to store secret credentials
- name: Create app.yaml
run: |
echo "service: ocotillo-api-staging" > app.yaml
echo "runtime: python313" >> app.yaml
echo "entrypoint: gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app" >> app.yaml
echo "instance_class: F4" >> app.yaml
echo "inbound_services:" >> app.yaml
echo " - warmup" >> app.yaml
echo "automatic_scaling:" >> app.yaml
echo " min_instances: 0" >> app.yaml
echo " max_instances: 10" >> app.yaml
echo "" >> app.yaml
echo "env_variables:" >> app.yaml
echo " MODE: \"production\"" >> app.yaml
echo " DB_DRIVER: \"cloudsql\"" >> app.yaml
echo " CLOUD_SQL_INSTANCE_NAME: \"${{ secrets.CLOUD_SQL_INSTANCE_NAME }}\"" >> app.yaml
echo " CLOUD_SQL_DATABASE: \"${{ secrets.CLOUD_SQL_DATABASE }}\"" >> app.yaml
echo " CLOUD_SQL_USER: \"${{ secrets.CLOUD_SQL_USER }}\"" >> app.yaml
echo " CLOUD_SQL_PASSWORD: \"${{ secrets.CLOUD_SQL_PASSWORD }}\"" >> app.yaml
echo " GCS_SERVICE_ACCOUNT_KEY: \"${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}\"" >> app.yaml
echo " GCS_BUCKET_NAME: \"${{secrets.GCS_BUCKET_NAME}}\"" >> app.yaml
echo " AUTHENTIK_URL: \"${{secrets.AUTHENTIK_URL}}\"" >> app.yaml
echo " AUTHENTIK_CLIENT_ID: \"${{secrets.AUTHENTIK_CLIENT_ID}}\"" >> app.yaml
echo " AUTHENTIK_AUTHORIZE_URL: \"${{secrets.AUTHENTIK_AUTHORIZE_URL}}\"" >> app.yaml
echo " AUTHENTIK_TOKEN_URL: \"${{secrets.AUTHENTIK_TOKEN_URL}}\"" >> app.yaml


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

# Clean up old versions - delete only the oldest version, one created and one destroyed
- name: Clean up oldest version
run: |
OLDEST_VERSION=$(gcloud app versions list --service=ocotillo-api-staging --project=${{ secrets.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=${{ secrets.GCP_PROJECT_ID }} --quiet
echo "Deleted oldest version: $OLDEST_VERSION"
else
echo "No versions to delete"
fi

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

# Use PR author's username as git user name
- name: Set up git user
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"

# ":" are not alloed in git tags, so replace with "-"
- name: Tag commit
run: |
git tag -a "staging-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 push origin --tags
32 changes: 16 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ name: Tests

on:
pull_request:
branches: [ "main",'pre-production']
branches: [ "main",'pre-production', 'transfer']

permissions:
contents: read

jobs:
build:
run-tests:
runs-on: ubuntu-latest

services:
postgis_timescaledb:
image: ghcr.io/dataintegrationgroup/nmdms:latest
postgis:
# image: ghcr.io/dataintegrationgroup/nmdms:latest
# image: postgres
# image: postgis/postgis:latest
image: postgis/postgis:latest
# image: postgis/postgis:17-3.5
# image: timescale/timescaledb:2.18.0-pg17
env:
Expand Down Expand Up @@ -63,15 +63,15 @@ jobs:
DB_DRIVER: postgres
# SPATIALITE_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu/mod_spatialite.so

run: uv run pytest -vv --durations=20 --junitxml=junit.xml
run: uv run pytest -vv --durations=20 --cov --cov-report=xml --junitxml=junit.xml

# - name: Upload results to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
#
# - name: Upload test results to Codecov
# if: ${{ !cancelled() }}
# uses: codecov/test-results-action@v1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ wheels/

# Virtual environments
.venv

requirements.txt

# JetBrains IDEs
.idea/
Expand All @@ -20,8 +20,11 @@ development.db
.env
reset_db.sh
tests/uploads

migrate.sh
launcher.sh
gcs_credentials.json
transfers/data/assets*
transfers/transfer*.log

# deployment files
app.yaml
alembic.ini
app.yaml
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
repos:
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
args: [
'--count',
'--select=E9,F63,F7,F82,F401,F541,F631,F634,F701,F702',
'--show-source',
'--statistics'
]
exclude: ^db/__init__.py$ # all models need to be imported for Alembic, but are not used directly

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.10.0 # Use the latest stable version or pin to your preference
# hooks:
# - id: mypy
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn -b :8080 transfers.entrypoint:app -k uvicorn.workers.UvicornWorker
Loading
Loading