Skip to content

Commit

Permalink
Merge pull request #773 from NeurodataWithoutBorders/dandi-upload-cha…
Browse files Browse the repository at this point in the history
…nges

Improve DANDI upload documentation
  • Loading branch information
CodyCBakerPhD authored May 6, 2024
2 parents c501319 + b907f7e commit 69fbddf
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 17 deletions.
28 changes: 17 additions & 11 deletions docs/tutorials/dataset_publication.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Dataset Publication
=======================================
===================

For this tutorial, we'll be adapting the previous :doc:`Multi-Session Tutorial </tutorials/multiple_sessions>` to publish our data to the DANDI Archive.

Expand Down Expand Up @@ -43,24 +43,21 @@ To get your API key, visit the :dandi-staging:`staging website <>` and click on
:align: center
:alt: DANDI staging API key added

Submit this to the Staging API Key input on the GUIDE.
Provide this for the Staging API Key value on the GUIDE.

.. figure:: ../assets/tutorials/dandi/api-token-added.png
:align: center
:alt: DANDI staging API key added

Press the **Submit** button to save your API key. This will populate the **Dandiset** input with a list of Dandisets associated with your account, which you can search by title or ID.

Once you have specified your Staging API Key, the **Dandiset** input will allow you to select any existing Dandiset associated with your account by ID (e.g., "207698") or name (e.g., "NWB GUIDE Test").
But what if you don't have any Dandisets to upload to? No problem!

Continue to the next page to trigger your upload to the DANDI Archive.
Creating a Dandiset
^^^^^^^^^^^^^^^^^^^
If you don't already have a Dandiset on the Staging server, you can create one directly from the GUIDE.

.. figure:: ../assets/tutorials/dandi/dandiset-id.png
:align: center
:alt: DANDI upload page with Dandiset ID specified

Creating a Dandiset from the GUIDE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you do not already own a Dandiset on staging, you will need to create one. Press the Create New Dandiset button to open a pop-up that guides you through the required fields for Dandiset creation.
Press the **Create New Dandiset** button to open a pop-up that guides you through the required fields for Dandiset creation.

.. figure:: ../assets/tutorials/dandi/create-dandiset.png
:align: center
Expand All @@ -69,6 +66,15 @@ If you do not already own a Dandiset on staging, you will need to create one. Pr

Once this pop-up form is submitted, the Dandiset input will now contain your new Dandiset.


.. figure:: ../assets/tutorials/dandi/dandiset-id.png
:align: center
:alt: DANDI upload page with Dandiset ID specified



Finally, press the **Upload** button to begin the upload process.

Final Review
------------
Once your upload to the DANDI Archive is complete, you will be able to review a quick overview of the associated Dandiset and a list of the uploaded files from this pipeline.
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 ? 'Unpublished' : '') + (staging ? ' - Staging' : '')
const enumCategories = (isDraft ? 'Unpublished' : '') + (staging ? `${isDraft ? ` - ` : ''}Staging` : '')

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

Expand Down
2 changes: 1 addition & 1 deletion schemas/json/dandi/upload.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"properties": {
"dandiset": {
"type": "string",
"description": "The unique identifier for your Dandiset. Can also be created or searched by name."
"description": "The title of the Dandiset to upload to. Can also provide the Dandiset ID.<br><small><b>Example:</b> My Dandiset or <code>207698</code></small>"
},
"additional_settings": {
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const pages = {
}),

upload: new GuidedUploadPage({
title: "DANDI Upload Options",
title: "DANDI Upload",
label: "Upload to DANDI",
section: sections[3],
sync: ["conversion"],
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/stories/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class Search extends LitElement {
}
.category {
padding: 10px 25px;
padding: 10px 18px;
background: gainsboro;
border-top: 1px solid gray;
border-bottom: 1px solid gray;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/stories/forms/GlobalFormModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function createFormModal ({
content.style.padding = "25px"

const saveButton = new Button({
label: "Update",
label: "Submit",
primary: true,
onClick: async () => {
await globalForm.validate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class GuidedUploadPage extends Page {
};

header = {
subtitle: "Settings to upload your conversion to the DANDI Archive",
subtitle: "Configure your upload to the DANDI Archive",
controls: [
new Button({
icon: keyIcon,
Expand Down

0 comments on commit 69fbddf

Please sign in to comment.