Skip to content

Commit 493d414

Browse files
authored
Merge pull request #79 from templateflow/docs/update-documentation
DOC: Substantial update and re-structuring to the documentation
2 parents 4e8c27e + 00206ad commit 493d414

19 files changed

+287
-1734
lines changed

.circleci/config.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,31 +120,62 @@ jobs:
120120
twine check dist/*
121121
122122
build_docs:
123-
docker:
124-
- image: python:3.7.4
123+
machine:
124+
# https://discuss.circleci.com/t/linux-machine-executor-images-2021-april-q2-update/39928
125+
# upgrade Docker version
126+
image: ubuntu-2004:202104-01
125127
environment:
126128
- FSLOUTPUTTYPE: NIFTI
127129
- SUBJECTS_DIR: /tmp/subjects
128130
steps:
129131
- checkout
132+
- restore_cache:
133+
keys:
134+
- env-v3-{{ .Branch }}-
135+
- env-v3-master-
136+
- env-v3-
137+
- run:
138+
name: Install base packages
139+
command: |
140+
export PATH="$HOME/.conda/bin:$PATH"
141+
if ! [ -x "$(command -v curl)" ]; then
142+
sudo apt-get update
143+
sudo apt-get install -y --no-install-recommends curl
144+
fi
145+
146+
if ! [ -x "$(command -v conda)" ]; then
147+
curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh
148+
bash Miniconda3-py38_4.10.3-Linux-x86_64.sh -b -p $HOME/.conda
149+
fi
150+
- run:
151+
name: Setup conda environment
152+
command: |
153+
$HOME/.conda/bin/conda install -y -c conda-forge -c anaconda graphviz pandoc curl "setuptools>=45" "setuptools_scm>=6.2" "pip>20" wheel sphinx=4 ipython
154+
$HOME/.conda/bin/python -m pip install --no-cache-dir -r docs/requirements.txt
155+
- save_cache:
156+
key: env-v3-{{ .Branch }}-{{ .BuildNum }}
157+
paths:
158+
- ~/.conda
159+
160+
- run:
161+
name: Check out git submodules
162+
command: git submodule update --init
130163
- run:
131164
name: Create subjects folder
132165
command: mkdir -p $SUBJECTS_DIR
133-
- run:
134-
name: Install Graphviz
135-
command: apt update && apt -y install graphviz
136166
- run:
137167
name: Install deps
138168
command: |
139-
pip install --no-cache-dir "setuptools>=45" "setuptools_scm >= 6.2"
169+
export PATH="$HOME/.conda/bin:$PATH"
140170
pip install --no-cache-dir -r docs/requirements.txt
141171
- run:
142172
name: Build only this commit
143173
command: |
174+
export PATH="$HOME/.conda/bin:$PATH"
144175
python setup.py --version
145-
make -C docs SPHINXOPTS="-W" BUILDDIR="/docs" CURBRANCH="${CIRCLE_TAG}" html
176+
make -C docs SPHINXOPTS="-W" BUILDDIR="$HOME/html" CURBRANCH="${CIRCLE_TAG}" html
146177
- store_artifacts:
147-
path: /docs/
178+
path: ~/html
148179

149180
deploy_pypi:
150181
docker:

README.rst

Lines changed: 59 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,69 @@
11
A Python client to query TemplateFlow
22
=====================================
33

4-
|DOI| |CircleCI| |Build Status| |Pypi|
5-
6-
Group inference and reporting of neuroimaging studies require that
7-
individual’s features are spatially aligned into a common frame where
8-
their location can be called standard. To that end, a multiplicity of
9-
brain templates with anatomical annotations (i.e., atlases) have been
10-
published. However, a centralized resource that allows programmatic
11-
access to templates is lacking. TemplateFlow is a modular,
12-
version-controlled resource that allows researchers to use templates
13-
“off-the-shelf” and share new ones.
14-
15-
.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2583289.svg
4+
|Zenodo| |preprint| |CircleCI| |Build Status| |Pypi|
5+
6+
Reference anatomies of the brain and corresponding atlases play a central role in experimental
7+
neuroimaging workflows and are the foundation for reporting standardized results.
8+
The choice of such references —i.e., templates— and atlases is one relevant source of methodological
9+
variability across studies, which has recently been brought to attention as an important challenge
10+
to reproducibility in neuroscience.
11+
*TemplateFlow* is a publicly available framework for human and nonhuman brain models.
12+
The framework combines an open database with software for access, management, and vetting,
13+
allowing scientists to distribute their resources under *FAIR* —findable, accessible, interoperable,
14+
reusable— principles.
15+
*TemplateFlow* supports a multifaceted insight into brains across species, and enables multiverse
16+
analyses testing whether results generalize across standard references, scales, and in the long term,
17+
species, thereby contributing to increasing the reliability of neuroimaging results.
18+
19+
Publishing resources in the *TemplateFlow* Archive
20+
--------------------------------------------------
21+
Please check the `Contributing section of the TemplateFlow website
22+
<https://www.templateflow.org/contributing/submission/>`__.
23+
24+
License information
25+
-------------------
26+
*TemplateFlow* adheres to the
27+
`general licensing guidelines <https://www.nipreps.org/community/licensing/>`__
28+
of the *NiPreps framework*.
29+
30+
License
31+
~~~~~~~
32+
Copyright (c) 2021, the *NiPreps* Developers.
33+
34+
The *TemplateFlow* Python Client is
35+
licensed under the Apache License, Version 2.0 (the "License");
36+
you may not use this file except in compliance with the License.
37+
You may obtain a copy of the License at
38+
`http://www.apache.org/licenses/LICENSE-2.0
39+
<http://www.apache.org/licenses/LICENSE-2.0>`__.
40+
41+
Unless required by applicable law or agreed to in writing, software
42+
distributed under the License is distributed on an "AS IS" BASIS,
43+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44+
See the License for the specific language governing permissions and
45+
limitations under the License.
46+
47+
Acknowledgements
48+
----------------
49+
This work is steered and maintained by the `NiPreps Community <https://www.nipreps.org>`__.
50+
The development of this resource was supported by
51+
the Laura and John Arnold Foundation (RAP and KJG),
52+
the NIBIB (R01EB020740, SSG; 1P41EB019936-01A1SSG, YOH),
53+
the NIMH (RF1MH121867, RAP, OE; R24MH114705 and R24MH117179, RAP; 1RF1MH121885 SSG),
54+
NINDS (U01NS103780, RAP), and NSF (CRCNS 1912266, YOH).
55+
OE acknowledges financial support from the SNSF Ambizione project
56+
“*Uncovering the interplay of structure, function, and dynamics of
57+
brain connectivity using MRI*” (grant number
58+
`PZ00P2_185872 <http://p3.snf.ch/Project-185872>`__).
59+
60+
.. |Zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2583289.svg
1661
:target: https://doi.org/10.5281/zenodo.2583289
1762
.. |CircleCI| image:: https://circleci.com/gh/templateflow/python-client/tree/master.svg?style=shield
1863
:target: https://circleci.com/gh/templateflow/python-client/tree/master
1964
.. |Build Status| image:: https://github.com/templateflow/python-client/workflows/Python%20package/badge.svg
2065
:target: https://github.com/templateflow/python-client/actions?query=workflow%3A%22Python+package%22
2166
.. |Pypi| image:: https://img.shields.io/pypi/v/templateflow.svg
2267
:target: https://pypi.python.org/pypi/templateflow/
68+
.. |preprint| image:: https://img.shields.io/badge/doi-10.1101%2F2021.02.10.430678-blue.svg
69+
:target: https://doi.org/10.1101/2021.02.10.430678

docs/changes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
----------
2+
What's new
3+
----------
4+
5+
.. include:: ../CHANGES.rst

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"sphinx.ext.napoleon",
4040
"sphinx.ext.viewcode",
4141
"sphinxcontrib.apidoc",
42-
"sphinx_multiversion",
42+
"nbsphinx",
4343
]
4444

4545
autodoc_mock_imports = [

docs/contributing_tutorials/adding_a_new_template.rst

Lines changed: 0 additions & 111 deletions
This file was deleted.

docs/contributing_tutorials/prerequisites_to_contributing.rst

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)