Skip to content

Commit 8f8aa90

Browse files
authored
Refactor documentation (#499)
* Refactor to get started. * Add getting started section. * Add datashuttle examples. * Add example scripts. * More edits to documentation. * More tidying up. * Add TUI to valiate configs. * Add examples. * Fix error in formatting. * Fix wrong filenames in walkthrough. * Some tidy ups, update roadmap. * More tidying up. * Fix small errors. * More small tidy ups. * Final tidy ups for documentation. * Tidy up roadmap. * Remove full stops from cards. * Use only python part of example script. * Move 'choose a terminal' to user guides. * First draft on clearer get-started page. * Link to a python install tutorial. * Link to a python install tutorial. * Fix grammer on lab projects page. * Don't capitalise all words in a title. * Update text align. * Add more details to index page. * Revert changes to .css * rework card slightly * Fix center alignment, for header only. * world file -> filepath. * Add fixed title. * Fix title levels/ * Fix name typo. * Update install python link. * Make validate from path page orphan to supress warning. * Fix broken link.
1 parent e4a7631 commit 8f8aa90

34 files changed

+720
-496
lines changed

docs/source/_static/css/custom.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,3 @@ html[data-theme=light] {
4646
height: auto;
4747
margin: 5px auto;
4848
}
49-
50-
.center {
51-
text-align: center;
52-
}
Loading
Loading
Loading
Loading

docs/source/index.md

Lines changed: 72 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
:html_theme.sidebar_secondary.remove:
22

3-
{.center}
4-
# **datashuttle**
3+
<!-- We want to have a centered title, which is difficult in sphinx without centering
4+
the entire page. We need the title here otherwise the tab title defaults to <no-title>.
5+
Therefore, add the title and hide it, then add a custom centered title.
6+
-->
57

6-
<p style="text-align: center; font-size: 22px;">The tool to automate neuroscience project folder creation, validation and transfer.</p>
8+
```{raw} html
9+
<div style="height: 0; visibility: hidden;">
10+
```
11+
# datashuttle
12+
```{raw} html
13+
</div>
14+
```
15+
16+
<p style="text-align: center; font-size: 48px;"><b>datashuttle</b></p>
17+
<p style="text-align: center; font-size: 22px;">Automate the creation, validation and transfer of neuroscience project folders.</p>
718

819
```{image} _static/datashuttle-overview-light.png
920
:alt: My Logo
@@ -19,53 +30,88 @@
1930
```
2031
<br>
2132

22-
::::{grid} 1 2 2 3
33+
34+
::::{grid} 1 2 2 4
2335
:gutter: 4
2436

25-
:::{grid-item-card} Tutorials
26-
:link: pages/tutorials
37+
38+
:::{grid-item-card} Get started
39+
:link: pages/get_started/index
40+
:link-type: doc
41+
42+
Get started with ``datashuttle``
43+
:::
44+
45+
46+
:::{grid-item-card} User guides
47+
:link: pages/user_guides/index
2748
:link-type: doc
2849

29-
Walkthrough **datashuttle**.
50+
Explore ``datashuttle``'s features
3051
:::
3152

32-
:::{grid-item-card} How To
33-
:link: pages/how_tos
53+
:::{grid-item-card} Examples
54+
:link: pages/examples/index
3455
:link-type: doc
3556

36-
Short guides on specific actions.
57+
``datashuttle`` in the real world
3758
:::
3859

3960
:::{grid-item-card} Python API
4061
:link: pages/api_index
4162
:link-type: doc
4263

43-
Full Python reference.
64+
Full Python reference
4465
:::
45-
::::
4666

47-
**datashuttle** creates and validates projects standardised to the
48-
[NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev)
49-
specification.
67+
::::
5068

51-
Dive right into **datashuttle** with our
52-
[Getting Started Tutorial](tutorial-getting-started)
53-
or targeted [How-To Guides](how-tos). \
54-
It can be used through a graphical interface or Python API.
69+
A lack of project standardization in systems neuroscience
70+
[hinders data sharing and collaboration](https://neuroinformatics.dev/blog/neuroblueprint.html),
71+
creating barriers to reproducibility and scientific progress.
72+
73+
``datashuttle`` helps standardise experimental
74+
projects by automating folder creation and transfer
75+
during acquisition and analysis. Its graphical interface or Python API builds
76+
folder trees according to the [NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev)
77+
specification. Automation and validation ensures that no errors, such as duplicate session
78+
names or incorrect dates, slip into the project.
79+
80+
Data can be transferred between acquisition, storage and analysis
81+
machines with a single function call or button click. Standardisation makes
82+
folder names predictable, meaning it is easy to transfer specific combinations
83+
of subjects, sessions or data-types with ``datashuttle``.
84+
85+
Folders are standardised to the
86+
[NeuroBlueprint](https://neuroblueprint.neuroinformatics.dev) specification:
87+
88+
```{image} /_static/NeuroBlueprint_project_tree_dark.png
89+
:align: center
90+
:class: only-dark
91+
:width: 550px
92+
```
93+
```{image} /_static/NeuroBlueprint_project_tree_light.png
94+
:align: center
95+
:class: only-light
96+
:width: 550px
97+
```
5598

56-
Don't hesitate to get in contact through our
57-
[GitHub Issues](https://github.com/neuroinformatics-unit/datashuttle/issues)
58-
or
59-
[Zulip Chat.](https://neuroinformatics.zulipchat.com/#narrow/stream/405999-DataShuttle)
99+
Dive in with our [Getting Started page](pages/get_started/index)
100+
or targeted [User Guides](pages/user_guides/index).
60101

102+
Have questions, issues or feedback? Get in contact through
103+
[GitHub issues](https://github.com/neuroinformatics-unit/datashuttle/issues)
104+
or our
105+
[Zulip chat.](https://neuroinformatics.zulipchat.com/#narrow/stream/405999-DataShuttle)
61106

62107
```{toctree}
63108
:maxdepth: 2
64109
:caption: index
65110
:hidden:
66111
67-
pages/tutorials
68-
pages/how_tos
69-
pages/community/index.md
112+
pages/get_started/index
113+
pages/user_guides/index
114+
pages/examples/index
115+
pages/community/index
70116
pages/api_index
71117
```

docs/source/pages/community/contributing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ The core development team will support you in contributing code, regardless of y
1212

1313
## Creating a development environment
1414

15-
For detailed instructions on installing **datashuttle** along with
15+
For detailed instructions on installing ``datashuttle`` along with
1616
all necessary packages for development, refer to the `Developers` tab on the
17-
[How to install **datashuttle**](how-to-install) page.
17+
[How to install ``datashuttle``](how-to-install) page.
1818

19-
Briefly, after installing Rclone, the **datashuttle** repository can be cloned:
19+
Briefly, after installing Rclone, the ``datashuttle`` repository can be cloned:
2020

2121
```sh
2222
git clone git@github.com:neuroinformatics-unit/datashuttle.git
2323
```
2424

25-
and **datashuttle** pip-installed with the developer tag:
25+
and ``datashuttle`` pip-installed with the developer tag:
2626

2727

2828
```sh
@@ -117,8 +117,8 @@ Make sure to provide docstrings for all public functions, classes, and methods.
117117

118118
## Contributing documentation
119119

120-
It is very important that the documentation for **datashuttle** is clear,
121-
accurate and concise. A key principle of **datashuttle** is it should
120+
It is very important that the documentation for ``datashuttle`` is clear,
121+
accurate and concise. A key principle of ``datashuttle`` is it should
122122
make data acquisition simple and easy—therefore it should be
123123
well-documented.
124124

docs/source/pages/community/guiding-principles.md

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

33
In this document we lay out our vision for
44
[**NeuroBlueprint**](https://neuroblueprint.neuroinformatics.dev/)
5-
and **datashuttle** through three guiding principles.
5+
and ``datashuttle`` through three guiding principles.
66

77
For additional detail, please refer to our blog posts motivating
88
[**NeuroBlueprint**](https://neuroinformatics.dev/blog/neuroblueprint.html)
99
and
10-
[**datashuttle**](https://neuroinformatics.dev/blog/datashuttle.html).
10+
[``datashuttle``](https://neuroinformatics.dev/blog/datashuttle.html).
1111

1212
The three guiding principles driving the development of
1313
**NeuroBlueprint**
14-
and **datashuttle** are:
14+
and ``datashuttle`` are:
1515

1616
## Align with existing community initiatives
1717

@@ -30,15 +30,15 @@ The guiding principle is that some standardisation is better than no standardisa
3030
**NeuroBlueprint** is not intended as a rival or replacement for more established
3131
specifications, but rather as a stepping stone towards full standardisation.
3232
We aim to align as closely as possible to the BIDS specification and in future
33-
to provide conversion to NWB through **datashuttle**.
33+
to provide conversion to NWB through ``datashuttle``.
3434

3535
## Strive to be lightweight
3636

3737
**NeuroBlueprint** aims to keep the specification as lightweight
3838
as possible. There is no benefit in the specification proliferating
3939
as it develops such that it ends up duplicating BIDS in scope.
4040

41-
In the initial versions (**datashuttle** v0.4, **NeuroBlueprint** v0.2),
41+
In the initial versions (``datashuttle`` v0.4, **NeuroBlueprint** v0.2),
4242
the goal is to have a simple organisational
4343
system in which the raw data for different datatypes (e.g. ephys, behaviour)
4444
can be automatically discovered in any given project.
@@ -49,17 +49,17 @@ New standards will always be goal-orientated and customisable, only required
4949
to achieve a particular research goal. It is anticipated that as these 'rules'
5050
are adopted, projects will become progressively easier to convert to BIDS or NWB.
5151

52-
The role of **datashuttle** will be to enforce these rules in a flexible manner.
52+
The role of ``datashuttle`` will be to enforce these rules in a flexible manner.
5353

5454
## Keep releases versioned and modular
5555

56-
**NeuroBlueprint** and **datashuttle** will be
56+
**NeuroBlueprint** and ``datashuttle`` will be
5757
properly versioned and modular, enabling smooth development over time.
5858
New versions will prioritize backward compatibility, with changes that break
5959
compatibility occurring infrequently and only aimed at enhancing alignment with existing standards.
6060

6161
Typically, new versions will include new
6262
sets of standardisation rules,
63-
which users may choose to adopt or not. **datashuttle** will
63+
which users may choose to adopt or not. ``datashuttle`` will
6464
enforce these in a flexible way, with efforts being
6565
made to minimise changes to its API as much as possible.

docs/source/pages/community/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# Community
22

33

4-
Contributions to **datashuttle** are strongly encouraged. If you would like to submit
5-
a bug fix or implement a new feature, please feel free to do so! We are a
4+
Contributions to ``datashuttle`` are strongly encouraged. If you would like to submit
5+
a bug fix or implement a new feature, please feel free to open an issue or pull request. We are a
66
friendly bunch and happy to answer any questions before,
77
during or after a contribution. See the [Contributing Guide](contributing.md) for more details.
88

99
We are generally very keen to hear feedback on what works and doesn't work
10-
in **datashuttle** and
10+
in ``datashuttle`` and
1111
[**NeuroBlueprint**](https://neuroblueprint.neuroinformatics.dev).
1212
Please get in contact with any thoughts on how these tools can be
1313
improved by opening a
14-
[GitHub Issue](https://github.com/neuroinformatics-unit/datashuttle/issues)
14+
[GitHub issue](https://github.com/neuroinformatics-unit/datashuttle/issues)
1515
or by joining our
16-
[Zulip Chat](https://neuroinformatics.zulipchat.com/#narrow/stream/405999-DataShuttle).
16+
[Zulip chat](https://neuroinformatics.zulipchat.com/#narrow/stream/405999-DataShuttle).
1717

18-
To see what we have planned for the future of **NeuroBlueprint** and **datashuttle**, visit
18+
To see what we have planned for the future of **NeuroBlueprint** and ``datashuttle``, visit
1919
our [Guiding Principles](guiding-principles.md) and [Roadmap](roadmap.md).
2020

2121

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Roadmap
22

3-
The roadmap for **datashuttle**
3+
The roadmap for ``datashuttle``
44
contains our development plans for the package.
55
The roadmap is responsive to the requirements
66
of the community and we encourage people to get in
@@ -12,14 +12,16 @@ creation, transfer and logging of projects organised to
1212
support implementation of metadata standardisation planned for the next
1313
NeuroBlueprint version and facilitate conversion to NWB and customisation.
1414

15-
**Q4 2024**
15+
**Q3 2025**
16+
- Support Google Drive and Amazon Web Service and central storage drives.
1617

17-
Standardised metadata support.
18-
19-
**Q2 2025**
18+
**Q4 2025**
19+
- Export of NeuroBlueprint projects to [Neurodata Without Borders](https://www.nwb.org/) format.
2020

21-
Export of NeuroBlueprint projects to [Neurodata Without Borders](https://www.nwb.org/) format.
21+
**2026**
22+
- Support for customising data structure (e.g. specific mandatory elements or new file types).
2223

23-
**Q4 2025**
2424

25-
Support for customising data structure (e.g. specific mandatory elements or new file types).
25+
## Notes on previous goals
26+
Q4 2024, Standardised metadata support. After [discussion](https://github.com/neuroinformatics-unit/NeuroBlueprint/issues/30),
27+
this was put on hold to await further consultation with researchers.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
:html_theme.sidebar_secondary.remove:
2+
3+
# Acquisition script
4+
5+
This script shows how Laura Schwarz (O'Keefe Lab, [Sainsbury Wellcome Centre](https://www.sainsburywellcome.org/web/))
6+
uses ``datashuttle`` to create project folders during the acquisition of a behavioural
7+
task in mice.
8+
9+
```python
10+
def get_file_path():
11+
12+
# get your project
13+
project = DataShuttle("social_sleaping")
14+
15+
# create a prompt to enter the ID number
16+
# (which we will use to get the subject number)
17+
id_number = input("Enter ID number: ")
18+
sub = ID_DICT.get(id_number)
19+
20+
# get your session number and create a new folder
21+
# for the session you are about to record.
22+
# the function get_next_ses() normally checks for the next session
23+
# if you are recording for a new subject you can use it as well to create
24+
# the first session folder for this subject.
25+
session = project.get_next_ses(top_level_folder="rawdata",
26+
sub=f"sub-{sub}_id-{id_number}")
27+
28+
# create the folders
29+
created_folders = project.create_folders(
30+
top_level_folder="rawdata",
31+
sub_names=f"sub-{sub}_id-{id_number}",
32+
ses_names=f"{session}_@DATETIME@",
33+
datatype=["behav"]
34+
)
35+
# create a prompt to enter the experiment information and
36+
# conspecific ID for social experiments.
37+
# (this is only important for the video file name and might not be
38+
# relevant for you.)
39+
exp_number = input("Enter Experiment condition: ")
40+
comsp_id = input("Enter Conspecific ID: ")
41+
42+
# print the start of your acquisition
43+
print(datetime.now())
44+
45+
# create the video file name
46+
file_name_video_1 = f"{exp_number}_{comsp_id}.avi"
47+
48+
# create the path to the video file
49+
file_path1 = created_folders['behav'][0] / file_name_video_1
50+
file_path1.touch()
51+
52+
return file_path1
53+
```

docs/source/pages/examples/index.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
:html_theme.sidebar_secondary.remove:
2+
3+
(examples)=
4+
# Examples
5+
6+
7+
::::{grid} 1 1 2 2
8+
:gutter: 4
9+
10+
11+
:::{grid-item-card} {fas}`desktop;sd-text-primary` Acquisition script
12+
:link: acquisition-script
13+
:link-type: doc
14+
:class-img-top: tutorial-link-image
15+
16+
Using ``datashuttle`` to create project folders in a behavioural-data acquisition script
17+
18+
:::
19+
20+
21+
:::{grid-item-card} {fas}`desktop;sd-text-primary` Validate all projects in a lab
22+
:link: lab-project-checker
23+
:link-type: doc
24+
:class-img-top: tutorial-link-image
25+
26+
A script used to validate every project in a lab at once
27+
28+
:::
29+
30+
::::
31+
32+
33+
```{toctree}
34+
:maxdepth: 2
35+
:caption: Examples
36+
:hidden:
37+
38+
acquisition-script
39+
lab-project-checker
40+
41+
```

0 commit comments

Comments
 (0)