Skip to content

Commit de34018

Browse files
committed
Set functions to API links.
1 parent f3612d9 commit de34018

9 files changed

Lines changed: 41 additions & 34 deletions

File tree

datashuttle/datashuttle_class.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,17 @@ def make_config_file(
10711071
ds_logger.close_log_filehandler()
10721072

10731073
def update_config_file(self, **kwargs) -> None:
1074-
"""Update the configuration file."""
1074+
"""Update the configuration file.
1075+
1076+
Parameters
1077+
----------
1078+
**kwargs
1079+
A dictionary of key-value pairs containing the config
1080+
settings to update. For example,
1081+
``{"connection_method": "local_filesystem", "central_path": "/my/local/path"}``
1082+
will update the ``connection_method`` and ``central_path`` settings.
1083+
1084+
"""
10751085
if not self.cfg:
10761086
utils.log_and_raise_error(
10771087
"Must have a config loaded before updating configs.",

docs/source/pages/get_started/getting-started.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ We need to set the:
9494

9595
``datashuttle`` supports connecting to the central storage machine
9696
either as a mounted drive or through SHH. \
97-
See [Set up configs for transfer(set-up-a-project-for-transfer)
97+
See [Set up configs for transfer](set-up-a-project-for-transfer)
9898
for detailed instructions for
9999
connecting a mounted drive or by using SSH.
100100

@@ -198,7 +198,7 @@ from datashuttle import DataShuttle
198198
project = DataShuttle("my_first_project")
199199
```
200200

201-
Next, we will use the `make_config_file()` method set the
201+
Next, we will use the [](make_config_file()) method set the
202202
configurations ('configs') for our project.
203203

204204

@@ -220,7 +220,7 @@ project.make_config_file(
220220
)
221221
```
222222

223-
If you want to change any config in the future, use the `update_config_file()` method
223+
If you want to change any config in the future, use the [](update_config_file()) method
224224

225225
```python
226226
project.update_config_file(
@@ -328,7 +328,7 @@ Finally, click `Create Folders` to create the project folders.
328328
:::
329329
:::{tab-item} Python API
330330
:sync: python
331-
We will create project folders with the `create_folders()` method.
331+
We will create project folders with the [](create_folders()) method.
332332

333333
Following the [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/)
334334
style we will call the first subject `sub-001`. Additional key-value pairs
@@ -360,8 +360,8 @@ An error will be raised if names break with the specification and
360360
the folders will not be created.
361361
```
362362

363-
Two useful methods to automate folder creation are `get_next_sub()` and
364-
`get_next_ses()`. These can be used to automatically get the next subject
363+
Two useful methods to automate folder creation are [](get_next_sub()) and
364+
[](get_next_ses()). These can be used to automatically get the next subject
365365
and session names in a project.
366366

367367
To get the next subject in this project (`sub-002`) and the next
@@ -450,7 +450,7 @@ Finally, hover the mouse over the `Directory Tree` and press `CTRL+R` to refresh
450450
:::{tab-item} Python API
451451
:sync: python
452452

453-
`create_folders()` returns the full filepaths of created datatype folders.
453+
[](create_folders()) returns the full filepaths of created datatype folders.
454454

455455
These can be used in acquisition scripts to save data to these folders:
456456

@@ -543,7 +543,7 @@ Next, we will use `Custom` transfers to move only a subset of the dataset.
543543
:::{tab-item} Python API
544544
:sync: python
545545

546-
`upload_entire_project()` is a high level method that uploads all files
546+
[](upload_entire_project()) is a high level method that uploads all files
547547
in the project.
548548
This includes both the `rawdata` and `derivatives` top-level folders—see the
549549
[NeuroBlueprint specification](https://neuroblueprint.neuroinformatics.dev/latest/specification.html)
@@ -560,7 +560,7 @@ All files will be uploaded from the local version of the project to central stor
560560
Navigating to the `central_path` in your systems file browser, the newly transferred data
561561
will have appeared.
562562

563-
Other methods (e.g. `upload_rawdata()` and `upload_custom()`) provide customisable
563+
Other methods (e.g. [](upload_rawdata()) and [](upload_custom())) provide customisable
564564
transfers (and every `upload` method has an equivalent `download` method).
565565

566566
See the [How to Transfer Data](how-to-transfer-data) page for full details
@@ -683,8 +683,8 @@ of files will now be available in the **local path**.
683683
:::{tab-item} Python API
684684
:sync: python
685685

686-
We will use the `download_custom()` method (the download equivalent method of
687-
the `upload_custom()`).
686+
We will use the [](download_custom()) method (the download equivalent method of
687+
the [](upload_custom())).
688688

689689
Convenience tags can be used to make downloading subsets of data easier:
690690

docs/source/pages/get_started/set-up-a-project.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@ project.make_config_file(
7474

7575
```
7676
\
77-
The project is now ready for use, and in future can be instantiated
78-
with the line ``project = DataShuttle("my_project_name")`` (i.e. you will not
79-
have to set the `local_path` again).
77+
The project is now ready for use, and in future can be instantiated with the line:
78+
```python
79+
project = DataShuttle("my_project_name")
80+
```
81+
(i.e. you will not have to set the `local_path` again).
8082

81-
If you wish to change the project settings at a later time, use ``project.update_config_file()``.
83+
If you wish to change the project settings at a later time, use [](update_config_file()).
8284

8385
:::
8486
::::
@@ -201,7 +203,7 @@ project = DataShuttle("my_first_project")
201203
202204
```
203205

204-
Next, the `make_config_file()` method can be used to set up a new
206+
Next, the [](make_config_file()) method can be used to set up a new
205207
project with the desired **local path**, **central path** and
206208
**connection method**.
207209

docs/source/pages/user_guides/create-folders.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ any alphanumeric character, rather than restricted to integers.
161161
:::{tab-item} Python API
162162
:sync: python
163163

164-
The `create_folders()` method is used for folder creation.
164+
The [](create_folders()) method is used for folder creation.
165165

166166
We simply need to provide the subject, session and datatypes to create:
167167

@@ -178,9 +178,8 @@ created_folders = project.create_folders(
178178
)
179179
```
180180

181-
The method outputs `created_folders`, which contains the
182-
`Path`s to created datatype folders. See the below section for
183-
details on the `@DATE@` and other convenience tags.
181+
`created_folders` is a list containing `Path`s to created datatype folders.
182+
See the below section for details on the `@DATE@` and other convenience tags.
184183

185184
By default, an error will be raised if the folder names break
186185
with [Neuroblueprint](https://neuroblueprint.neuroinformatics.dev/)

docs/source/pages/user_guides/read-logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Clicking `Open Most Recent` will open the most recently saved logs.
4444
:sync: python
4545

4646
The path where logs are stored can be accessed by running
47-
`get_logging_path()`:
47+
[](get_logging_path()):
4848

4949
```python
5050
logs_path = project.get_logging_path()

docs/source/pages/user_guides/transfer-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Click `Transfer` to begin.
146146
:::{tab-item} Python API
147147
:sync: python
148148

149-
The `upload_rawdata()`, `upload_derivatives()` and `download_rawdata()`, `download_derivatives()`
149+
The [](upload_rawdata()), [](upload_derivatives()) and [](download_rawdata()), [](download_derivatives())
150150
methods target transfer to a particular top-level folder.
151151

152152
The below example will upload `rawdata` then download `derivatives`.
@@ -221,7 +221,7 @@ Finally, click `Transfer` to begin.
221221
:::{tab-item} Python API
222222
:sync: python
223223

224-
The `upload_custom()` and `download_custom()` methods can be used for custom
224+
The [](upload_custom()) and [](download_custom()) methods can be used for custom
225225
data transfers. For example, to perform a custom upload:
226226

227227
```python

docs/source/pages/user_guides/update-configs.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If SSH configs are changed the connection may need to be
3535
:sync: python
3636

3737
The project configs on the local machine can be selectively
38-
updated with the `update_config_file()` method.
38+
updated with the [](update_config_file()) method.
3939

4040
For example, to change the `local_path` and `central_path`:
4141

@@ -46,12 +46,8 @@ project.update_config_file(
4646
)
4747
```
4848

49-
If SSH, AWS or Google Drive configs are changed the connection may need to be
50-
[set up again](new-project-ssh) with:
51-
52-
```python
53-
project.setup_ssh_connection()
54-
```
49+
If SSH, AWS or Google Drive configs are changed the connection
50+
may need to be [set up again](new-project-ssh).
5551

5652
:::
5753
::::

docs/source/pages/user_guides/use-name-templates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ will be automatically saved. These settings will persist across
6161
:::{tab-item} Python API
6262
:sync: python
6363

64-
The `set_name_templates()` and `get_name_templates()` can be used
64+
The [](set_name_templates()) and [](get_name_templates()) can be used
6565
to set and get current name template settings.
6666

67-
`set_name_templates` takes as input the `name_template` dictionary,
67+
[](set_name_templates()) takes as input the `name_template` dictionary,
6868
which is formatted as below:
6969

7070
```

docs/source/pages/user_guides/validate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ for details on the options.
5353
:sync: python
5454

5555

56-
Project validation can be run with the [](datashuttle.DataShuttle.validate_project) function.
56+
Project validation can be run with the [](validate_project) function.
5757

5858
Violations of the [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) can be set to raise an error, be displayed as warnings or printed as output.
5959
They are also returned in a list of strings.

0 commit comments

Comments
 (0)