Skip to content

Commit

Permalink
fix: Date fields on tomograms are net-new so they need to be nullable. (
Browse files Browse the repository at this point in the history
#301)

Date fields on tomograms are net-new so they need to be nullable.
  • Loading branch information
jgadling authored Oct 4, 2024
1 parent 483eee8 commit cf8d2e0
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 82 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions apiv2/database/models/tomogram.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apiv2/db_import/importers/tomogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

class TomogramDBImporter(BaseDBImporter):
deposition_map = {}

def __init__(
self,
voxel_spacing_id: int,
Expand Down
7 changes: 6 additions & 1 deletion apiv2/db_import/tests/populate_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,11 @@ def populate_annotation_authors(session: sa.orm.Session) -> None:
@write_data
def populate_stale_annotation_method_links(session: sa.orm.Session) -> None:
populate_stale_annotations(session)
session.add(AnnotationMethodLink(annotation_id=STALE_ANNOTATION_ID, name="Stale Link 0", link_type="other", link="https://some-link.com"))
session.add(
AnnotationMethodLink(
annotation_id=STALE_ANNOTATION_ID, name="Stale Link 0", link_type="other", link="https://some-link.com",
),
)
session.add(
AnnotationMethodLink(
annotation_id=STALE_ANNOTATION_ID,
Expand All @@ -554,6 +558,7 @@ def populate_stale_annotation_method_links(session: sa.orm.Session) -> None:
),
)


@write_data
def populate_annotation_method_links(session: sa.orm.Session) -> None:
populate_annotations(session)
Expand Down
18 changes: 9 additions & 9 deletions apiv2/graphql_api/schema.graphql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 24 additions & 48 deletions apiv2/graphql_api/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions apiv2/graphql_api/types/tomogram.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions apiv2/schema/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,13 @@ classes:
mixins:
- IDMixin
- DateStampedEntityMixin
slot_usage:
deposition_date:
required: False
last_modified_date:
required: False
release_date:
required: False
attributes:
alignment:
name: alignment
Expand Down
6 changes: 3 additions & 3 deletions apiv2/validators/tomogram.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf8d2e0

Please sign in to comment.