Skip to content

Commit

Permalink
Merge pull request #290 from dandi/bf-colonslash
Browse files Browse the repository at this point in the history
Remove escaping (\) of : in 2 identifiers regexes
  • Loading branch information
yarikoptic authored Feb 24, 2025
2 parents f0be592 + a7f23fe commit 782c421
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dandischema/consts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DANDI_SCHEMA_VERSION = "0.6.9"
DANDI_SCHEMA_VERSION = "0.6.10"
ALLOWED_INPUT_SCHEMAS = [
"0.4.4",
"0.5.1",
Expand All @@ -12,6 +12,7 @@
"0.6.6",
"0.6.7",
"0.6.8",
"0.6.9",
DANDI_SCHEMA_VERSION,
]

Expand Down
4 changes: 2 additions & 2 deletions dandischema/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ class Person(Contributor):
class Software(DandiBaseModel):
identifier: Optional[RRID] = Field(
None,
pattern=r"^RRID\:.*",
pattern=r"^RRID:.*",
title="Research resource identifier",
description="RRID of the software from scicrunch.org.",
json_schema_extra={"nskey": "schema"},
Expand Down Expand Up @@ -1612,7 +1612,7 @@ def contributor_musthave_contact(
identifier: DANDI = Field(
title="Dandiset identifier",
description="A Dandiset identifier that can be resolved by identifiers.org.",
pattern=r"^DANDI\:\d{6}$",
pattern=r"^DANDI:\d{6}$",
json_schema_extra={"readOnly": True, "nskey": "schema"},
)
name: str = Field(
Expand Down
9 changes: 8 additions & 1 deletion dandischema/tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,14 @@ def test_migrate_044(schema_dir: Path) -> None:
]

# if already the target version - we do not change it, and do not crash
newmeta_2 = migrate(newmeta, to_version=DANDI_SCHEMA_VERSION)
newmeta_2 = migrate(
newmeta,
to_version=DANDI_SCHEMA_VERSION,
# to avoid possible crash due to attempt to download not yet
# released schema if we are still working within yet to be
# released version of the schema
skip_validation=True,
)
assert newmeta_2 == newmeta
assert newmeta_2 is not newmeta # but we do create a copy

Expand Down

0 comments on commit 782c421

Please sign in to comment.