feat: Add external links property to experiments #619
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.
This pull request adds support for associating external links with experiments in the database and view models, and refactors related Pydantic models for better code reuse. The main changes are the addition of an
external_linksproperty to experiments, the introduction of a reusableExternalLinkmodel, and the relocation of theOfficialCollectionmodel for consistency.Database and Model Changes:
external_linkscolumn of type JSONB (not nullable) to theexperimentstable via Alembic migration.ExperimentSQLAlchemy model to include the newexternal_linkscolumn with a default empty dictionary.Pydantic Model Refactoring:
ExternalLinkPydantic model incomponents/external_link.pyand updated references in experiment and score set view models to use this shared model. [1] [2] [3] [4]OfficialCollectionmodel tocollection.pyfor consistency, and updated imports throughout the codebase. [1] [2] [3] [4]Code Cleanup:
ExternalLinkandOfficialCollectionfromscore_set.pyandexperiment.py, ensuring these models are only defined once and imported where needed. [1] [2]