From 10423a164966c869773ddd5c6cd1bd191cc7afa2 Mon Sep 17 00:00:00 2001 From: Chase Martin Date: Thu, 15 Jan 2026 22:47:55 -0800 Subject: [PATCH 1/5] fix: remove db seed from cypress ci since mode development does this automatically --- .github/workflows/CI_cypress.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI_cypress.yml b/.github/workflows/CI_cypress.yml index b4cdc9ad..6b6f6d80 100644 --- a/.github/workflows/CI_cypress.yml +++ b/.github/workflows/CI_cypress.yml @@ -97,9 +97,9 @@ jobs: working-directory: ./api-repo run: docker compose logs --tail=200 app || true - - name: Seed database - working-directory: ./api-repo - run: docker compose exec -T app python -m transfers.seed + # - name: Seed database + # working-directory: ./api-repo + # run: docker compose exec -T app python -m transfers.seed - name: Build frontend run: npm run build From 071861c20dbefb529596f67c5e7577fc5e6546a4 Mon Sep 17 00:00:00 2001 From: Chase Martin Date: Thu, 15 Jan 2026 22:57:06 -0800 Subject: [PATCH 2/5] fix: update types and zod gen --- src/generated/types.gen.ts | 231 +++++++++++++++++++++++++++++++++++++ src/generated/zod.gen.ts | 124 ++++++++++++++++++++ 2 files changed, 355 insertions(+) diff --git a/src/generated/types.gen.ts b/src/generated/types.gen.ts index 524b17c8..7885f492 100644 --- a/src/generated/types.gen.ts +++ b/src/generated/types.gen.ts @@ -115,6 +115,16 @@ export type AuthorResponse = { affiliation?: string | null; }; +/** + * Conformance + */ +export type Conformance = { + /** + * Conformsto + */ + conformsTo?: Array; +}; + /** * ContactResponse * Response schema for contact details. @@ -713,6 +723,10 @@ export type CreateWell = { */ is_suitable_for_datalogger: boolean | null; formation_completion_code?: FormationCode | null; + /** + * Nma Formation Zone + */ + nma_formation_zone?: string | null; }; /** @@ -1050,6 +1064,24 @@ export type HttpValidationError = { detail?: Array; }; +/** + * LandingPage + */ +export type LandingPage = { + /** + * Title + */ + title: string; + /** + * Description + */ + description: string; + /** + * Links + */ + links: Array; +}; + /** * LexiconCategoryResponse * Pydantic model for the response of a lexicon category. @@ -1128,6 +1160,28 @@ export type LexiconTripleResponse = { object_: string; }; +/** + * Link + */ +export type Link = { + /** + * Href + */ + href: string; + /** + * Rel + */ + rel: string; + /** + * Type + */ + type?: string | null; + /** + * Title + */ + title?: string | null; +}; + /** * LocationGeoJSONResponse */ @@ -2351,6 +2405,10 @@ export type ThingResponse = { */ permissions: Array; formation_completion_code: FormationCode | null; + /** + * Nma Formation Zone + */ + nma_formation_zone: string | null; }; /** @@ -2887,6 +2945,10 @@ export type UpdateWell = { * Well Casing Materials */ well_casing_materials?: Array | null; + /** + * Nma Formation Zone + */ + nma_formation_zone?: string | null; }; /** @@ -3202,6 +3264,10 @@ export type WellResponse = { */ permissions: Array; formation_completion_code: FormationCode | null; + /** + * Nma Formation Zone + */ + nma_formation_zone: string | null; }; /** @@ -4685,6 +4751,171 @@ export type UpdateGroupGroupGroupIdPatchResponses = { export type UpdateGroupGroupGroupIdPatchResponse = UpdateGroupGroupGroupIdPatchResponses[keyof UpdateGroupGroupGroupIdPatchResponses]; +export type LandingPageOgcGetData = { + body?: never; + path?: never; + query?: never; + url: '/ogc/'; +}; + +export type LandingPageOgcGetResponses = { + /** + * Successful Response + */ + 200: LandingPage; +}; + +export type LandingPageOgcGetResponse = LandingPageOgcGetResponses[keyof LandingPageOgcGetResponses]; + +export type ConformanceOgcConformanceGetData = { + body?: never; + path?: never; + query?: never; + url: '/ogc/conformance'; +}; + +export type ConformanceOgcConformanceGetResponses = { + /** + * Successful Response + */ + 200: Conformance; +}; + +export type ConformanceOgcConformanceGetResponse = ConformanceOgcConformanceGetResponses[keyof ConformanceOgcConformanceGetResponses]; + +export type CollectionsOgcCollectionsGetData = { + body?: never; + path?: never; + query?: never; + url: '/ogc/collections'; +}; + +export type CollectionsOgcCollectionsGetResponses = { + /** + * Successful Response + */ + 200: unknown; +}; + +export type CollectionOgcCollectionsCollectionIdGetData = { + body?: never; + path: { + /** + * Collection Id + */ + collection_id: string; + }; + query?: never; + url: '/ogc/collections/{collection_id}'; +}; + +export type CollectionOgcCollectionsCollectionIdGetErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CollectionOgcCollectionsCollectionIdGetError = CollectionOgcCollectionsCollectionIdGetErrors[keyof CollectionOgcCollectionsCollectionIdGetErrors]; + +export type CollectionOgcCollectionsCollectionIdGetResponses = { + /** + * Successful Response + */ + 200: unknown; +}; + +export type ItemsOgcCollectionsCollectionIdItemsGetData = { + body?: never; + path: { + /** + * Collection Id + */ + collection_id: string; + }; + query?: { + /** + * Bbox + * minx,miny,maxx,maxy + */ + bbox?: string | null; + /** + * Datetime + */ + datetime?: string | null; + /** + * Limit + */ + limit?: number; + /** + * Offset + */ + offset?: number; + /** + * Properties + * CQL filter + */ + properties?: string | null; + /** + * Filter + */ + filter?: string | null; + /** + * Filter-Lang + */ + 'filter-lang'?: string | null; + }; + url: '/ogc/collections/{collection_id}/items'; +}; + +export type ItemsOgcCollectionsCollectionIdItemsGetErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ItemsOgcCollectionsCollectionIdItemsGetError = ItemsOgcCollectionsCollectionIdItemsGetErrors[keyof ItemsOgcCollectionsCollectionIdItemsGetErrors]; + +export type ItemsOgcCollectionsCollectionIdItemsGetResponses = { + /** + * Successful Response + */ + 200: unknown; +}; + +export type ItemOgcCollectionsCollectionIdItemsFidGetData = { + body?: never; + path: { + /** + * Collection Id + */ + collection_id: string; + /** + * Fid + */ + fid: number; + }; + query?: never; + url: '/ogc/collections/{collection_id}/items/{fid}'; +}; + +export type ItemOgcCollectionsCollectionIdItemsFidGetErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ItemOgcCollectionsCollectionIdItemsFidGetError = ItemOgcCollectionsCollectionIdItemsFidGetErrors[keyof ItemOgcCollectionsCollectionIdItemsFidGetErrors]; + +export type ItemOgcCollectionsCollectionIdItemsFidGetResponses = { + /** + * Successful Response + */ + 200: unknown; +}; + export type GetLexiconCategoriesLexiconCategoryGetData = { body?: never; path?: never; diff --git a/src/generated/zod.gen.ts b/src/generated/zod.gen.ts index 2d6b04c7..a014fff3 100644 --- a/src/generated/zod.gen.ts +++ b/src/generated/zod.gen.ts @@ -87,6 +87,13 @@ export const zAuthorResponse = z.object({ ])) }); +/** + * Conformance + */ +export const zConformance = z.object({ + conformsTo: z.optional(z.array(z.string())) +}); + /** * role */ @@ -1114,6 +1121,10 @@ export const zCreateWell = z.object({ formation_completion_code: z.optional(z.union([ zFormationCode, z.null() + ])), + nma_formation_zone: z.optional(z.union([ + z.string(), + z.null() ])) }); @@ -1611,6 +1622,31 @@ export const zHttpValidationError = z.object({ detail: z.optional(z.array(zValidationError)) }); +/** + * Link + */ +export const zLink = z.object({ + href: z.string(), + rel: z.string(), + type: z.optional(z.union([ + z.string(), + z.null() + ])), + title: z.optional(z.union([ + z.string(), + z.null() + ])) +}); + +/** + * LandingPage + */ +export const zLandingPage = z.object({ + title: z.string(), + description: z.string(), + links: z.array(zLink) +}); + /** * LexiconCategoryResponse * Pydantic model for the response of a lexicon category. @@ -2343,6 +2379,10 @@ export const zThingResponse = z.object({ formation_completion_code: z.union([ zFormationCode, z.null() + ]), + nma_formation_zone: z.union([ + z.string(), + z.null() ]) }); @@ -2658,6 +2698,10 @@ export const zWellResponse = z.object({ formation_completion_code: z.union([ zFormationCode, z.null() + ]), + nma_formation_zone: z.union([ + z.string(), + z.null() ]) }); @@ -3311,6 +3355,10 @@ export const zUpdateWell = z.object({ well_casing_materials: z.optional(z.union([ z.array(z.string()), z.null() + ])), + nma_formation_zone: z.optional(z.union([ + z.string(), + z.null() ])) }); @@ -3884,6 +3932,82 @@ export const zUpdateGroupGroupGroupIdPatchData = z.object({ */ export const zUpdateGroupGroupGroupIdPatchResponse = zGroupResponse; +export const zLandingPageOgcGetData = z.object({ + body: z.optional(z.never()), + path: z.optional(z.never()), + query: z.optional(z.never()) +}); + +/** + * Successful Response + */ +export const zLandingPageOgcGetResponse = zLandingPage; + +export const zConformanceOgcConformanceGetData = z.object({ + body: z.optional(z.never()), + path: z.optional(z.never()), + query: z.optional(z.never()) +}); + +/** + * Successful Response + */ +export const zConformanceOgcConformanceGetResponse = zConformance; + +export const zCollectionsOgcCollectionsGetData = z.object({ + body: z.optional(z.never()), + path: z.optional(z.never()), + query: z.optional(z.never()) +}); + +export const zCollectionOgcCollectionsCollectionIdGetData = z.object({ + body: z.optional(z.never()), + path: z.object({ + collection_id: z.string() + }), + query: z.optional(z.never()) +}); + +export const zItemsOgcCollectionsCollectionIdItemsGetData = z.object({ + body: z.optional(z.never()), + path: z.object({ + collection_id: z.string() + }), + query: z.optional(z.object({ + bbox: z.optional(z.union([ + z.string(), + z.null() + ])), + datetime: z.optional(z.union([ + z.string(), + z.null() + ])), + limit: z.optional(z.int().gte(1).lte(1000)).default(100), + offset: z.optional(z.int().gte(0)).default(0), + properties: z.optional(z.union([ + z.string(), + z.null() + ])), + filter: z.optional(z.union([ + z.string(), + z.null() + ])), + 'filter-lang': z.optional(z.union([ + z.string(), + z.null() + ])) + })) +}); + +export const zItemOgcCollectionsCollectionIdItemsFidGetData = z.object({ + body: z.optional(z.never()), + path: z.object({ + collection_id: z.string(), + fid: z.int() + }), + query: z.optional(z.never()) +}); + export const zGetLexiconCategoriesLexiconCategoryGetData = z.object({ body: z.optional(z.never()), path: z.optional(z.never()), From 1508d6ba90fd43d6b7cd653232d19c065018cf91 Mon Sep 17 00:00:00 2001 From: Chase Martin Date: Fri, 16 Jan 2026 00:17:32 -0800 Subject: [PATCH 3/5] fix: investigation --- .github/workflows/CI_cypress.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/CI_cypress.yml b/.github/workflows/CI_cypress.yml index 6b6f6d80..a1e5ef35 100644 --- a/.github/workflows/CI_cypress.yml +++ b/.github/workflows/CI_cypress.yml @@ -50,6 +50,15 @@ jobs: echo "POSTGRES_HOST=$POSTGRES_HOST" echo "POSTGRES_PORT=$POSTGRES_PORT" + - name: Print app env (DB-related) + working-directory: ./api-repo + run: | + docker compose exec -T app bash -lc 'env | sort | egrep "POSTGRES|DATABASE|SQLALCHEMY|MODE" || true' + + - name: Verify app sees POSTGRES_HOST + working-directory: ./api-repo + run: docker compose exec -T app bash -lc 'echo POSTGRES_HOST=$POSTGRES_HOST; env | grep POSTGRES_HOST || true' + - name: Start FastAPI backend (Docker Compose) working-directory: ./api-repo env: From cc6efd43a0fd8137aa7a595dfc3951ed9e1a5590 Mon Sep 17 00:00:00 2001 From: Chase Martin Date: Fri, 16 Jan 2026 00:19:52 -0800 Subject: [PATCH 4/5] fix: move --- .github/workflows/CI_cypress.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI_cypress.yml b/.github/workflows/CI_cypress.yml index a1e5ef35..f79ed12a 100644 --- a/.github/workflows/CI_cypress.yml +++ b/.github/workflows/CI_cypress.yml @@ -50,15 +50,6 @@ jobs: echo "POSTGRES_HOST=$POSTGRES_HOST" echo "POSTGRES_PORT=$POSTGRES_PORT" - - name: Print app env (DB-related) - working-directory: ./api-repo - run: | - docker compose exec -T app bash -lc 'env | sort | egrep "POSTGRES|DATABASE|SQLALCHEMY|MODE" || true' - - - name: Verify app sees POSTGRES_HOST - working-directory: ./api-repo - run: docker compose exec -T app bash -lc 'echo POSTGRES_HOST=$POSTGRES_HOST; env | grep POSTGRES_HOST || true' - - name: Start FastAPI backend (Docker Compose) working-directory: ./api-repo env: @@ -67,6 +58,15 @@ jobs: docker compose build --build-arg INSTALL_DEV=$INSTALL_DEV app docker compose up -d + - name: Print app env (DB-related) + working-directory: ./api-repo + run: | + docker compose exec -T app bash -lc 'env | sort | egrep "POSTGRES|DATABASE|SQLALCHEMY|MODE" || true' + + - name: Verify app sees POSTGRES_HOST + working-directory: ./api-repo + run: docker compose exec -T app bash -lc 'echo POSTGRES_HOST=$POSTGRES_HOST; env | grep POSTGRES_HOST || true' + - name: Exec inside DB container working-directory: ./api-repo run: docker compose exec -T db pg_isready -U $POSTGRES_USER -d $POSTGRES_DB || true From 8751d8da00f964bc4617799c4d4a2f958dde5a36 Mon Sep 17 00:00:00 2001 From: Chase Martin Date: Wed, 21 Jan 2026 11:28:03 -0800 Subject: [PATCH 5/5] fix: attempt to add db driver to CI workflow --- .github/workflows/CI_cypress.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI_cypress.yml b/.github/workflows/CI_cypress.yml index f79ed12a..a290170a 100644 --- a/.github/workflows/CI_cypress.yml +++ b/.github/workflows/CI_cypress.yml @@ -15,6 +15,7 @@ jobs: AUTHENTIK_DISABLE_AUTHENTICATION: ${{ secrets.AUTHENTIK_TEST }} # --- DATABASE VALUES FOR DOCKER COMPOSE --- + DB_DRIVER: postgres POSTGRES_HOST: db POSTGRES_PORT: 5432 POSTGRES_USER: postgres