Skip to content

Commit f30b930

Browse files
author
LegrandNico
committed
[docs]
1 parent 0afe039 commit f30b930

25 files changed

+86
-35
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Build
2626
run: |
2727
pip install -r requirements-docs.txt
28-
sphinx-build -b html docs docs/build/html
28+
sphinx-build -b html docs/source docs/build/html
2929
3030
- name: Deploy 🚀
3131
uses: JamesIves/github-pages-deploy-action@v4

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
/dist
77
/cardioception.egg-info
88
/build
9-
docs/auto_examples
10-
docs/generated
11-
docs/api
12-
docs/build
9+
docs/source/auto_examples
10+
docs/source/generated
11+
docs/source/api
12+
docs/build
13+
docs/auto_examples

docs/source/api.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
API
2+
=====
3+
4+
.. automodule:: cardioception.HRD
5+
:members:
6+
7+
.. automodule:: cardioception.HBC
8+
:members:
Binary file not shown.
Binary file not shown.

docs/source/auto_examples/index.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
:orphan:
2+
3+
.. _general_examples:
4+
5+
# Example gallery
6+
7+
This section demonstrates some modelling approaches to analyze data from the Heart Rate Discrimination task.
8+
9+
10+
11+
.. raw:: html
12+
13+
<div class="sphx-glr-thumbnails">
14+
15+
16+
.. raw:: html
17+
18+
</div>
19+
20+
21+
.. only:: html
22+
23+
.. container:: sphx-glr-footer sphx-glr-footer-gallery
24+
25+
.. container:: sphx-glr-download sphx-glr-download-python
26+
27+
:download:`Download all examples in Python source code: auto_examples_python.zip </auto_examples/auto_examples_python.zip>`
28+
29+
.. container:: sphx-glr-download sphx-glr-download-jupyter
30+
31+
:download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip </auto_examples/auto_examples_jupyter.zip>`
32+
33+
34+
.. only:: html
35+
36+
.. rst-class:: sphx-glr-signature
37+
38+
`Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_

docs/cite.md renamed to docs/source/cite.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## How to cite?
1+
# How to cite?
22

33
If you are using the [cardioception](https://github.com/embodied-computation-group/Cardioception) package for your research, we ask you to cite the following paper in the final publication:
44

docs/conf.py renamed to docs/source/conf.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
# The master toctree document.
7070
master_doc = "index"
7171

72+
nb_execution_timeout = 300
73+
7274
# Add any paths that contain templates here, relative to this directory.
7375
templates_path = ["_templates"]
7476

@@ -102,18 +104,14 @@
102104
icon="fas fa-box",
103105
),
104106
],
105-
"logo_link": "https://embodied-computation-group.github.io/Carcioception/#",
106107
"logo": {
107108
"text": "Cardioception",
109+
"link": "https://embodied-computation-group.github.io/Carcioception/#",
108110
},
109111
}
110112

111113
html_sidebars = {"index": []}
112114

113-
# Add any paths that contain custom static files (such as style sheets) here,
114-
# relative to this directory. They are copied after the builtin static files,
115-
# so a file named "default.css" will overwrite the builtin "default.css".
116-
html_static_path = ["_static"]
117115
html_css_files = [
118116
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
119117
]

docs/examples/1-psychophysics_subject_level.ipynb renamed to docs/source/examples/1-psychophysics_subject_level.ipynb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
"outputs": [],
2323
"source": [
2424
"%%capture\n",
25-
"! pip install arviz\n",
26-
"! pip install pymc"
25+
"import sys\n",
26+
"if 'google.colab' in sys.modules:\n",
27+
" ! pip install arviz\n",
28+
" ! pip install pymc"
2729
]
2830
},
2931
{
@@ -35,15 +37,16 @@
3537
},
3638
"outputs": [],
3739
"source": [
40+
"import aesara.tensor as at\n",
3841
"import arviz as az\n",
3942
"import matplotlib.pyplot as plt\n",
4043
"import numpy as np\n",
4144
"import pandas as pd\n",
42-
"import pymc as pm\n",
4345
"import seaborn as sns\n",
44-
"import aesara.tensor as at\n",
4546
"from scipy.stats import norm\n",
4647
"\n",
48+
"import pymc as pm\n",
49+
"\n",
4750
"sns.set_context('talk')"
4851
]
4952
},

docs/examples/2-psychophysics_group_level.ipynb renamed to docs/source/examples/2-psychophysics_group_level.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
"outputs": [],
2323
"source": [
2424
"%%capture\n",
25-
"! pip install arviz\n",
26-
"! pip install pymc"
25+
"import sys\n",
26+
"if 'google.colab' in sys.modules:\n",
27+
" ! pip install arviz\n",
28+
" ! pip install pymc"
2729
]
2830
},
2931
{

docs/examples/3-repeated_measures.ipynb renamed to docs/source/examples/3-repeated_measures.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
"outputs": [],
2323
"source": [
2424
"%%capture\n",
25-
"! pip install pymc\n",
26-
"! pip install arviz"
25+
"import sys\n",
26+
"if 'google.colab' in sys.modules:\n",
27+
" ! pip install arviz\n",
28+
" ! pip install pymc"
2729
]
2830
},
2931
{
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _general_examples:
2-
31
# Example gallery
42

53
This section demonstrates some modelling approaches to analyze data from the Heart Rate Discrimination task.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/index.md renamed to docs/source/index.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Cardioception
66

7-
<img src="./images/logo.png" align="left" alt="cardioception" height="230" HSPACE=30>
7+
<img src="/images/logo.png" align="left" alt="cardioception" height="230" HSPACE=30>
88

99
The Cardioception Python Package - Measuring Interoception with Psychopy - implements two measures of cardiac interoception (cardioception):
1010
1. The **Heartbeat counting task** developed by Rainer Schandry<sup>1,2</sup>. This task cardiac measures interoception by asking participants to count their heartbeats for a given period of time. An accuracy score is then derived by comparing the reported number of heartbeats and the true number of heartbeats.
@@ -59,16 +59,19 @@ More advanced subject and group-level Bayesian modeling approaches are described
5959
# Development
6060
This package was created and is maintained by [Nicolas Legrand](https://legrandnico.github.io/) and [Micah Allen](https://micahallen.org/) from the [ECG group](https://the-ecg.org/).
6161

62-
<img src = "./images/LabLogo.png" height ="100"><img src = "./images/AU.png" height ="100">
62+
<img src = "/images/LabLogo.png" height ="100"><img src = "/images/AU.png" height ="100">
6363

6464
# Credit
65-
Some icons used in the Figures or presented during the tasks were downloaded from **Flaticon** [www.flaticon.com](www.flaticon.com).
65+
Some icons used in the Figures or presented during the tasks were downloaded from [www.flaticon.com](www.flaticon.com).
6666

67-
:::{toctree}
68-
:hidden:
6967

70-
User guide <user_guide>
71-
API <api>
68+
```{toctree}
69+
---
70+
hidden:
71+
maxdepth: 3
72+
---
73+
User guide <user_guide.md>
74+
API <api.rst>
7275
Statistical analysis <examples/README.md>
73-
Cite <cite>
74-
:::
76+
Cite <cite.md>
77+
```

docs/user_guide.md renamed to docs/source/user_guide.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
## Do you need help?
2+
# Do you need help?
33

44
If you have questions regarding the tasks, want to report a bug or discuss data analysis, please ask on our public [![Gitter](https://badges.gitter.im/Cardioception/community.svg)](https://gitter.im/Cardioception/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge).
55

@@ -20,7 +20,7 @@ After extracting the content of the file, the package can be installed via the c
2020

2121
<br clear="left"/>
2222

23-
## Dependencies
23+
# Dependencies
2424

2525
Cardioception has been tested with Python 3.7. We recommend to use the last install of Anaconda for Python 3.7 or latest (see https://www.anaconda.com/products/individual#download-section).
2626

@@ -49,9 +49,7 @@ In addition, some function for HTML reports will require:
4949
The version provided here are the ones used when testing and runing cardioception locally, and are often the last ones. For several packages however, older version might also be compatibles.
5050

5151
Cardioception will automatically copy the images and sound files necessary to run the task correctly (~ 160 Mo). These files will be removed if you uninstall the package using `pip uninstall cardioception`.
52-
53-
# Package modularity
54-
## Physiological recording
52+
# Physiological recording
5553

5654
Both the Heartbeat counting task (HBC) and the heart rate discrimination task (HRD) require access to physiological recording device during the task to estimate the heart rate or count the number of heartbeats in a given time window. Cardioception natively supports:
5755
* The [Nonin 3012LP Xpod USB pulse oximeter](https://www.nonin.com/products/xpod/) together with [Nonin 8000SM 'soft-clip' fingertip sensors](https://www.nonin.com/products/8000s/)

0 commit comments

Comments
 (0)