Command line client for interaction with DANDI archive elements
Project description
DANDI Client
This project is under heavy development. Beware of hidden and disclosed issues and Work-in-Progress (WiP) (again might be hidden or public).
Installation
At the moment DANDI client releases are available from PyPI. You could install them in your Python (native, virtualenv, or conda) environment via
pip install dandi
dandi tool
This package provides a dandi
command line utility with a basic interface
which should assist you in preparing and uploading your data to and/or obtaining
data from the http://dandiarchive.org:
$> dandi
Usage: dandi [OPTIONS] COMMAND [ARGS]...
A client to support interactions with DANDI archive
(http://dandiarchive.org).
To see help for a specific command, run
dandi COMMAND --help
e.g. dandi upload --help
Options:
--version
-l, --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
Log level name [default: INFO]
--pdb Fall into pdb if errors out
--help Show this message and exit.
Commands:
download Download a file or entire folder from DANDI
ls List .nwb files and dandisets metadata.
organize (Re)organize files according to the metadata.
register Register a new dandiset in the DANDI archive
upload Upload dandiset (files) to DANDI archive.
validate Validate files for NWB (and DANDI) compliance.
Each of the commands has a set of options to alter their behavior. Please run
dandi COMMAND --help
to get more information, e.g.
$> dandi ls --help
Usage: dandi ls [OPTIONS] [PATHS]...
List .nwb files metadata
Options:
-F, --fields TEXT Comma-separated list of fields to display.
An empty value to trigger a list of
available fields to be printed out
-f, --format [auto|pyout|json|json_pp|yaml]
Choose the format/frontend for output. If
'auto', 'pyout' will be used in case of
multiple files, and 'yaml' for a single
file.
--help Show this message and exit.
Preparing and uploading a dandiset to dandiarchive.org
Although some functionality and final interface is still Work-in-Progress (WiP), overall tentative target workflow will be:
-
Collect or convert your data files to NWB format. Files should have
.nwb
file extension. -
Use
dandi validate
to verify that files conform NWB schema and DANDI requirements (WiP) on contained in them metadata. If necessary, adjust your conversion scripts or use helper utilities to address concerns identified bydandi validate
command. -
Use
dandi organize
to- re-layout (move, rename) your files into a consistent naming convention
- generate a template
dataset.yaml
with some fields pre-populated from metadata extracted from the.nwb
files.
-
If file names for some files could not be disambiguated, possibly see in providing additional metadata within
.nwb
files so they could be named without collisions, or file an issue describing your case.dandi ls
command could come useful to quickly view metadata we consider. -
Fill out missing fields marked REQUIRED in the
dataset.yaml
, remove templated RECOMMENDED or OPTIONAL.
Result of the reorganization is a dandiset -- a dataset with consistent layout, and dataset level metadata.
-
Rerun
dandi validate
on the entire dandiset to assure that everything is correct. -
Use
dandi register
to register a new dataset ID on DANDI archive. If you run it within a dandiset, itsdandiset.yaml
will be automatically updated to contain new dandiset identifier. -
Use
dandi upload
to upload your dandiset to the archive "drafts" collection.
If you change anything in your dandiset and decide to update its state in the
archive, just use dandi upload
again.
You could also visit doc/demos/basic-workflow1.sh for an example script which does all above actions (assuming no changes to files are necessary).
Downloading dandiset from the archive
dandi download
can be used to download full dandisets or individual files or
folders from the archive.
Using --existing refresh
option available for
dandi upload
and dandi download
it is possible to avoid transfer if files
are identical locally and in the archive.
Warning: There is no version control tracking beyond checking correspondence of file size and modification time. So in collaborative setting it is possible to "refresh" a file which was modified locally with a version from the archive, or vise versa.
Development/contributing
Please see DEVELOPMENT.md file.
3rd party components included
dandi/support/generatorify.py
From https://github.com/eric-wieser/generatorify, as of 7bd759ecf88f836ece6cdbcf7ce1074260c0c5ef Copyright (c) 2019 Eric Wieser, MIT/Expat licensed.
dandi/tests/skip.py
From https://github.com/ReproNim/reproman, as of v0.2.1-40-gf4f026d Copyright (c) 2016-2020 ReproMan Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dandi-0.7.0.tar.gz
.
File metadata
- Download URL: dandi-0.7.0.tar.gz
- Upload date:
- Size: 125.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1de15e8f44b4bbd27579f7a5f3652dc45cbc1adcc22d952508ad1d2e00cb43f |
|
MD5 | ae147c1b130981e88050a69e7043f26b |
|
BLAKE2b-256 | 1b03d67b13cc7f7ff5103e9a0e7b87651d2bd7dd6e473f4522293267b41d249b |
Provenance
File details
Details for the file dandi-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: dandi-0.7.0-py3-none-any.whl
- Upload date:
- Size: 129.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 658dde9369e47aeda4cbb8b058b89acd03546387c5d01da2d4fb60de81888caf |
|
MD5 | 668a569510ec2d7d215dad150e5144a4 |
|
BLAKE2b-256 | 41c05183b64ecc897af6f641808e100c6d316da87feda8a216a21034ab618292 |