Skip to content

Commit 332447f

Browse files
authored
Merge pull request #2703 from microbiomedata/2702-release-nmdc-schema-version-11130
Generate release artifacts for `nmdc-schema` version `11.13.0`
2 parents 01315da + 40e9680 commit 332447f

13 files changed

+1116
-3702
lines changed

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Use Python 3.9 because that's the Python version listed in `pyproject.toml`.
2-
FROM python:3.9
1+
FROM python:3.10
32

43
WORKDIR /nmdc-schema
54

5+
# Install jq.
6+
RUN apt-get update && \
7+
apt-get install -y jq
8+
69
# Download and install yq.
710
# Reference: https://github.com/mikefarah/yq#install
811
RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && \

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
app:
53
# Use the container image built from the specified Dockerfile;

nmdc_schema/migrators/migrator_from_11_11_0_to_11_12_2.py renamed to nmdc_schema/migrators/migrator_from_11_11_0_to_11_13_0.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from nmdc_schema.migrators.migrator_base import MigratorBase
2-
from nmdc_schema.migrators.partials.migrator_from_11_11_0_to_11_12_2 import (
2+
from nmdc_schema.migrators.partials.migrator_from_11_11_0_to_11_13_0 import (
33
get_migrator_classes,
44
)
55

@@ -10,7 +10,7 @@ class Migrator(MigratorBase):
1010
"""
1111

1212
_from_version = "11.11.0"
13-
_to_version = "11.12.2"
13+
_to_version = "11.13.0"
1414

1515
def upgrade(self, commit_changes: bool = False) -> None:
1616
r"""

nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_12_2/__init__.py renamed to nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_13_0/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import List, Type
22

33
from nmdc_schema.migrators.migrator_base import MigratorBase
4-
from nmdc_schema.migrators.partials.migrator_from_11_11_0_to_11_12_2 import (
5-
migrator_from_11_11_0_to_11_12_2_part_1,
6-
migrator_from_11_11_0_to_11_12_2_part_2,
7-
migrator_from_11_11_0_to_11_12_2_part_3
4+
from nmdc_schema.migrators.partials.migrator_from_11_11_0_to_11_13_0 import (
5+
migrator_from_11_11_0_to_11_13_0_part_1,
6+
migrator_from_11_11_0_to_11_13_0_part_2,
7+
migrator_from_11_11_0_to_11_13_0_part_3
88
)
99

1010

@@ -24,7 +24,7 @@ def get_migrator_classes() -> List[Type[MigratorBase]]:
2424
"""
2525

2626
return [
27-
migrator_from_11_11_0_to_11_12_2_part_1.Migrator,
28-
migrator_from_11_11_0_to_11_12_2_part_2.Migrator,
29-
migrator_from_11_11_0_to_11_12_2_part_3.Migrator
27+
migrator_from_11_11_0_to_11_13_0_part_1.Migrator,
28+
migrator_from_11_11_0_to_11_13_0_part_2.Migrator,
29+
migrator_from_11_11_0_to_11_13_0_part_3.Migrator
3030
]

nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_12_2/migrator_from_11_11_0_to_11_12_2_part_1.py renamed to nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_13_0/migrator_from_11_11_0_to_11_13_0_part_1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Migrator(MigratorBase):
1313
'''
1414

1515
_from_version = '11.11.0'
16-
_to_version = '11.12.2.part_1'
16+
_to_version = '11.13.0.part_1'
1717

1818
def upgrade(self, commit_changes: bool = False) -> None:
1919
r'''

nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_12_2/migrator_from_11_11_0_to_11_12_2_part_2.py renamed to nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_13_0/migrator_from_11_11_0_to_11_13_0_part_2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class Migrator(MigratorBase):
1515
r"""A check-only migrator that raises an exception if any QuantityValue's has_unit slot
1616
is not valid against the slot's storage_unit or UnitEnum constraints."""
1717

18-
_from_version = '11.12.2.part_1'
19-
_to_version = '11.12.2.part_2'
18+
_from_version = '11.13.0.part_1'
19+
_to_version = '11.13.0.part_2'
2020

2121
def __init__(self, *args, **kwargs):
2222
super().__init__(*args, **kwargs)

nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_12_2/migrator_from_11_11_0_to_11_12_2_part_3.py renamed to nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_13_0/migrator_from_11_11_0_to_11_13_0_part_3.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ class Migrator(MigratorBase):
66
Migrates a database between two schemas.
77
"""
88

9-
_from_version = "11.12.2.part_2"
10-
_to_version = "11.12.2.part_3"
9+
_from_version = "11.13.0.part_2"
10+
_to_version = "11.13.0.part_3"
1111

12-
def upgrade(self) -> None:
12+
def upgrade(self, commit_changes: bool = False) -> None:
1313
r"""
1414
Migrates the database from conforming to the original schema, to conforming to the new schema.
1515
"""
@@ -38,8 +38,7 @@ def confirm_igsn_prefix(self, biosample: dict) -> None:
3838
True
3939
"""
4040
prefix = "igsn:"
41-
igsn_values = []
42-
igsn_values = biosample.get("igsn_biosample_identifiers")
41+
igsn_values = biosample.get("igsn_biosample_identifiers", [])
4342
biosample_id = biosample.get("id")
4443
for record in igsn_values:
4544
if not record.startswith(prefix):

nmdc_schema/nmdc-pydantic.py

Lines changed: 273 additions & 640 deletions
Large diffs are not rendered by default.

nmdc_schema/nmdc.py

Lines changed: 149 additions & 79 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)