Skip to content

Commit

Permalink
docs: use index.rst to centrally manage toctree
Browse files Browse the repository at this point in the history
  • Loading branch information
graczhual committed Oct 20, 2021
1 parent 304a3ff commit 48e2ba2
Show file tree
Hide file tree
Showing 135 changed files with 281 additions and 282 deletions.
2 changes: 1 addition & 1 deletion docs/source/advanced_features/fusion_dataset/CADC.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ to TensorBay for sharing, reuse, etc.

Remember to execute the commit step after uploading.
If needed, you can re-upload and commit again.
Please see :ref:`this page <features/version_control:Version Control>` for more details about version control.
Please see :ref:`this page <features/version_control/index:Version Control>` for more details about version control.

.. note::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ such as `nuScenes`_ and `KITTI-tracking`_.
.. toctree::
:maxdepth: 1

fusion_dataset/fusion_dataset_structure
fusion_dataset/CADC
fusion_dataset_structure
CADC
14 changes: 7 additions & 7 deletions docs/source/features/dataset_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The typical steps to organize a local dataset:

A catalog is needed only if there is label information inside the dataset.

Take the :ref:`Organization of BSTLD <examples/bstld:Organize Dataset>` as an example.
Take the :ref:`Organization of BSTLD <quick_start/examples/bstld:Organize Dataset>` as an example.


****************
Expand All @@ -57,7 +57,7 @@ There are plenty of benefits of uploading local datasets to TensorBay.
During uploading dataset or data, if the remote path of the data is the same as another data under the same segment,
the old data will be replaced.

Take the :ref:`Upload Dataset of BSTLD <examples/bstld:Upload Dataset>` as an example.
Take the :ref:`Upload Dataset of BSTLD <quick_start/examples/bstld:Upload Dataset>` as an example.

**************
Read Dataset
Expand All @@ -82,7 +82,7 @@ Two types of datasets can be read from TensorBay:
.. _my datasets(or team datasets): https://gas.graviti.cn/tensorbay/dataset-list
.. _TensorBay: https://gas.graviti.cn/tensorbay/

Take the :ref:`Read Dataset of BSTLD <examples/bstld:Read Dataset>` as an example.
Take the :ref:`Read Dataset of BSTLD <quick_start/examples/bstld:Read Dataset>` as an example.

****************
Update Dataset
Expand All @@ -91,7 +91,7 @@ Take the :ref:`Read Dataset of BSTLD <examples/bstld:Read Dataset>` as an exampl
Since TensorBay supports version control, users can update dataset meta, notes, data and labels to a new commit of a dataset.
Thus, different versions of data and labels can coexist in one dataset, which greatly facilitates the datasets' maintenance.

Please see :ref:`Update dataset<examples/update_dataset:Update Dataset>` example for more details.
Please see :ref:`Update dataset<quick_start/examples/update_dataset:Update Dataset>` example for more details.

***************
Move and Copy
Expand All @@ -112,20 +112,20 @@ Moving is only supported within one dataset.

The target dataset of copying and moving must be in :ref:`reference/glossary:draft` status.

Please see :ref:`Move and copy<examples/move_and_copy:Move And Copy>` example for more details.
Please see :ref:`Move and copy<quick_start/examples/move_and_copy:Move And Copy>` example for more details.

****************
Merge Datasets
****************

Since TensorBay supports copy operation between different datasets, users can use it to merge datasets.

Please see :ref:`examples/merge_datasets:Merge Datasets` example for more details.
Please see :ref:`quick_start/examples/merge_datasets:Merge Datasets` example for more details.

**********************
Get Label Statistics
**********************

TensorBay supports getting label statistics of dataset.

Please see :ref:`examples/get_label_statistics:Get Label Statistics` example for more details.
Please see :ref:`quick_start/examples/get_label_statistics:Get Label Statistics` example for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Tensorbay encourages workflows that branch often, even multiple times in a day.

Before operating branches, a dataset client instance with existing commit is needed.

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Authorize a Dataset Client Instance"""
:end-before: """"""
Expand All @@ -23,15 +23,15 @@ Create Branch on the Current Commit

TensorBay SDK supports creating the branch straightforwardly, which is based on the current commit.

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Create Branch"""
:end-before: """"""

Then the dataset client will storage the branch name. "main" is the default branch, it will be created when init the
dataset

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Branch Name Will Be Stored"""
:end-before: """"""
Expand All @@ -41,36 +41,36 @@ Create Branch on a Revision

Also, creating a branch based on a revision is allowed.

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Create Branch Based On a Revision"""
:end-before: """"""

The dataset client will checkout to the branch. The stored commit id is from the commit which the branch points to.

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Branch Name Will Be Stored(Revision)"""
:end-before: """"""

Specially, creating a branch based on a former commit is permitted.

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Create Branch Based On a Former Commit"""
:end-before: """"""

Similarly, the dataset client will checkout to the branch.

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Branch Name Will Be Stored(Former Commit)"""
:end-before: """"""

Then, through creating and committing the draft
based on the branch, diverging from the current line of development can be realized.

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Create and Commit Draft"""
:end-before: """"""
Expand All @@ -79,7 +79,7 @@ based on the branch, diverging from the current line of development can be reali
List Branches
***************

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """List Branches"""
:end-before: """"""
Expand All @@ -88,7 +88,7 @@ based on the branch, diverging from the current line of development can be reali
Get Branch
************

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Get a Branch"""
:end-before: """"""
Expand All @@ -97,7 +97,7 @@ based on the branch, diverging from the current line of development can be reali
Delete Branch
***************

.. literalinclude:: ../../../docs/code/branch.py
.. literalinclude:: ../../../../docs/code/branch.py
:language: python
:start-after: """Delete a Branch"""
:end-before: """"""
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
TensorBay supports showing changes between commits or drafts.

Before operating the :ref:`reference/glossary:diff`, a dataset client instance with commits is needed.
See more details in :ref:`version_control/draft_and_commit:Draft and Commit`
See more details in :ref:`features/version_control/draft_and_commit:Draft and Commit`

**********
Get Diff
Expand All @@ -16,7 +16,7 @@ through :ref:`reference/glossary:basehead`. Currently, only obtaining the :ref:`
between the head and its parent commit is supported; that is, the head is the given version(commit or draft) while the
base is parent commit of the head.

.. literalinclude:: ../../../docs/code/diff.py
.. literalinclude:: ../../../../docs/code/diff.py
:language: python
:start-after: """Get Diff"""
:end-before: """"""
Expand All @@ -30,7 +30,7 @@ Get Diff on Revision
For example, the following diff records the difference between the commit whose id is ``"3bc35d806e0347d08fc23564b82737dc"``
and its parent commit.

.. literalinclude:: ../../../docs/code/diff.py
.. literalinclude:: ../../../../docs/code/diff.py
:language: python
:start-after: """Get Diff on Commit"""
:end-before: """"""
Expand All @@ -41,7 +41,7 @@ Get Diff on Draft Number
For example, the following diff records the difference between the draft whose draft number is ``1``
and its parent commit.

.. literalinclude:: ../../../docs/code/diff.py
.. literalinclude:: ../../../../docs/code/diff.py
:language: python
:start-after: """Get Diff on Draft"""
:end-before: """"""
Expand Down Expand Up @@ -85,4 +85,4 @@ The attribute "action" represents the status difference of the relative resource
- unmodify
- add
- delete
- modify
- modify
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In TensorBay SDK, the dataset client supplies the function of version control.
Authorization
**************

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """Authorize a Dataset Client Instance"""
:end-before: """"""
Expand All @@ -28,22 +28,22 @@ Create Draft
TensorBay SDK supports creating the draft straightforwardly, which is based on the current branch.
Note that currently there can be only one open draft in each branch.

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """Create Draft"""
:end-before: """"""

Then the dataset client will change the status to "draft" and store the draft number.
The draft number will be auto-increasing every time a draft is created.

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """Draft Number Will Be Stored"""
:end-before: """"""

Also, TensorBay SDK supports creating a draft based on a given branch.

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """Create Draft on a Branch"""
:end-before: """"""
Expand All @@ -57,7 +57,7 @@ The draft number can be found through listing drafts.
``status`` includes "OPEN", "CLOSED", "COMMITTED" and None where None means listing drafts in all status.
``branch_name`` refers to the branch name of the draft to be listed.

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """List Drafts"""
:end-before: """"""
Expand All @@ -66,7 +66,7 @@ The draft number can be found through listing drafts.
Get Draft
**********

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """Get Draft"""
:end-before: """"""
Expand All @@ -77,7 +77,7 @@ Commit Draft

After the commit, the draft will be closed.

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """Commit Draft"""
:end-before: """"""
Expand All @@ -86,7 +86,7 @@ After the commit, the draft will be closed.
Get Commit
***********

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """Get Commit"""
:end-before: """"""
Expand All @@ -95,7 +95,7 @@ Get Commit
List Commits
*************

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """List Commits"""
:end-before: """"""
Expand All @@ -104,7 +104,7 @@ List Commits
Checkout
*********

.. literalinclude:: ../../../docs/code/draft_and_commit.py
.. literalinclude:: ../../../../docs/code/draft_and_commit.py
:language: python
:start-after: """Checkout"""
:end-before: """"""
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Take the `VersionControlDemo Dataset <https://gas.graviti.cn/dataset/graviti-ope

.. _commit-demonstration:

.. figure:: ../images/commit.jpg
.. figure:: ../../images/commit.jpg
:scale: 40 %
:align: center

Expand Down Expand Up @@ -57,7 +57,7 @@ The code below checkouts to the second commit and check the data amount.
As shown above, there are 8 data in the train segment.

See :ref:`version_control/draft_and_commit:Draft and Commit` for more details about commit.
See :ref:`features/version_control/draft_and_commit:Draft and Commit` for more details about commit.

*******
Draft
Expand All @@ -80,7 +80,7 @@ It means the action to turn a draft into a commit.

.. _draft-demonstration:

.. figure:: ../images/draft.jpg
.. figure:: ../../images/draft.jpg
:scale: 30 %
:align: center

Expand Down Expand Up @@ -108,7 +108,7 @@ adds a new segment to the "VersionControlDemo" dataset and does the commit opera
dataset_client.upload_segment(test_segment, jobs=8)
dataset_client.commit("add test segment")
See :ref:`version_control/draft_and_commit:Draft and Commit` for more details about draft.
See :ref:`features/version_control/draft_and_commit:Draft and Commit` for more details about draft.

*****
Tag
Expand All @@ -124,7 +124,7 @@ The tag "v1.0.0" in :numref:`Fig. %s <commit-demonstration>` is added by
dataset_client.create_tag("v1.0.0", revision=SECOND_COMMIT_ID)
See :ref:`version_control/tag:Tag` for more details about tag.
See :ref:`features/version_control/tag:Tag` for more details about tag.

********
Branch
Expand All @@ -146,7 +146,7 @@ and adds :ref:`classification <reference/label_format/Classification:Classificat

.. _branch-demonstration:

.. figure:: ../images/branch.jpg
.. figure:: ../../images/branch.jpg
:scale: 30 %
:align: center

Expand Down Expand Up @@ -179,7 +179,7 @@ and adds :ref:`classification <reference/label_format/Classification:Classificat
dataset_client.commit("add labels to train segment")
See :ref:`version_control/branch:Branch` for more details about branch.
See :ref:`features/version_control/branch:Branch` for more details about branch.

**************
More Details
Expand All @@ -188,8 +188,8 @@ See :ref:`version_control/branch:Branch` for more details about branch.
.. toctree::
:maxdepth: 1

../version_control/draft_and_commit
../version_control/branch
../version_control/tag
../version_control/diff
../version_control/squash_and_merge
draft_and_commit
branch
tag
diff
squash_and_merge
Loading

0 comments on commit 48e2ba2

Please sign in to comment.