Skip to content

Commit 3b0fa7f

Browse files
authored
Merge pull request #565 from superannotateai/docs_update
docs update quickstart page
2 parents 0358cd6 + a468dfd commit 3b0fa7f

File tree

2 files changed

+44
-39
lines changed

2 files changed

+44
-39
lines changed

docs/source/cli_client.rst

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ With SuperAnnotate CLI, basic tasks can be accomplished using shell commands:
1010
1111
superannotatecli <command> <--arg1 val1> <--arg2 val2> [--optional_arg3 val3] [--optional_arg4] ...
1212
13-
To use the CLI a command line initialization step should be performed after the
14-
15-
:ref:`installation <ref_quickstart>`:
16-
17-
.. code-block:: bash
18-
19-
superannotatecli init
20-
2113
----------
2214

2315

@@ -34,7 +26,9 @@ To initialize CLI (and SDK) with team token:
3426

3527
.. code-block:: bash
3628
37-
superannotatecli init
29+
superannotatecli init --token <token>
30+
[--logging_level <NOTSET/INFO/DEBUG/WARNING/ERROR/CRITICAL (Default=INFO)>]
31+
[--logging_path <Default=/Users/username/.superannotate/logs>]
3832
3933
----------
4034

@@ -152,7 +146,7 @@ To upload preannotations from folder to project use:
152146
superannotatecli upload-preannotations --project <project_name> --folder <folder_path>
153147
[--format "COCO" or "SuperAnnotate"]
154148
[--dataset-name "<dataset_name_for_COCO_projects>"]
155-
[--task "<task_type_for_COCO_projects>]
149+
[--task "<task_type_for_COCO_projects>"]
156150
157151
158152
Optional argument *format* accepts input annotation format. It can have COCO or SuperAnnotate values.
@@ -180,7 +174,7 @@ To upload annotations from folder to project use:
180174
superannotatecli upload-annotations --project <project_name> --folder <folder_path>
181175
[--format "COCO" or "SuperAnnotate"]
182176
[--dataset-name "<dataset_name_for_COCO_projects>"]
183-
[--task "<task_type_for_COCO_projects>]
177+
[--task "<task_type_for_COCO_projects>"]
184178
185179
Optional argument *format* accepts input annotation format. It can have COCO or SuperAnnotate values.
186180
If the argument is not given then SuperAnnotate (the native annotation format) is assumed.

docs/source/userguide/quickstart.rst

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,64 +32,71 @@ beforehand. The package works well only under the Anaconda distribution with:
3232
3333
conda install shapely
3434
35-
3635
----------
3736

37+
3838
Initialization and authorization
3939
================================
4040

41-
Config file
42-
~~~~~~~~~~~
43-
4441
To use the SDK, you need to create a config file with a team-specific authentication token. The token is available
4542
to team admins on the team settings page at https://app.superannotate.com/team.
4643

47-
Default location config file
48-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44+
SAClient can be used with or without arguments
45+
______________________________________________
4946

50-
To generate a default location (:file:`~/.superannotate/config.json`) config file::
47+
**Without arguments**
5148

52-
~/(home directory)
53-
└── .superannotate
54-
├── config.ini
49+
.. code-block:: python
5550
51+
from superannotate import SAClient
5652
57-
:ref:`CLI init <ref_cli_init>` can be used:
5853
59-
.. code-block:: bash
54+
sa_client = SAClient()
6055
61-
superannotatecli init <token>
56+
*Method 1:* SA_TOKEN is defined as an environment variable.
6257

63-
Custom config file
64-
~~~~~~~~~~~~~~~~~~
65-
.. _ref_custom_config_file:
58+
*Method 2:* Generate a default location (~/.superannotate/config.ini) config file. :ref:`CLI init <ref_cli_init>` should be used:
6659

67-
To create a custom config file a new INI file with key "token" can be created:
60+
.. code-block:: bash
6861
69-
.. code-block:: ini
62+
superannotatecli init --token <token>
63+
[--logging_level <NOTSET/INFO/DEBUG/WARNING/ERROR/CRITICAL (Default=INFO)>]
64+
[--logging_path <Default=/Users/username/.superannotate/logs>]
7065
71-
[DEFAULT]
72-
SA_TOKEN = <token>
73-
LOGGING_LEVEL = INFO
74-
LOGGING_PATH = ~/.superannotate/logs
7566
67+
**Arguments provided**
7668

77-
Include the package in your Python code:
69+
*Method 1:* Use the token as an argument:
7870

7971
.. code-block:: python
8072
8173
from superannotate import SAClient
8274
83-
SDK is ready to be used if default location config file was created using
84-
the :ref:`CLI init <ref_cli_init>`. Otherwise to authenticate SDK with the :ref:`custom config file <ref_custom_config_file>`:
75+
76+
SAClient(token="<token>")
77+
78+
79+
*Method 2:* Create a custom config file:
8580

8681
.. code-block:: python
8782
88-
sa = SAClient(config_path="<path_to_config_file>")
83+
from superannotate import SAClient
84+
85+
86+
sa_client = SAClient(config_path="~/.superannotate/dev-config.ini")
87+
88+
89+
Custom config.ini example:
8990

91+
.. code-block:: ini
92+
93+
[DEFAULT]
94+
SA_TOKEN = <token>
95+
LOGGING_LEVEL = DEBUG
96+
LOGGING_PATH = /Users/username/data/superannotate_logs
9097
98+
----------
9199

92-
.. _basic-use:
93100

94101
Creating a project
95102
==================
@@ -103,6 +110,8 @@ To create a new "Vector" project with name "Example Project 1" and description
103110
104111
sa.create_project(project, "test", "Vector")
105112
113+
----------
114+
106115

107116
Uploading images to project
108117
===========================
@@ -129,6 +138,8 @@ See the full argument options for
129138
If project name is used it should be unique in team's project list. Using project metadata will give
130139
performance improvement.
131140

141+
----------
142+
132143

133144
Working with images
134145
===================
@@ -154,7 +165,7 @@ Upload back to the platform with:
154165
155166
sa.upload_image_annotations(project, image, "<path_to_json>")
156167
157-
168+
---------
158169

159170

160171
Working with team contributors

0 commit comments

Comments
 (0)