Skip to content

Commit 07a38ca

Browse files
authored
Update documentation (#1328)
1 parent e19b7b1 commit 07a38ca

File tree

6 files changed

+144
-126
lines changed

6 files changed

+144
-126
lines changed

README.rst

+20-20
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ for open-source software distribution.
4242
About
4343
*****
4444

45-
XCP-D paves the final section of the reproducible and scalable route from the MRI scanner to
45+
*XCP-D* paves the final section of the reproducible and scalable route from the MRI scanner to
4646
functional connectivity data in the hands of neuroscientists.
47-
We developed XCP-D to extend the BIDS and NiPrep apparatus to the point where data is most
47+
We developed *XCP-D* to extend the BIDS and NiPrep apparatus to the point where data is most
4848
commonly consumed and analyzed by neuroscientists studying functional connectivity.
49-
Thus, with the development of XCP-D, data can be automatically preprocessed and analyzed in BIDS
49+
Thus, with the development of *XCP-D*, data can be automatically preprocessed and analyzed in BIDS
5050
format, using NiPrep-style containerized code, all the way from the scanner to functional
5151
connectivity matrices.
5252

53-
XCP-D picks up right where `fMRIprep <https://fmriprep.org>`_ ends, directly consuming the outputs
53+
*XCP-D* picks up right where `fMRIprep <https://fmriprep.org>`_ ends, directly consuming the outputs
5454
of fMRIPrep.
55-
XCP-D leverages the BIDS and NiPreps frameworks to automatically generate denoised BOLD images,
55+
*XCP-D* leverages the BIDS and NiPreps frameworks to automatically generate denoised BOLD images,
5656
parcellated time series, functional connectivity matrices, and quality assessment reports.
57-
XCP-D can also process outputs from: `NiBabies <https://nibabies.readthedocs.io>`_,
57+
*XCP-D* can also process outputs from: `NiBabies <https://nibabies.readthedocs.io>`_,
5858
`ABCD-BIDS <https://github.com/DCAN-Labs/abcd-hcp-pipeline>`_,
5959
`Minimally preprocessed HCP <https://www.humanconnectome.org/study/hcp-lifespan-development/\
6060
data-releases>`_,
@@ -67,37 +67,37 @@ and `UK Biobank <https://doi.org/10.1016/j.neuroimage.2017.10.034>`_ data.
6767
See the `documentation <https://xcp-d.readthedocs.io/en/latest/>`_ for more details.
6868

6969

70-
Why you should use XCP-D
71-
````````````````````````
70+
Why you should use *XCP-D*
71+
``````````````````````````
7272

73-
XCP-D produces the following commonly-used outputs: matrices, parcellated time series,
73+
*XCP-D* produces the following commonly-used outputs: matrices, parcellated time series,
7474
dense time series, and additional QC measures.
7575

76-
XCP-D is designed for resting-state or pseudo-resting-state functional connectivity analyses.
77-
XCP-D derivatives may be useful for seed-to-voxel and ROI-to-ROI functional connectivity analyses,
76+
*XCP-D* is designed for resting-state or pseudo-resting-state functional connectivity analyses.
77+
*XCP-D* derivatives may be useful for seed-to-voxel and ROI-to-ROI functional connectivity analyses,
7878
as well as decomposition-based methods, such as ICA or NMF.
7979

8080

81-
When you should not use XCP-D
82-
`````````````````````````````
81+
When you should not use *XCP-D*
82+
```````````````````````````````
8383

84-
XCP-D is not designed as a general-purpose postprocessing pipeline.
84+
*XCP-D* is not designed as a general-purpose postprocessing pipeline.
8585
It is really only appropriate for certain analyses,
8686
and other postprocessing/analysis tools are better suited for many types of data/analysis.
8787

88-
XCP-D derivatives are not particularly useful for task-dependent functional connectivity analyses,
88+
*XCP-D* derivatives are not particularly useful for task-dependent functional connectivity analyses,
8989
such as psychophysiological interactions (PPIs) or beta series analyses.
9090
It is also not suitable for general task-based analyses, such as standard task GLMs,
9191
as we recommend including nuisance regressors in the GLM step,
9292
rather than denoising data prior to the GLM.
9393

9494

95-
************
96-
Citing XCP-D
97-
************
95+
**************
96+
Citing *XCP-D*
97+
**************
9898

99-
If you use XCP-D in your research, please use the boilerplate generated by the workflow.
100-
If you need an immediate citations, please cite the following preprint:
99+
If you use *XCP-D* in your research, please use the boilerplate generated by the workflow.
100+
If you need an immediate citation, please cite the following paper:
101101

102102
Mehta, K., Salo, T., Madison, T. J., Adebimpe, A., Bassett, D. S., Bertolero, M., ... & Satterthwaite, T. D.
103103
(2024).

docs/contributing.rst

+33-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Contributing to *XCP-D*
55
#######################
66

7-
This guide describes the organization and preferred coding style for XCP-D,
7+
This guide describes the organization and preferred coding style for *XCP-D*,
88
for prospective code contributors.
99

1010
.. important::
@@ -57,7 +57,7 @@ but the main ones are ``black`` and ``isort``.
5757

5858
.. tip::
5959

60-
Please run ``isort`` and ``black`` on the ``XCP-D`` codebase before opening a pull request.
60+
Please run ``isort`` and ``black`` on the *XCP-D* codebase before opening a pull request.
6161

6262
Also run ``flake8`` to check for any additional style issues.
6363

@@ -129,9 +129,9 @@ Here is an example of a basic workflow, written in the preferred style for *XCP-
129129
return workflow
130130
131131
132-
*************************************************
133-
Contributing to XCP-D without adding dependencies
134-
*************************************************
132+
***************************************************
133+
Contributing to *XCP-D* without adding dependencies
134+
***************************************************
135135

136136
In the most common case, you will want to modify *XCP-D*'s Python code without adding any
137137
dependencies (Python or not) to the Docker image.
@@ -144,15 +144,15 @@ image yourself.
144144
145145
docker pull pennlinc/xcp_d:unstable
146146
147-
2. Fork the XCP-D repository to your GitHub account.
147+
2. Fork the *XCP-D* repository to your GitHub account.
148148
For more information on contributing via the fork-and-branch approach,
149149
see `GitHub's contributing guide
150150
<https://docs.github.com/en/get-started/quickstart/contributing-to-projects>`_.
151151

152152
3. Clone your forked repository to your local machine.
153153

154154
4. Create a branch to work on.
155-
**Make sure your branch is up to date with XCP-D's ``main`` branch before making any
155+
**Make sure your branch is up to date with *XCP-D*'s ``main`` branch before making any
156156
changes!**
157157

158158
5. Make changes to the codebase that you want to try out.
@@ -175,26 +175,44 @@ image yourself.
175175
176176
7. Push your changes to GitHub.
177177

178-
8. Open a pull request to PennLINC/XCP-D's ``main`` branch.
178+
8. Open a pull request to ``pennlinc/xcp_d``'s ``main`` branch.
179179
Please follow `NiPreps contributing guidelines <https://www.nipreps.org/community/>`_
180180
when preparing a pull request.
181181

182182

183-
Running tests
184-
=============
183+
Running tests locally
184+
=====================
185185

186186
While CircleCI will automatically run *XCP-D*'s tests for any open PRs,
187187
we strongly recommend running at least some tests locally, to make sure your proposed changes work.
188188

189189
*XCP-D* has a file, ``xcp_d/tests/run_local_tests.py``, that builds Docker ``run`` commands to
190-
run selected tests.
190+
to automatically mount the local clone into ``pennlinc/xcp_d:unstable`` and run tests with
191+
``pytest``.
192+
The script will also download any required test data from Box.
191193
Please use that script to run some tests locally before opening your PR.
192194

195+
To run the tests, navigate to the tests folder and run ``run_local_tests.py``::
196+
197+
$ cd /path/to/xcp_d/xcp_d/tests
198+
$ python run_local_tests.py
199+
200+
You can select individual tests to run by using the ``-m`` (to select markers) or
201+
``-k`` (the select tests by name) flags::
202+
203+
$ python run_local_tests.py -m "dsdti_fmap"
204+
$ python run_local_tests.py -k "test_some_name"
205+
193206
If all tests pass, this is a strong indication that your proposed changes do not introduce bugs.
194207
However, we strongly recommend reviewing the output files- especially the HTML reports-
195208
from the integration tests to see how your proposed changes affect the primary outputs from
196209
*XCP-D*.
197210

211+
.. warning::
212+
213+
Please note that the integration tests in *XCP-D* are computationally intensive
214+
and may take a long time to run, so be prepared for that before running them on a laptop.
215+
198216

199217
********************************
200218
Adding or modifying dependencies
@@ -220,9 +238,9 @@ and rebuild the *XCP-D* Docker image locally to test out your change.
220238
Once your change is working, you can open a pull request to the *XCP-D* repo.
221239

222240

223-
*****************
224-
Maintaining XCP-D
225-
*****************
241+
*******************
242+
Maintaining *XCP-D*
243+
*******************
226244

227245

228246
Making a Release
@@ -239,7 +257,7 @@ To make an *XCP-D* release, complete the following steps:
239257
(e.g., ``1.0.0``).
240258
#. For pre-releases, select the "This is a pre-release" option.
241259
#. Select the "Generate release notes" button.
242-
This will create most of the necessary release notes based on XCP-D's config file.
260+
This will create most of the necessary release notes based on *XCP-D*'s config file.
243261
#. At the top of the release notes, add some information summarizing the release.
244262

245263
3. Once the release notes have been completed, open a new PR with the following changes:

docs/installation.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ steps necessary for execution.
2626

2727
Docker Installation
2828
===================
29-
For every new version of *xcp_d* that is released, a corresponding Docker image is generated.
29+
For every new version of *XCP-D* that is released, a corresponding Docker image is generated.
3030

31-
In order to run *xcp_d* via Docker images, the Docker Engine must be installed.
31+
In order to run *XCP-D* via Docker images, the Docker Engine must be installed.
3232

33-
If you have used *xcp_d* via Docker in the past, you might need to pull down a more recent version
33+
If you have used *XCP-D* via Docker in the past, you might need to pull down a more recent version
3434
of the image: ::
3535

3636
$ docker pull pennlinc/xcp_d:<latest-version>
3737

3838
The image can also be found here: https://hub.docker.com/r/pennlinc/xcp_d
3939

40-
*xcp_d* can be run interacting directly with the Docker Engine via the `docker run` command,
40+
*XCP-D* can be run interacting directly with the Docker Engine via the `docker run` command,
4141
or through a lightweight wrapper that was created for convenience.
4242

4343

@@ -65,11 +65,11 @@ Manually Prepared Environment (Python 3.10)
6565
This method is not recommended! Please use container alternatives
6666
in :ref:`run_docker`, and :ref:`run_apptainer`.
6767

68-
XCP-D requires some `External Dependencies`_.
68+
*XCP-D* requires some `External Dependencies`_.
6969
These tools must be installed and their binaries available in the system's ``$PATH``.
7070

7171
On a functional Python 3.10 environment with ``pip`` installed,
72-
XCP-D can be installed using the habitual command
72+
*XCP-D* can be installed using the habitual command
7373
::
7474

7575
$ pip install git+https://github.com/pennlinc/xcp_d.git
@@ -86,7 +86,7 @@ External Dependencies
8686

8787
*XCP-D* is written using Python 3.10, is based on nipype_,
8888
and requires some other neuroimaging software tools that are not handled by the Python's packaging
89-
system (PyPi) used to deploy the XCP-D package:
89+
system (PyPi) used to deploy the *XCP-D* package:
9090

9191
- ANTs_ (version 2.2.0 - or higher)
9292
- AFNI_ (version Debian-16.2.07)

docs/outputs.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ the HCP thalamic atlas :footcite:p:`najdenovska2018vivo`,
7474
and the amygdala and hippocampus parcels from the HCP CIFTI subcortical parcellation
7575
:footcite:p:`glasser2013minimal`.
7676
The 4S atlas is used in the same manner across three PennLINC BIDS Apps:
77-
XCP-D, QSIPrep_, and ASLPrep_, to produce synchronized outputs across modalities.
77+
*XCP-D*, QSIPrep_, and ASLPrep_, to produce synchronized outputs across modalities.
7878
For more information about the 4S atlas, please see https://github.com/PennLINC/AtlasPack.
7979

8080
.. tip::

0 commit comments

Comments
 (0)