diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 169e41689..aab09b8b7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: types_or: [css, javascript] - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell additional_dependencies: diff --git a/src/pyflask/app.py b/src/pyflask/app.py index 7b62ea2a4..731c196bd 100644 --- a/src/pyflask/app.py +++ b/src/pyflask/app.py @@ -143,10 +143,10 @@ def get(self): ) log_handler.setFormatter(log_formatter) - flask_app.logger.addHandler(log_handler) - flask_app.logger.setLevel(DEBUG) + api.logger.addHandler(log_handler) + api.logger.setLevel(DEBUG) - flask_app.logger.info(f"Logging to {LOG_FILE_PATH}") + api.logger.info(f"Logging to {LOG_FILE_PATH}") # Run the server api.logger.info(f"Starting server on port {port}") diff --git a/src/schemas/dandi-create.schema.ts b/src/schemas/dandi-create.schema.ts index 7b08cd927..8c44ce447 100644 --- a/src/schemas/dandi-create.schema.ts +++ b/src/schemas/dandi-create.schema.ts @@ -1,4 +1,4 @@ -import create from './json/dandi/create.json' assert { type: "json" } +import create from './json/dandi/create_no_embargo.json' assert { type: "json" } const schema = structuredClone(create) export default schema diff --git a/src/schemas/json/dandi/create_no_embargo.json b/src/schemas/json/dandi/create_no_embargo.json new file mode 100644 index 000000000..2e5ec3d73 --- /dev/null +++ b/src/schemas/json/dandi/create_no_embargo.json @@ -0,0 +1,60 @@ +{ + "order": [ + "title", + "archive", + "embargo_status", + "description", + "license" + ], + "properties": { + + "title": { + "type": "string", + "description": "Provide a title for this Dandiset. The title will appear in search results and at the top of the home page for this Dandiset, so make it concise and descriptive" + }, + + "archive": { + "type": "string", + "enumLabels": { + "staging": "Development Server", + "main": "Main Archive" + }, + "enum": ["main", "staging"], + "description": "Which DANDI server to upload to.
Note: The Development Server is recommended for developers, or users learning to use DANDI" + }, + + "description": { + "type": "string", + "description": "Provide a description for this Dandiset. This will appear prominently under the title in the home page for this Dandiset." + }, + + "license": { + "type": "array", + "description": "Provide a set of licenses for this Dandiset. Review the individual licenses and select the one that best fits your needs.", + "items": { + "type": "string", + "enumLinks": { + "spdx:CC0-1.0": "https://creativecommons.org/public-domain/cc0/", + "spdx:CC-BY-4.0": "https://creativecommons.org/licenses/by/4.0/deed.en" + }, + "enumKeywords": { + "spdx:CC0-1.0": ["No Rights Reserved"], + "spdx:CC-BY-4.0": ["Attribution 4.0 International"] + }, + "enumLabels": { + "spdx:CC0-1.0": "CC0 1.0", + "spdx:CC-BY-4.0": "CC BY 4.0" + }, + "enum": [ + "spdx:CC0-1.0", + "spdx:CC-BY-4.0" + ] + }, + "maxItems": 1, + "uniqueItems": true, + "strict": true + } + + }, + "required": ["title", "description", "license", "archive"] +}