Skip to content

test: dev and main diffs#235

Closed
vishpillai123 wants to merge 391 commits into
mainfrom
develop
Closed

test: dev and main diffs#235
vishpillai123 wants to merge 391 commits into
mainfrom
develop

Conversation

@vishpillai123
Copy link
Copy Markdown
Collaborator

No description provided.

chapmanhk and others added 29 commits March 19, 2026 13:27
databricks-sql-connector 3.5 pins pyarrow<17; edvise requires pyarrow>=17.
Use databricks-sql-connector[pyarrow]~=4.2.x and refresh uv.lock (pyarrow 19).

Aligns lock with Cloud Build 'uv lock --upgrade-package edvise'.

Made-with: Cursor
fix: upgrade databricks-sql-connector for pyarrow>=17 (edvise)
- Download unvalidated blob to a temp file and validate by path instead of
  blob.open().read() via _path_for_edvise_read (avoids a full in-RAM copy).
- Write validated CSV to a temp file and upload_from_filename instead of
  building the entire CSV in a StringIO string.

Branched from develop (repo has no dev branch).

Made-with: Cursor
Helps distinguish ENOSPC vs other failures in Cloud Run logs; re-raises unchanged.

Made-with: Cursor
…load

- Download OSError: unlink temp, skip validate_file_reader, log errno
- to_csv OSError: unlink temp, no upload, log errno
- Upload failure after to_csv: temp still unlinked

Made-with: Cursor
Aligns with universal-principles: keep _run_validation_and_get_normalized_df
under 50 lines, reduce nesting, replace tmp_path with local_csv_path naming.

Made-with: Cursor
fix: lower memory use for GCS upload validation
Stop passing edvise converter_func_cohort when pdp_cohort_converter_func is omitted so PDP cohort rows are validated as read.

- Callers may still pass an explicit cohort converter.

- Update PDP read-path test to expect converter_func=None.

- Refresh docstrings (pipeline vs API, Args/Returns/Raises) in validation and validation_pdp_edvise.

Made-with: Cursor
…y schemas UNKNOWN

- Require exactly one of PDP, Edvise, or Legacy on POST /institutions
- Remove custom schema resolution and Databricks extension generation for uploads
- Fix PATCH /institutions to persist allowed_schemas to inst.schemas column
- LEGACY_SCHEMA_GROUP stores UNKNOWN only; drop validation_extension module
- Update tests and default fixtures for typeless/custom removal

Made-with: Cursor
- POST/PATCH: require exactly one school type (pdp, edvise, or legacy)
- PATCH: recompute schemas only when the type triple changes; merge optional allowed_schemas on change
- PATCH: honor is_edvise/is_legacy for auto-assigned ids (POST parity)
- Docs/tests: validation namespaces; disambiguate custom naming in code and tests

Made-with: Cursor
Restore original docstrings and test names where "custom" referred to\nconverters, schema config, or JSON keys—not custom institutions.\n\nKeep gcsutil validate_file institution_id line aligned with pdp/edvise/legacy\nonly (no institution-UUID-for-custom upload path).

Made-with: Cursor
…ol type

When (name, state) matches an existing InstTable row, validate stored\npdp_id/edvise_id/legacy_id the same as new creates: at most one non-null\nand exactly one required. Return 400 with guidance instead of 200 for\ntypeless or invalid rows. Add regression tests.

Made-with: Cursor
…s-only

- Reject is_pdp without pdp_id on POST\n- Reject duplicate (name, state) when stored row has conflicting ids\n- Reject PATCH is_edvise on PDP row without clearing pdp_id\n- Reject PATCH with both is_edvise and is_legacy\n- allowed_schemas-only PATCH replaces schemas when type unchanged

Made-with: Cursor
…idation

fix: default cohort converter to none
- Add shared mutual-exclusion detail constant for POST/PATCH paths
- Extract duplicate-post row validation and PATCH merge/validate/persist helpers
- Keep update_inst within single-responsibility helpers; reuse row response mapper

Made-with: Cursor
- Remove unused HTTPException import from databricks.py (F401)
- Cast ORM row in _require_single_institution_row_by_uuid for InstTable (no-any-return)

Made-with: Cursor
feat: remove custom institutions, enforce PDP / Edvise / Legacy in API and uploads
feat: Optional local institution seed from `config/local_inst_data.json`
chore: bumping pyproject and uv.lock for edvise 0.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants