Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'ak-link' into ak-zarr-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Aug 2, 2024
2 parents e010988 + a59d808 commit 45f8d9a
Show file tree
Hide file tree
Showing 25 changed files with 105 additions and 101 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build Docs
on:
push:
branches:
- master
- ak-link
pull_request:

jobs:
Expand All @@ -13,10 +13,10 @@ jobs:
fail-fast: false
matrix:
python:
- 3.8
#- 3.9
#- 3.10
#- 3.11
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions docs/source/cmdline/dandi.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
:program:`lincbrain`
================
====================

::

lincbrain [<global options>] <subcommand> [<arguments>]

A command-line client for interacting with the `DANDI Archive
<http://dandiarchive.org>`_.
A command-line client for interacting with the `LINC Data Platform
<http://lincbrain.org>`_.

Global Options
--------------
Expand Down
4 changes: 2 additions & 2 deletions docs/source/cmdline/delete.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:program:`lincbrain delete`
=======================
===========================

::

Expand All @@ -10,7 +10,7 @@ Delete datasets and assets from the server.
Each argument must be either a file path pointing to an asset file or directory
in a local datasets (in which case the corresponding assets are deleted on the
remote server) or a :ref:`resource identifier <resource_ids>` pointing to a
remote asset, directory, or entire Dandiset.
remote asset, directory, or entire dataset.

Options
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/cmdline/digest.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:program:`lincbrain digest`
=======================
===========================

::

Expand Down
4 changes: 2 additions & 2 deletions docs/source/cmdline/download.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:program:`lincbrain download`
=========================
=============================

::

lincbrain [<global options>] download [<options>] <url> ...

Download one or more Dandisets, assets, or folders of assets from DANDI.
Download one or more datasets, assets, or folders of assets from LINC.

See :ref:`resource_ids` for allowed URL formats.

Expand Down
12 changes: 6 additions & 6 deletions docs/source/cmdline/instances.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:program:`lincbrain instances`
==========================
==============================

::

lincbrain [<global options>] instances

List known Dandi Archive instances that can be passed to the
List known LINC Archive instances that can be passed to the
``-i``/``--dandi-instance`` option of other subcommands for the CLI to
interact with. Output is in YAML.

Expand All @@ -14,11 +14,11 @@ Example output:
.. code:: yaml
dandi:
api: https://api.dandiarchive.org/api
gui: https://gui.dandiarchive.org
api: https://api.lincbrain.org/api
gui: https://lincbrain.org
dandi-api-local-docker-tests:
api: http://localhost:8000/api
gui: http://localhost:8085
dandi-staging:
api: https://api-staging.dandiarchive.org/api
gui: https://gui-staging.dandiarchive.org
api: https://staging-api.lincbrain.org/api
gui: https://staging.lincbrain.org
6 changes: 3 additions & 3 deletions docs/source/cmdline/ls.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:program:`lincbrain ls`
===================
=======================

::

lincbrain [<global options>] ls [<options>] [<path|url> ...]

List :file:`*.nwb` files' and Dandisets' metadata.
List :file:`*.nwb` files' and datasets' metadata.

The arguments may be either :ref:`resource identifiers <resource_ids>` or paths
to local files/directories.
Expand Down Expand Up @@ -42,7 +42,7 @@ Options

.. option:: -r, --recursive

Recurse into Dandisets/directories. Only :file:`*.nwb` files will be
Recurse into datasets/directories. Only :file:`*.nwb` files will be
considered.

.. option:: --schema <version>
Expand Down
10 changes: 5 additions & 5 deletions docs/source/cmdline/move.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:program:`lincbrain move`
=====================
=========================

::

Expand All @@ -24,10 +24,10 @@ single source path is renamed to the given destination path.

Alternatively, if the ``--regex`` option is given, then there must be exactly
two arguments on the command line: a `Python regular expression`_ and a
replacement string, possibly containing regex backreferences. :program:`dandi
replacement string, possibly containing regex backreferences. :program:`lincbrain
move` will then apply the regular expression to the path of every asset in the
current directory recursively (using paths relative to the current directory,
if in a subdirectory of a Dandiset); if a path matches, the matching portion is
if in a subdirectory of a dataset); if a path matches, the matching portion is
replaced with the replacement string, after expanding any backreferences.

.. _Python regular expression: https://docs.python.org/3/library/re.html
Expand Down Expand Up @@ -76,7 +76,7 @@ Options

Whether to operate on the local dataset in the current directory, a remote
dataset (either one specified by the ``--dandiset`` option or else the one
corresponding to the local Dandiset), or both at once. If ``auto`` (the
corresponding to the local dataset), or both at once. If ``auto`` (the
default) is given, it is treated the same as ``remote`` if a ``--dandiset``
option is given and as ``both`` otherwise.

Expand Down Expand Up @@ -106,7 +106,7 @@ Examples
To rename the file only in the local or remote instance, insert ``--work-on
local`` or ``--work-on remote`` after ``move``.

- When not working in a local clone of a Dandiset, a file can be renamed in a
- When not working in a local clone of a dataset, a file can be renamed in a
remote dataset on a server by providing a resource identifier for the
dataset to the ``--dandiset`` option. For example, in order to operate on
dataset 123456 on the main ``lincbrain`` instance, use::
Expand Down
14 changes: 7 additions & 7 deletions docs/source/cmdline/organize.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _dandi_organize:
.. _lincbrain_organize:

:program:`lincbrain organize`
=========================
=============================

::

Expand Down Expand Up @@ -35,17 +35,17 @@ In addition, an "obj" key with a value corresponding to the crc32 checksum of
"object_id" is added if the aforementioned keys and the list of modalities are
not sufficient to disambiguate different files.

You can visit https://dandiarchive.org for a growing collection of
(re)organized dandisets.
You can visit https://lincbrain.org for a growing collection of
(re)organized datasets.

Options
-------

.. option:: -d, --dandiset-path <dir>

The root directory of the Dandiset to organize files under. If not
specified, the Dandiset under the current directory is assumed. For
'simulate' mode, the target Dandiset/directory must not exist.
The root directory of the dataset to organize files under. If not
specified, the dataset under the current directory is assumed. For
'simulate' mode, the target dataset/directory must not exist.

.. option:: -f, --files-mode [dry|simulate|copy|move|hardlink|symlink|auto]

Expand Down
14 changes: 7 additions & 7 deletions docs/source/cmdline/service-scripts.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:program:`lincbrain service-scripts`
================================
====================================

::

Expand All @@ -17,8 +17,8 @@ utility operations.

Recompute & update the metadata for NWB assets on a remote server.

``<url>`` must point to a draft Dandiset or one or more assets inside a draft
Dandiset. See :ref:`resource_ids` for allowed URL formats.
``<url>`` must point to a draft dataset or one or more assets inside a draft
dataset. See :ref:`resource_ids` for allowed URL formats.

Running this command requires the fsspec_ library to be installed with the
``http`` extra (e.g., ``pip install "fsspec[http]"``).
Expand All @@ -38,7 +38,7 @@ Options

- ``newer-schema-version`` (default) — when the ``schemaVersion`` in the
asset's current metadata is missing or older than the schema version
currently in use by DANDI
currently in use by LINC

- ``always`` — always

Expand All @@ -58,12 +58,12 @@ Options

.. option:: -d, --dandiset <DANDISET ID>

Specify the ID of the Dandiset to operate on. This option is required.
Specify the ID of the dataset to operate on. This option is required.

.. option:: -i, --dandi-instance <instance>

DANDI instance (either a base URL or a known instance name) where the
Dandiset is located [default: ``dandi``]
LINC Data Platform instance (either a base URL or a known instance name) where the
dataset is located [default: ``lincbrain``]

.. option:: -e, --existing [ask|overwrite|skip]

Expand Down
8 changes: 4 additions & 4 deletions docs/source/cmdline/shell-completion.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
:program:`lincbrain shell-completion`
=================================
=====================================

::

dandi [<global options>] shell-completion [<options>]
lincbrain [<global options>] shell-completion [<options>]

Emit a shell script for enabling command completion.

Expand All @@ -12,8 +12,8 @@ completion.

Example::

$ source <(dandi shell-completion)
$ dandi --<PRESS TAB to display available option>
$ source <(lincbrain shell-completion)
$ lincbrain --<PRESS TAB to display available option>

Options
-------
Expand Down
6 changes: 3 additions & 3 deletions docs/source/cmdline/upload.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:program:`lincbrain upload`
=======================
===========================

::

Expand All @@ -13,7 +13,7 @@ paths (or the current directory, if no paths are specified) or a parent
directory thereof.

Local datasets should pass validation. For that, the assets should first be
organized using the :ref:`dandi_organize` command.
organized using the :ref:`lincbrain_organize` command.

By default, all :file:`*.nwb`, :file:`*.zarr`, and :file:`*.ngff` assets in the
dataset (ignoring directories starting with a period) will be considered for
Expand Down Expand Up @@ -78,4 +78,4 @@ set to a nonempty value.

.. option:: --upload-dandiset-metadata

Update Dandiset metadata based on the local :file:`dandiset.yaml` file
Update dataset metadata based on the local :file:`dandiset.yaml` file
4 changes: 2 additions & 2 deletions docs/source/cmdline/validate.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:program:`dandi validate`
=========================
:program:`lincbrain validate`
=============================

::

Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import lincbrain

project = "lincbrain"
copyright = "2021-2023, DANDI Team"
author = "DANDI Team"
copyright = "2023-2024, LINC Team"
author = "LINC Team"

# The full version, including alpha/beta/rc tags
version = lincbrain.__version__
Expand Down
14 changes: 9 additions & 5 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
Welcome to the dandi documentation
==================================
Welcome to the lincbrain documentation
======================================

The `dandi <https://github.com/dandi/dandi-cli>`_ library provides both a
command line interface (CLI) and a Python API for interacting with `DANDI
Archive <https://dandiarchive.org>`_.
The `lincbrain <https://github.com/lincbrain/linc-cli>`_ library provides both a
command line interface (CLI) and a Python API for interacting with `LINC Data
Platform <https://lincbrain.org>`_.

The `lincbrain` CLI tool is a fork of the `dandi` CLI tool -- https://github.com/dandi/dandi-cli thus, there are a
handful of references to `dandi` and `Dandisets` throughout these docs. Nevertheless, these docs (and the subsequent
instructions alongside), should be reflected as accurate.

.. toctree::
:maxdepth: 2
Expand Down
6 changes: 3 additions & 3 deletions docs/source/modref/consts.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
``dandi.consts``
================
``lincbrain.consts``
====================

.. automodule:: dandi.consts
.. automodule:: lincbrain.consts

.. NOTE: Due to <https://github.com/sphinx-doc/sphinx/issues/1063>, only
data values with doc comments are included by automodule::, even with
Expand Down
20 changes: 10 additions & 10 deletions docs/source/modref/dandiapi.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.. module:: dandi.dandiapi
.. module:: lincbrain.dandiapi

``dandi.dandiapi``
==================
``lincbrain.dandiapi``
======================

This module provides functionality for interacting with a Dandi Archive server
This module provides functionality for interacting with a LINC Data Platform server
via the REST API. Interaction begins with the creation of a `DandiAPIClient`
instance, which can be used to retrieve `RemoteDandiset` objects (representing
Dandisets on the server) and `BaseRemoteAsset` objects (representing assets
datasets on the server) and `BaseRemoteAsset` objects (representing assets
without any data associating them with their Dandisets). `RemoteDandiset`
objects can, in turn, be used to retrieve `RemoteAsset` objects (representing
assets associated with Dandisets). Aside from `DandiAPIClient`, none of these
assets associated with datasets). Aside from `DandiAPIClient`, none of these
classes should be instantiated directly by the user.

All operations that merely fetch data from the server can be done without
Expand All @@ -21,7 +21,7 @@ method.

Example code for printing the metadata of all assets with "two-photon" in their
``metadata.measurementTechnique[].name`` for the latest published version of
every Dandiset:
every dataset:

.. literalinclude:: /examples/dandiapi-example.py
:language: python
Expand All @@ -33,7 +33,7 @@ be passed to functions of pynwb etc.
.. literalinclude:: /examples/dandiapi-as_readable.py
:language: python

You can see more usages of DANDI API to assist with data streaming at
You can see more usages of LINC API to assist with data streaming at
`PyNWB: Streaming NWB files <https://pynwb.readthedocs.io/en/stable/tutorials/advanced_io/streaming.html>`_.

Client
Expand All @@ -44,8 +44,8 @@ Client
.. autoclass:: DandiAPIClient
:show-inheritance:

Dandisets
---------
Datasets
--------

.. autoclass:: RemoteDandiset()

Expand Down
6 changes: 3 additions & 3 deletions docs/source/modref/dandiarchive.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
``dandi.dandiarchive``
======================
``lincbrain.dandiarchive``
==========================

.. automodule:: dandi.dandiarchive
.. automodule:: lincbrain.dandiarchive
:member-order: bysource
:show-inheritance:
Loading

0 comments on commit 45f8d9a

Please sign in to comment.