Skip to content

Commit 7867e5a

Browse files
wihetooesteban
authored andcommitted
formatting
1 parent 0afa6a2 commit 7867e5a

3 files changed

Lines changed: 28 additions & 13 deletions

File tree

docs/contributing_tutorials/adding_a_new_template.rst

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If the space for you template already exists, then you should follow the tutoria
1313

1414
This tutorial assumes you have done all the steps in the preceding tutorial: :ref: `prerequisites_to_contributing`.
1515

16-
__Note__ at present, this tutorial will require writing access to the TemplateFlow repo.
16+
**Note** at present, this tutorial will require writing access to the TemplateFlow repo.
1717
If you do not have access here, it may be best to open up an issue asking for a template space to be created.
1818

1919
Big picture
@@ -31,25 +31,28 @@ Step 1: create a new dataset
3131
First make sure you are in your local templateflow directory.
3232
If you do not have a local templateflow copy, run:
3333

34-
::.
34+
.. code-block:: bash
35+
3536
git clone https://github.com/templateflow/templateflow/
3637
cd templateflow
3738
3839
Now set the variable ``TEMPLATENAME`` to whatever your template will be called.
3940
Also set your Github username to the variable ``GITHUBUSERNAME``.
4041
Finally, write a description of your template.
4142

42-
::.
43+
.. code-block:: bash
44+
4345
TEMPALTENAME='tpl-test'
4446
GITHUBUSERNAME='yourusername'
4547
TEMPALTEDESCRIPTION="This is a test template"
4648
GITHUBREPO='templateflow'
4749
48-
At the moment, always keep templateflow as GITHUBREPO, this may be changed in the future
50+
At the moment, always keep templateflow as GITHUBREPO, this may be changed in the future.
4951

5052
With these variables set you can then run the following code with no modifications:
5153

52-
::.
54+
.. code-block:: bash
55+
5356
datalad create -d . -D "$TEMPALTEDESCRIPTION" $TEMPALTENAME
5457
cd $TEMPALTENAME
5558
datalad create-sibling-github --github-organization $GITHUBREPO --github-login $GITHUBUSERNAME --access-protocol ssh $TEMPALTENAME
@@ -69,14 +72,16 @@ It will then return to the templateflow directory.
6972

7073
The 5th line in the above code edits the file .gitmodules to replace:
7174

72-
::.
75+
.. code-block::
76+
7377
[submodule "tpl-test"]
7478
path = tpl-test
7579
url = ./tpl-test
7680
7781
with:
7882

79-
::.
83+
.. code-block::
84+
8085
[submodule "tpl-test"]
8186
path = tpl-test
8287
url = https://github.com/templateflow/tpl-test
@@ -90,7 +95,7 @@ Step 2: Add a template_description.json
9095
Within this directory we place a template_description.json which is needed in all templates.
9196
The json file contains the following:
9297

93-
::.
98+
.. code-block:: json
9499
{
95100
"Authors": ["Noone"],
96101
"Acknowledgements": "Curated and added to TemplateFlow by Thompson WH",

docs/contributing_tutorials/prerequisites_to_contributing.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ There are three different types of contributions you can make to TemplateFlow.
2626
This contribution involves adding a new space that does not currently exist.
2727
Let us say you have made a new pediatric space that you transform your images to; this would be a new template space.
2828
All the different MNI templates are each considered their own template space.
29+
Currently this requires writing permissions to the TemplateFlow repo.
30+
For now, if you do not have access open up an issue in the templateflow repo to say which template spaces should be added.
2931

3032
**Nifti images within an existing template space**.
3133
This contribution involves adding to a template space that currently exists.
@@ -60,13 +62,17 @@ Once you have the prerequisites set up, you can initialize the OSF directory ont
6062

6163
In a new directory type:
6264

63-
> osf init
65+
.. code-clock:: bash
66+
67+
osf init
6468

6569
This will prompt you for your username and TemplateFlow project number.
6670
This project number is ``ue5gx``.
6771

6872
You can check that your directory has been correctly set up by typing:
6973

70-
> osf ls
74+
.. code-clock:: bash
75+
76+
osf ls
7177

7278
You should see the contents of the OSF project folder appear in the console.

docs/contributing_tutorials/uploading_to_existing_template.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,16 @@ Finally, the contents of new_files.csv need to be uploaded via DataLad.
108108

109109
To do this first, move the local image file into a tmp folder.
110110

111-
> mv tpl-test/*_atlas-test*.nii.gz ~/tmp/
111+
.. code-block:: bash
112+
113+
mv tpl-test/*_atlas-test*.nii.gz ~/tmp/
112114
113115
Then you add the new urls to DataLad. Add a message
114116

115-
> datalad addurls new_files.csv '{link}' '{name}' --message 'My test atlases'
116-
> datalad publish
117+
.. code-block:: bash
118+
119+
datalad addurls new_files.csv '{link}' '{name}' --message 'My test atlases'
120+
datalad publish
117121
118122
Example script when subdirectories are presents
119123
================================================

0 commit comments

Comments
 (0)