diff --git a/docs/60_initialize_vendors.md b/docs/60_initialize_vendors.md index 370b5129..662dd271 100644 --- a/docs/60_initialize_vendors.md +++ b/docs/60_initialize_vendors.md @@ -27,10 +27,6 @@ Deploys production frontend build, as well as s staging previews to assist with Provides observability and monitoring for API events -• **PyPI** - -Serves as a public registry for the `dandi-cli` tool - Some services are not yet integrated within the main infrastructure: • https://github.com/dandi/backups2datalad - to populate/update https://github.com/dandi/dandisets, https://github.com/dandisets, and https://github.com/dandizarrs/ @@ -442,38 +438,6 @@ alt="retrieve" style="width: 60%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>

-## PyPI - -A common way that users interact with the DANDI ecosystem is via its CLI and Python client tool: [dandi-cli](https://pypi.org/project/dandi/) - -##### Create a PyPI Account - -Versions of this tool are hosted, versioned and managed by PyPI -- therefore, you will need to create an account. - -##### Retrieve an API Token - -After creating an account, you'll want to create your own API key -- first go to `Account settings` - -

- -

- -Scroll down to `API tokens` and create a value -- keep track of this value for now. We will use it later - -

- -

- -In terms of creating and publishing your first project, go to the [documentation for setting up a CLI and Python Client](. -./62_dandi_cli) - - ## datalad (TBD) ## git-annex (TBD) \ No newline at end of file diff --git a/docs/62_dandi_cli.md b/docs/62_dandi_cli.md index 125a9b50..636717db 100644 --- a/docs/62_dandi_cli.md +++ b/docs/62_dandi_cli.md @@ -1,20 +1,20 @@ For data management (predominately `upload`, `download` and `validation` of data to/from DANDI), a local CLI (command line interface) is used. -**Note: please make sure [you have set up your PyPI account](..60_initialize_vendors/##pypi).** - ## Referencing your API -To reference your DANDI-clone API, [update the URLs reference per each CLI action](https://github.com/dandi/dandi-cli/blob/15196a93310618f8897c7b43444e216bbb094549/dandi/consts.py#L119-L135) +To reference your DANDI-clone API, [update the URLs reference per each CLI action](https://github.com/dandi/dandi-cli/blob/15196a93310618f8897c7b43444e216bbb094549/dandi/consts.py#L119-L135) and push a PR to the [dandi-cli GitHub repository](https://github.com/dandi/dandi-cli). + +Here is an example PR of another clone adding to the available instances of `DandiInstance` objects in `dandi-cli`: [see here](https://github.com/dandi/dandi-cli/pull/1527) For example: ```python known_instances = { - "dandi": DandiInstance( # Your own "dandi"" - "dandi", # Your own "dandi" - "https://.org", # UI URL - "https://api..org/api", # API URL + "dandi": DandiInstance( + "dandi", + "https://dandiarchive.org", + "https://api.dandiarchive.org/api", ), "dandi-staging": DandiInstance( "dandi-staging", @@ -26,13 +26,22 @@ known_instances = { f"http://{instancehost}:8085", f"http://{instancehost}:8000/api", ), + "": DandiInstance( # Your own "dandi"" + "", # Your own "dandi" + "https://.org", + "https://api..org/api", + ), } ``` -Of note, you'll need to think about how you manage API access via the CLI -- `dandi` relies of the presence of a `DANDI_API_KEY` +Once your DANDI clone is added to list of available `DandiInstance` objects, you should be able to perform operations via the `-i` flag -- for example: + +`dandi upload -i ` + +**Note**: Users will be prompted for a `DANDI_API_KEY` env. var [see here for code reference](https://github.com/dandi/dandi-cli/blob/6aa414c4db47394970f586cc4fb9758a634aef87/dandi/dandiapi.py#L492-L499) -Dependent on the structure of your project, you might want to reflect a specific, unique environment variable value. +You do not need to create a unique value here -- a user can just reference the `DANDI_API_KEY` their API issues in their respective clone. ## Handling Versioning