Skip to content

Commit 782c421

Browse files
authored
Merge pull request #290 from dandi/bf-colonslash
Remove escaping (\) of : in 2 identifiers regexes
2 parents f0be592 + a7f23fe commit 782c421

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

dandischema/consts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DANDI_SCHEMA_VERSION = "0.6.9"
1+
DANDI_SCHEMA_VERSION = "0.6.10"
22
ALLOWED_INPUT_SCHEMAS = [
33
"0.4.4",
44
"0.5.1",
@@ -12,6 +12,7 @@
1212
"0.6.6",
1313
"0.6.7",
1414
"0.6.8",
15+
"0.6.9",
1516
DANDI_SCHEMA_VERSION,
1617
]
1718

dandischema/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ class Person(Contributor):
966966
class Software(DandiBaseModel):
967967
identifier: Optional[RRID] = Field(
968968
None,
969-
pattern=r"^RRID\:.*",
969+
pattern=r"^RRID:.*",
970970
title="Research resource identifier",
971971
description="RRID of the software from scicrunch.org.",
972972
json_schema_extra={"nskey": "schema"},
@@ -1612,7 +1612,7 @@ def contributor_musthave_contact(
16121612
identifier: DANDI = Field(
16131613
title="Dandiset identifier",
16141614
description="A Dandiset identifier that can be resolved by identifiers.org.",
1615-
pattern=r"^DANDI\:\d{6}$",
1615+
pattern=r"^DANDI:\d{6}$",
16161616
json_schema_extra={"readOnly": True, "nskey": "schema"},
16171617
)
16181618
name: str = Field(

dandischema/tests/test_metadata.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,14 @@ def test_migrate_044(schema_dir: Path) -> None:
429429
]
430430

431431
# if already the target version - we do not change it, and do not crash
432-
newmeta_2 = migrate(newmeta, to_version=DANDI_SCHEMA_VERSION)
432+
newmeta_2 = migrate(
433+
newmeta,
434+
to_version=DANDI_SCHEMA_VERSION,
435+
# to avoid possible crash due to attempt to download not yet
436+
# released schema if we are still working within yet to be
437+
# released version of the schema
438+
skip_validation=True,
439+
)
433440
assert newmeta_2 == newmeta
434441
assert newmeta_2 is not newmeta # but we do create a copy
435442

0 commit comments

Comments
 (0)