Skip to content

Commit 2237152

Browse files
committed
More small tidy ups.
1 parent 86cf5a6 commit 2237152

File tree

5 files changed

+49
-51
lines changed

5 files changed

+49
-51
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
(getting-started-walkthrough)=
22
## Getting Started Walkthrough
33

4+
:::{note}
5+
6+
This walkthrough was written at ``datashuttle`` version `0.3.0`. While the
7+
interface may look slightly different, core functionality remains the same.
8+
9+
:::
10+
411
This tutorial will give a full introduction to managing
512
a neuroscience project with ``datashuttle``.
613

docs/source/pages/get_started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ formatting issues.
4545
Start a new project or manage an existing project.
4646
:::
4747

48-
:::{grid-item-card} {fas}`desktop;sd-text-primary` Full Walkthrough
48+
:::{grid-item-card} {fas}`desktop;sd-text-primary` Walkthrough
4949
:link: getting-started
5050
:link-type: doc
5151
:class-img-top: tutorial-link-image

docs/source/pages/get_started/quick-validate-project.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@
22

33
# Quickly Validate an Existing Project
44

5-
Datashuttle provides the functionality to validate an existing
6-
[NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html)-formatted project.
7-
All NeuroBlueprint issues will be flagged, including a filepath pointing to
8-
problematic folders.
9-
10-
Below, we explore how to quickly validate a NeuroBlueprint-formatted
11-
project without setting up a full project in ``datashuttle``.
5+
``datashuttle`` can validate an existing
6+
[NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html)-formatted project given only the filepath.
7+
All [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) issues will be flagged along with the full filepath
8+
to any problematic folders.
129

1310
::::{tab-set}
1411

1512
:::{tab-item} Graphical Interface
1613
:sync: gui
1714

1815
To quickly validate a project, start the terminal user interface with
19-
``datashuttle launch`` and click ``"Validate Project at Path"``.
16+
``datashuttle launch`` and click ``Validate Project at Path``.
2017

21-
This will open the screen below. To validate an existing project,
18+
The screen below will show. To validate an existing project,
2219
enter the full filepath to the project folder in the top input box
2320
and click ``Validate``:
2421

@@ -35,19 +32,19 @@ and click ``Validate``:
3532
<br>
3633

3734
Any validation errors detected in the project will be displayed in the logging box.
38-
See ``Strict Mode`` below for key details on how the validation is performed.
35+
See ``Strict Mode`` below for details on how the validation is performed.
3936

4037
**Options:**
4138

4239
Top level folder dropdown
4340
: The top-level folder to validate the folders within.
4441

4542
Strict Mode
46-
: If `True`, only allow NeuroBlueprint-formatted folders to exist in
47-
the project. By default, non-NeuroBlueprint folders (e.g. a folder
48-
called 'my_stuff' in the 'rawdata') are allowed, and only folders
49-
starting with sub- or ses- prefix are checked. In `Strict Mode`,
50-
any folder not prefixed with sub-, ses- or a valid datatype will
43+
: If `True`, only [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html)-formatted folders are allowed
44+
in the project. By default, non-[NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) folders (e.g. a folder
45+
called `my_stuff` in the `rawdata`) are allowed, and only folders
46+
starting with `sub-` or `ses-` prefix are checked. In `Strict Mode`,
47+
any folder not prefixed with `sub-`, `ses-` or a valid datatype will
5148
raise a validation issue.
5249

5350
:::
@@ -68,8 +65,8 @@ quick_validate_project(
6865

6966
```
7067

71-
In this case, display_mode=error will result in an error on the first encountered validation issue.
72-
Otherwise "warn" will show a python warning for all detected issues, while "print" will print directly to console.
68+
In this case, `display_mode=error` will result in an error on the first encountered validation issue.
69+
Otherwise, `"warn"` will show a python warning for all detected issues, while `"print"` will print directly to console.
7370

7471
See the [](datashuttle.quick_validate_project) API documentation at the link,
7572
for full details of parameters including the important argument ``strict_mode``
@@ -78,3 +75,5 @@ that controls how validation is performed.
7875
:::
7976

8077
::::
78+
\
79+
More detail on validation options can be found in the [Validation](tutorial-validation) user guide.

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

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
(set-up-a-project_)=
22
## Set up a Project
33

4-
``datashuttle`` can be used to create, validate and transfer
5-
[NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) projects. The first section will
6-
set up a local-only project that can manage creation
4+
The first section of this guide will
5+
set up a "local-only" project that can manage creation
76
and validation of project folders. This requires
8-
only minimal configurations to get started.
7+
only minimal configuration to get started.
98

109
To see how a datashuttle project can be set up for transfer,
11-
see the [Set up a project for transfer](set-up-a-project-for-transfer) section.
10+
visit [Set up a project for transfer](set-up-a-project-for-transfer) section.
1211

1312

1413
::::{tab-set}
@@ -19,8 +18,8 @@ see the [Set up a project for transfer](set-up-a-project-for-transfer) section.
1918
Selecting `Make New Project` will take you to the project set up screen.
2019

2120
Enter the name of your project, the path to your project folder and
22-
select `No connection (local only)` (note that the central-path options
23-
are now disabled).
21+
select `No connection (local only)` (note that the central-path option
22+
is now disabled).
2423

2524
```{image} /_static/screenshots/how-to-make-local-project-configs-dark.png
2625
:align: center
@@ -47,11 +46,6 @@ You will now be able to go to the project manager screen:
4746
:class: only-light
4847
:width: 900px
4948
```
50-
<br>
51-
52-
53-
See the [create folders](how-to-create-folders) and [validate folders](tutorial-validation)
54-
for details on how to create and validate your project.
5549

5650
:::
5751

@@ -80,7 +74,7 @@ project.make_config_file(
8074
)
8175

8276
```
83-
77+
\
8478
The project is now ready for use, and in future can be instantiated only
8579
with the line ``project = DataShuttle("my_project_name")`` (i.e. you will not
8680
have to set the `local_path` again).
@@ -102,24 +96,23 @@ New project folders can also be created in the local folder:
10296
project.create_folders("rawdata", "sub-001", "ses-001_@DATE@", datatype=["ephys", "behav"])
10397
```
10498

105-
see [Create Folders](how-to-create-folders) for more details.
106-
10799
:::
108100
::::
109101

110-
111102
Now, this project is ready for creating and validating
112-
folders to the [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) standard.
103+
folders to the [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) standard. See the [create folders](how-to-create-folders)
104+
and [validate folders](tutorial-validation) for details.
105+
113106
If you would also like to transfer files to a central machine, see the next section.
114107

115108
(set-up-a-project-for-transfer)=
116109
## Set up a project for transfer
117110

118111
Above, we have set up a ``datashuttle`` project by providing the **project name**
119-
and **local path**. For data transfer, transfer across the local filesystem or via SSH
120-
is supported. Therefore, we will need to provide:
112+
and **local path**. Transfer across the local filesystem or via SSH is supported.
113+
Therefore, we will need to provide:
121114

122-
1) **central path**: location of the project on the central data storage machine.
115+
1) **central path**: location of the project on the central storage machine.
123116
2) Connection-specific settings (e.g. if using SSH).
124117

125118
```{image} /_static/datashuttle-overview-dark.png
@@ -313,7 +306,6 @@ Clicking `Save` will save these project configs. A button
313306
confirm the server ID and enter your password
314307
(you will only need to do this once).
315308

316-
317309
:::
318310
:::{tab-item} Python API
319311
:sync: python

docs/source/pages/user_guides/validate.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Below we will cover how to validate a datashuttle-managed project
1414
# Validating a local project
1515

1616
Validation will highlight validation errors within a project. For example, consider
17-
``my_project``, which has a NeuroBlueprint error (a subject that does not have an integer value):
17+
``my_project``, which has a [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html)
18+
error (a subject that does not have an integer value):
1819

1920
```shell
2021
└── my_project/
@@ -54,7 +55,7 @@ for details on the options.
5455

5556
Project validation can be run with the [](datashuttle.DataShuttle.validate_project) function.
5657

57-
Violations of the NeuroBlueprint can be set to raise an error, be displayed as warnings or printed as output.
58+
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.
5859
They are also returned in a list of strings.
5960

6061
```python
@@ -71,7 +72,7 @@ error_messages = project.validate_project(
7172
# UserWarning: BAD_VALUE: The value for prefix sub in name sub-abc is not an integer. Path: <path to folder>
7273
```
7374

74-
This outputs any NeuroBlueprint validation as a warning.
75+
This outputs any [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) validation as a warning.
7576

7677
The returned ``error_messages`` is a last of strings containing all validation errors, to be used if required e.g.:
7778

@@ -81,7 +82,7 @@ print(error_messages)
8182
```
8283

8384
The options for `display_mode` and ``"error"``, ``"warn"`` and ``"print"``.
84-
For `"error"`, only the first encountered NeuroBlueprint violation will be raised.
85+
For `"error"`, only the first encountered [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) violation will be raised.
8586

8687
:::
8788

@@ -100,11 +101,10 @@ use ``strict_mode``.
100101

101102
## ``strict_mode``
102103

103-
In strict-mode, all folders outside the
104-
``datatype`` ]()
105-
folder (e.g. ``"ephys"``) must be NeuroBlueprint-formatted.
104+
In strict-mode, all folders outside the ``datatype`` folder (e.g. ``"ephys"``)
105+
must be [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html)-formatted.
106106

107-
NeuroBlueprint does not require all folders in the project to be NeuroBlueprint-formatted ``sub-``, ``ses-`` or
107+
[NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) does not require all folders in the project to be [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html)-formatted ``sub-``, ``ses-`` or
108108
datatype folders.
109109

110110
For example, ``some_other_folder``:
@@ -119,10 +119,10 @@ For example, ``some_other_folder``:
119119
```
120120

121121
However, this means it is hard to validate all folder names, as it is not possible to determine whether
122-
these are mistkaes e.g. ``rat-001`` or auxiliary folders. By default, ``datashuttle`` will only look for
122+
these are mistakes e.g. ``rat-001`` or auxiliary folders. By default, ``datashuttle`` will only look for
123123
``sub-`` or ``ses-`` prefixed files to validate.
124124

125-
In ``strict_mode``, non-NeuroBlueprint formatted folders are not allowed (except within datatype folders).
125+
In ``strict_mode``, non-[NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev/latest/index.html) formatted folders are not allowed (except within datatype folders).
126126
Therefore, any additional folders at the subject or session level will raise a validation error, for example:
127127

128128
```python
@@ -140,9 +140,9 @@ project.validate_project(
140140

141141
Validation can be performed across all folders in projects in which data is transferred
142142
between a 'local' and 'central' machine. The validation will combine ``sub-`` and ``ses-``
143-
folders across 'local' and 'central' before validation. This is useful check against inconsistent value lengths
143+
folders across local and central before validation. This is useful check against inconsistent value lengths
144144
(e.g. `sub-001` vs `sub-02`) and duplicate names (e.g. ``sub-001`` and ``sub-001_date-20240101``) across
145-
the 'local' and 'central' project.
145+
the local and central project.
146146

147147
To perform this type of validation, connection configurations [must be set](set-up-a-project-for-transfer).
148148
The ``include_central`` argument must be set to ``True``:

0 commit comments

Comments
 (0)