Skip to content

Commit

Permalink
Merge branch 'main' into improve-subject-interaction-with-results
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Mar 13, 2024
2 parents ae598c4 + 7c918cd commit feb915f
Show file tree
Hide file tree
Showing 21 changed files with 365 additions and 232 deletions.
2 changes: 1 addition & 1 deletion docs/conf_extlinks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use this for mapping to external links
extlinks = {
"linux-fix": ("https://github.com/neurodatawithoutborders/nwb-guide/tree/linux-fix/%s", "%s"),
"linux-latest": ("https://github.com/neurodatawithoutborders/nwb-guide/tree/linux-latest/%s", "%s"),
"releases": ("https://github.com/NeurodataWithoutBorders/nwb-guide/releases/%s", "%s"),
"pynwb-docs": ("https://pynwb.readthedocs.io/en/stable/%s", "%s"),
"matnwb-src": ("https://github.com/NeurodataWithoutBorders/matnwb/%s", "%s"),
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Download `NWB-GUIDE-arm64.dmg <https://github.com/NeurodataWithoutBorders/nwb-gu
Linux
-----

Please clone the :linux-fix:`linux-fix <>` branch of the NWB GUIDE and follow the :ref:`Developer Installation instructions<developer_installation>` after the "Clone the Repo" step.
Please clone the :linux-latest:`linux-latest <>` branch of the NWB GUIDE and follow the :ref:`Developer Installation instructions<developer_installation>` after the "Clone the Repo" step.

.. code-block:: bash
git clone --branch linux-fix https://github.com/NeurodataWithoutBorders/nwb-guide
git clone --branch linux-latest https://github.com/NeurodataWithoutBorders/nwb-guide
cd nwb-guide
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"test": "npm run test:app && npm run test:server",
"test:app": "vitest run",
"test:server": "pytest pyflask/tests/ -s -vv",
"wait3s": "node -e \"setTimeout(() => process.exit(0),3000)\"",
"test:executable": "concurrently -n EXE,TEST --kill-others --success first \"node tests/testPyinstallerExecutable.js --port 3434 --forever\" \"npm run wait3s && pytest pyflask/tests/ -s --target http://localhost:3434\"",
"wait5s": "node -e \"setTimeout(() => process.exit(0),5000)\"",
"test:executable": "concurrently -n EXE,TEST --kill-others --success first \"node tests/testPyinstallerExecutable.js --port 3434 --forever\" \"npm run wait5s && pytest pyflask/tests/ -s --target http://localhost:3434\"",
"test:coverage": "npm run coverage:app && npm run coverage:server",
"coverage:app": "vitest run --coverage",
"coverage:server": "pytest pyflask/tests/ -s --cov=pyflask --cov-report=xml",
Expand Down
4 changes: 2 additions & 2 deletions pyflask/manageNeuroconv/manage_neuroconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,9 @@ def upload_multiple_filesystem_objects_to_dandi(**kwargs):
innerKwargs = {**kwargs}
del innerKwargs["filesystem_paths"]
innerKwargs["nwb_folder_path"] = tmp_folder_path
result = upload_folder_to_dandi(**innerKwargs)
results = upload_folder_to_dandi(**innerKwargs)
rmtree(tmp_folder_path)
return result
return results


def upload_folder_to_dandi(
Expand Down
2 changes: 1 addition & 1 deletion schemas/dandi-upload.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const addDandiset = async (info) => {
const enumLabels = `${id}${latestVersionInfo.name}`

const isDraft = latestVersionInfo.version === 'draft'
const enumCategories = (isDraft ? 'Drafts — ' : '') + (staging ? 'Staging' : 'Main')
const enumCategories = (isDraft ? 'Unpublished' : '') + (staging ? ' - Staging' : '')

const fullInfo = await info.getInfo({ version: latestVersionInfo.version });

Expand Down
17 changes: 16 additions & 1 deletion schemas/json/dandi/create.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},

"embargo_status": {
"title": "Would you like to embargo this Dandiset?",
"type": "boolean",
"description": "Embargoed Dandisets are hidden from public access until a specific time period has elapsed. Uploading data to the DANDI archive under embargo requires a relevant NIH award number, and the data will be automatically published when the embargo period expires.",
"default": false
Expand All @@ -36,15 +37,29 @@

"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,
"description": "Licenses associated with the item. <br><small><b>Note:</b> DANDI only supports a subset of <a href='https://creativecommons.org' target='_blank'>Creative Commons Licenses</a> applicable to datasets</small>"
"strict": true
},

"nih_award_number": {
Expand Down
14 changes: 6 additions & 8 deletions schemas/source-data.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ export default function preprocessSourceDataSchema (schema) {
// Abstract across different interfaces
Object.entries(schema.properties ?? {}).forEach(([key, schema]: [string, any]) => {

if (key === 'VideoInterface' || key === 'AudioInterface') {
if (schema.properties.file_paths) {
Object.assign(schema.properties.file_paths, {
items: { type: 'string' },
description: '<b>Only one file supported at this time.</b> Multiple file support coming soon.',
maxItems: 1,
})
}
if (schema.properties.file_paths) {
Object.assign(schema.properties.file_paths, {
items: { type: 'string' },
description: '<b>Only one file supported at this time.</b> Multiple file support coming soon.',
maxItems: 1,
})
}

// Do not show steps
Expand Down
1 change: 0 additions & 1 deletion src/renderer/assets/css/nativize.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

html {
font-family: sans-serif;
-webkit-user-select: none; /* disable selection */
-webkit-user-drag: none; /* disable dragging */
cursor: default; /* use default cursor */
}
Expand Down
7 changes: 5 additions & 2 deletions src/renderer/src/stories/DandiResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ export class DandiResults extends LitElement {
<ol class="publication"></ol>
${this.files
? html` <h3 style="padding: 0;">Files Uploaded</h3>
? html` <h3 style="padding: 0;">Updated DANDI Assets</h3>
<ol>
${Object.values(this.files)
.map((item) => Object.values(item))
.flat()
.map(({ file }) => html`<li>${file}</li>`)}
.map(({ file }) => {
const truncated = file.split(this.id)[1].slice(1);
return html`<li>${truncated}</li>`;
})}
</ol>`
: ""}
<hr />
Expand Down
8 changes: 5 additions & 3 deletions src/renderer/src/stories/JSONSchemaForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,11 @@ const componentCSS = `
}
.link {
margin-top: 20px;
margin: 20px 0px;
border: 1px solid black;
border-radius: 4px;
position: relative;
}
.link > div {
Expand Down Expand Up @@ -869,11 +870,12 @@ export class JSONSchemaForm extends LitElement {

const value = parent[name];

const skipValidation = !this.validateEmptyValues && value === undefined;
const skipValidation = this.validateEmptyValues === null && value === undefined;

const validateArgs = input.pattern || skipValidation ? [] : [value, schema];

// Run validation functions
const jsonSchemaErrors = validateArgs.length === 2 ? this.validateSchema(...validateArgs, name) : [];

const valid = skipValidation ? true : await this.validateOnChange(name, parent, pathToValidate, value);

if (valid === null) return null; // Skip validation / data change if the value is null
Expand Down
Loading

0 comments on commit feb915f

Please sign in to comment.