Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost dandischema to 0.8.0 to get newer DANDI_SCHEMA_VERSION 0.6.4 supported #1524

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

yarikoptic
Copy link
Member

Closes #1520

Should be done soonish since otherwise we would end up with situation where users can't upload after they get their dandischema upgraded somehow (pip is not strict enough at times) and they start to try uploading with newer version of schema which archive does not support.

If I got it right there is no need for explicit specification of DANDI_SCHEMA_VERSION to be 0.6.4 , if that is not true -- please share how it should be done.

@mvandenburgh
Copy link
Member

@yarikoptic are there any changes to the JSON Schema (i.e. the dandi/schema repo)? If so, we'll need to do some additional changes.

@yarikoptic
Copy link
Member Author

@yarikoptic are there any changes to the JSON Schema (i.e. the dandi/schema repo)? If so, we'll need to do some additional changes.

yes: diff -Naur releases/0.6.{3,4} -- but only very minor to dandiset metadata level I believe --- more text is allowed:
diff -Naur releases/0.6.3/asset.json releases/0.6.4/asset.json
--- releases/0.6.3/asset.json	2022-06-29 16:42:26.373670014 -0400
+++ releases/0.6.4/asset.json	2023-03-09 11:29:40.274186717 -0500
@@ -17,7 +17,7 @@
     },
     "schemaVersion": {
       "title": "Schema Version",
-      "default": "0.6.3",
+      "default": "0.6.4",
       "readOnly": true,
       "nskey": "schema",
       "type": "string"
@@ -98,7 +98,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     },
@@ -194,7 +194,7 @@
         {
           "type": "string",
           "minLength": 1,
-          "maxLength": 2083,
+          "maxLength": 65536,
           "format": "uri"
         },
         {
@@ -242,7 +242,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     },
@@ -305,7 +305,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     }
@@ -1232,6 +1232,12 @@
         "schemaKey": {
           "title": "Schema Key",
           "default": "Activity",
+          "enum": [
+            "Activity",
+            "Project",
+            "Session",
+            "PublishActivity"
+          ],
           "type": "string",
           "const": "Activity"
         },
@@ -1448,7 +1454,7 @@
             {
               "type": "string",
               "minLength": 1,
-              "maxLength": 2083,
+              "maxLength": 65536,
               "format": "uri"
             }
           ],
diff -Naur releases/0.6.3/dandiset.json releases/0.6.4/dandiset.json
--- releases/0.6.3/dandiset.json	2022-06-29 16:42:26.373670014 -0400
+++ releases/0.6.4/dandiset.json	2023-03-09 11:29:40.274186717 -0500
@@ -18,7 +18,7 @@
     },
     "schemaVersion": {
       "title": "Schema Version",
-      "default": "0.6.3",
+      "default": "0.6.4",
       "readOnly": true,
       "nskey": "schema",
       "type": "string"
@@ -102,7 +102,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     },
@@ -218,7 +218,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     },
diff -Naur releases/0.6.3/published-asset.json releases/0.6.4/published-asset.json
--- releases/0.6.3/published-asset.json	2022-06-29 16:42:26.373670014 -0400
+++ releases/0.6.4/published-asset.json	2023-03-09 11:29:40.278186708 -0500
@@ -25,7 +25,7 @@
         {
           "type": "string",
           "minLength": 1,
-          "maxLength": 2083,
+          "maxLength": 65536,
           "format": "uri"
         },
         {
@@ -43,7 +43,7 @@
     },
     "schemaVersion": {
       "title": "Schema Version",
-      "default": "0.6.3",
+      "default": "0.6.4",
       "readOnly": true,
       "nskey": "schema",
       "type": "string"
@@ -124,7 +124,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     },
@@ -220,7 +220,7 @@
         {
           "type": "string",
           "minLength": 1,
-          "maxLength": 2083,
+          "maxLength": 65536,
           "format": "uri"
         },
         {
@@ -268,7 +268,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     },
@@ -331,7 +331,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     }
@@ -1344,6 +1344,12 @@
         "schemaKey": {
           "title": "Schema Key",
           "default": "Activity",
+          "enum": [
+            "Activity",
+            "Project",
+            "Session",
+            "PublishActivity"
+          ],
           "type": "string",
           "const": "Activity"
         },
@@ -1560,7 +1566,7 @@
             {
               "type": "string",
               "minLength": 1,
-              "maxLength": 2083,
+              "maxLength": 65536,
               "format": "uri"
             }
           ],
diff -Naur releases/0.6.3/published-dandiset.json releases/0.6.4/published-dandiset.json
--- releases/0.6.3/published-dandiset.json	2022-06-29 16:42:26.373670014 -0400
+++ releases/0.6.4/published-dandiset.json	2023-03-09 11:29:40.278186708 -0500
@@ -25,7 +25,7 @@
         {
           "type": "string",
           "minLength": 1,
-          "maxLength": 2083,
+          "maxLength": 65536,
           "format": "uri"
         },
         {
@@ -43,7 +43,7 @@
     },
     "schemaVersion": {
       "title": "Schema Version",
-      "default": "0.6.3",
+      "default": "0.6.4",
       "readOnly": true,
       "nskey": "schema",
       "type": "string"
@@ -127,7 +127,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     },
@@ -166,9 +166,11 @@
     "url": {
       "title": "URL",
       "description": "Permalink to the Dandiset.",
-      "pattern": "^.*/dandiset/\\d{6}/\\d+\\.\\d+\\.\\d+$",
       "readOnly": true,
       "nskey": "schema",
+      "minLength": 1,
+      "maxLength": 1000,
+      "format": "uri",
       "type": "string"
     },
     "repository": {
@@ -241,7 +243,7 @@
       "items": {
         "type": "string",
         "minLength": 1,
-        "maxLength": 2083,
+        "maxLength": 65536,
         "format": "uri"
       }
     },

@mvandenburgh
Copy link
Member

It looks like the new schema changes don't impact the frontend typescript types, so no changes are needed there.

If I got it right there is no need for explicit specification of DANDI_SCHEMA_VERSION to be 0.6.4 , if that is not true -- please share how it should be done.

We now pull the DANDI_SCHEMA_VERSION directly from dandischema, so yes as long as dandischema specifies 0.6.4 (which it does), this is all the changes we need.

Copy link
Member

@mvandenburgh mvandenburgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there's 11 CLI tests failing due to the schema version being out of data - I'll merge this so that it releases to staging only. Once we confirm that the tests pass, I'll cut a release to deploy to production.

@mvandenburgh mvandenburgh merged commit c5465a1 into master Mar 9, 2023
@mvandenburgh mvandenburgh deleted the enh-dandischema branch March 9, 2023 18:56
@dandibot
Copy link
Member

🚀 PR was released in v0.3.22 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update for dandischema 0.8.0 / schema version 0.6.4
3 participants