Merged
Conversation
…to_urn_list` that allows controllable behavior for superseding score sets
Add sortable collections feature allowing users to specify and maintain custom ordering of score sets and experiments within collections across all API operations (CREATE, GET, PATCH, POST, DELETE). Key Changes: - Replace simple many-to-many relationships with association object pattern using full ORM models with position column - Add CollectionScoreSetAssociation and CollectionExperimentAssociation models with position tracking - Use SQLAlchemy AssociationProxy for transparent access to related objects while maintaining ordered relationships - Implement position-based ordering in all collection endpoints API Behavior: - POST endpoints append new items to end of collection - PATCH endpoint uses replace-all semantics with implicit add/remove - DELETE endpoints remove items and re-index remaining positions - GET endpoints return items in user-specified order - Permission escalation checks for PATCH when membership changes Database Migration: - Add position column to collection association tables - Backfill with sequential positions using ROW_NUMBER() window function partitioned by collection_id for deterministic ordering - Remove server default after backfill for application control Testing: - Add 14 comprehensive router tests for ordering functionality - Test order preservation, reordering, appending, removal, implicit add/remove, error handling, and permission enforcement - Add 3 view model tests for ORM-to-view order preservation - Fix test helpers to track experiment URN changes during publishing The implementation is fully backward compatible with existing API clients and maintains all previous functionality via AssociationProxy.
…das for 3.12 support
…data in CSV export
The scores and counts loops in variant_to_csv_row were calling str() on
None values without a null check, producing the literal string "None"
instead of the na_rep value ("NA"). Other column handlers (core, mavedb,
vep, gnomad, clingen) already had null checks — this adds the same
is_null guard to scores and counts.
…das for 3.12 support
…PP style calibration script Adds an additional `--remove` flag to the loading script which allows users to remove any calibrations of this style which were not loaded during the ingestion.
…nt endpoints
Score set API responses were slow (5+ seconds) because functional
classifications eagerly serialized thousands of variants. This moves
variant data to dedicated endpoints while keeping a lightweight
variant_count summary in the default response.
Changes:
- Remove `variants` field from functional classification view models
- Add `id` and `variant_count` fields to SavedFunctionalClassification
- Add `variant_count` column_property on the ORM model using a
correlated COUNT subquery against the association table
- Add `FunctionalClassificationVariants` response model
- Add GET /{urn}/functional-classifications/{id}/variants endpoint
- Add GET /{urn}/variants endpoint (all classifications)
- Update test constants and assertions for new response shape
Breaking change: clients relying on `variants` in calibration responses
must migrate to the new dedicated endpoints.
…das for 3.12 support
…ecific guidance Add focused instruction files for database patterns, API conventions, and testing. Rewrite copilot-instructions.md and python.instructions.md with project-specific architecture, conventions, and code patterns. Remove generic boilerplate files and unused prompt builder.
…nt endpoints
Score set API responses were slow (5+ seconds) because functional
classifications eagerly serialized thousands of variants. This moves
variant data to dedicated endpoints while keeping a lightweight
variant_count summary in the default response.
Changes:
- Remove `variants` field from functional classification view models
- Add `id` and `variant_count` fields to SavedFunctionalClassification
- Add `variant_count` column_property on the ORM model using a
correlated COUNT subquery against the association table
- Add `FunctionalClassificationVariants` response model
- Add GET /{urn}/functional-classifications/{id}/variants endpoint
- Add GET /{urn}/variants endpoint (all classifications)
- Update test constants and assertions for new response shape
Breaking change: clients relying on `variants` in calibration responses
must migrate to the new dedicated endpoints.
…sification variants in score calibrations
…npublished versions The superseding score set filter used a LEFT OUTER JOIN that excluded any score set with a superseding version, regardless of publication status. This caused published score sets (e.g. urn:mavedb:00000049) to disappear from search results when an unpublished draft replacement existed. Allow superseded score sets through when the superseding version has no published_date. Also enforce published=True on the filter-options endpoint for consistency with the main search endpoint.
…ion models and related logic
…ot-applying-to-scores-or-counts fix: use na_rep instead of string 'None' for missing score and count data in CSV export
…or clarity in score set transformation
…e-collections feat: Sortable Collections
…bration-script-updates chore: add ExCALIBR calibration loading script and remove deprecated PP style calibration script
…ovements chore: Replace generic Copilot instruction boilerplate with MaveDB-specific guidance
…ration-upload-permissions
…urning-results-for-score-sets-with-unpublished-superseder
…ot-returning-results-for-score-sets-with-unpublished-superseder fix: don't hide published score sets from search when superseded by unpublished versions
The `GET /alphafold-files/version` endpoint will be deprecated after PR VariantEffect/mavedb-ui#631 is merged and deployed. In the meantime, to keep the protein visualizations functional, updating the endpoint to return v6 as a default version number since requests currently fail otherwise.
…fold-version Return default alphafold version when parsing or request for XML fails
…-all-namespaces-in-zenodo-csv-export feat: include additional namespaces in Zenodo CSV export
…tion-performance-improvements feat: Remove variants from calibration responses, add dedicated variant endpoints
…ration-upload-permissions
…-calibration-upload-permissions feat: Broaden Score Calibration Permissions Create/Update
Bump direct dependency constraints to enforce security minimums: - cryptography: ~44.0.1 → ~46.0.5 - python-multipart: ~0.0.5 → ~0.0.22 - authlib: ~1.6.5 → ~1.6.6 Transitive dependencies already at required minimums in lock: - urllib3 2.6.3 (via requests, boto3) - pyasn1 0.6.2 (via python-jose) - sqlparse 0.5.5 (via hgvs) - filelock 3.21.2 (via pre-commit) - virtualenv 20.36.1 (via pre-commit)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
Bug Fixes
Misc.