Skip to content

Commit fabf7ee

Browse files
authored
Add an environment.yml fil and document its use. Remove zip download example. (#67)
1 parent d4e2e09 commit fabf7ee

File tree

4 files changed

+36
-21
lines changed

4 files changed

+36
-21
lines changed

Diff for: README.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,25 @@ If you have questions regarding the tasks, want to report a bug or discuss data
3131

3232
# Installation
3333

34-
**Using the Python Package Index**
34+
## Using the Python Package Index
3535

3636
* The most recent version can be installed uing:
3737
`pip install cardioception`
3838
* The current development branch can be installed using
3939
`pip install git+https://github.com/embodied-computation-group/Cardioception.git`
4040

41-
**Downloading the ZIP file**
41+
### Set up a conda environment
4242

43-
<img src="/images/downloadZIP.png" align="left" alt="download" height="200" HSPACE=30>
43+
The task can be installed in a new environment using the `environment.yml` file that you can find at the root of the directory. Using the Anaconda prompt, you can create a new environment with:
4444

45-
You can also download the most recent version by downloading the repository as a .zip file.
45+
`conda env create -f environment.yml`
4646

47-
After extracting the content of the file, the package can be installed via the command line by running `pip install .`. Note that this command should be executed when your terminal run inside the extracted folder. You can navigate through your local folder using the command `cd [path to your folder]`.
47+
This will create a new `cardioception` environment that you can later activate using:
4848

49-
<br clear="left"/>
49+
`conda activate cardioception`
50+
51+
```{note} If you are using the shortcut method described bellow, you will have to activate the *cardioception* environment instead of the *base* one.
52+
```
5053

5154
## Dependencies
5255

@@ -55,12 +58,11 @@ Cardioception has been tested with Python 3.7. We recommend to use the last inst
5558
Make sure that you have the following packages installed and up to date before running cardioception:
5659

5760
* [psychopy](https://www.psychopy.org/) can be installed with `pip install psychopy`.
58-
5961
* [systole](https://systole-docs.github.io/) can be installed with `pip install systole`.
6062

6163
The other main dependencies are:
6264

63-
* [numpy](https://numpy.org/) (>=1.19.4)
65+
* [numpy](https://numpy.org/) (>=1.18,<=1.23)
6466
* [scipy](https://www.scipy.org/) (>=1.3.0)
6567
* [pandas](https://pandas.pydata.org/) (>=1.0.3)
6668
* [pyserial](https://pypi.org/project/pyserial/) (>=3.4)
@@ -71,7 +73,8 @@ In addition, some function for HTML reports will require:
7173
* [matplotlib](https://matplotlib.org/) (>=3.3.3)
7274
* [seaborn](https://seaborn.pydata.org/) (>=0.11.1)
7375
* [pingouin](https://pingouin-stats.org/) (>=0.3.10)
74-
* [metadpy](https://github.com/Embodi3dComputationGroup/metadpy) (>=0.01)
76+
* [metadpy](https://github.com/Embodi3dComputationGroup/metadpy) (>=0.1.0)
77+
* [pymc](https://www.pymc.io/welcome.html) (>=5.0)
7578

7679
**NOTE**
7780
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.
@@ -174,9 +177,8 @@ More advanced subject and group-level Bayesian modeling approaches are described
174177

175178
| Notebook | Colab | nbViewer |
176179
| --- | ---| --- |
177-
| Fitting the psychometric function (single subject) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/1-psychophysics_subject_level.ipynb?flush_cache=true) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/1-psychophysics_subject_level.ipynb?flush_cache=true)
178-
| Fitting the psychometric function (group level) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/2-psychophysics_group_level.ipynb?flush_cache=true) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/2-psychophysics_group_level.ipynb?flush_cache=true)
179-
| Fitting the psychometric function (repeated measures) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/3-repeated_measures.ipynb?flush_cache=true) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/3-repeated_measures.ipynb?flush_cache=true)
180+
| Fitting the psychometric function (single subject) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/psychophysics/1-psychophysics_subject_level.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/embodied-computation-group/embodied-computation-group/Cardioception/blob/master/docs/source/examples/psychophysics/1-psychophysics_subject_level.ipynb)
181+
| Fitting the psychometric function (group level) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/psychophysics/2-psychophysics_group_level.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/psychophysics/2-psychophysics_group_level.ipynb)
180182

181183
# References
182184

Diff for: docs/source/images/downloadZIP.png

-9.34 KB
Binary file not shown.

Diff for: docs/source/user_guide.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@
88

99
`pip install cardioception`
1010

11-
* The current development branch can be installed using
11+
* The current development branch can be installed using:
1212

1313
`pip install git+https://github.com/embodied-computation-group/Cardioception.git`
1414

15-
### Downloading the ZIP file
15+
### Set up a conda environment
1616

17-
<img src="https://raw.githubusercontent.com/embodied-computation-group/Cardioception/master/docs/source//images/downloadZIP.png" align="left" alt="download_zip" height="200" HSPACE=30>
17+
The task can be installed in a new environment using the `environment.yml` file that you can find at the root of the directory. Using the Anaconda prompt, you can create a new environment with:
1818

19-
You can also download the most recent version by downloading the repository as a .zip file.
19+
`conda env create -f environment.yml`
2020

21-
After extracting the content of the file, the package can be installed via the command line by running `pip install .`. Note that this command should be executed when your terminal run inside the extracted folder. You can navigate through your local folder using the command `cd [path to your folder]`.
21+
This will create a new `cardioception` environment that you can later activate using:
2222

23-
<br clear="left"/>
23+
`conda activate cardioception`
24+
25+
```{note} If you are using the shortcut method described bellow, you will have to activate the *cardioception* environment instead of the *base* one.
26+
```
2427

2528
## Dependencies
2629

@@ -29,12 +32,11 @@ Cardioception has been tested with Python 3.7. We recommend to use the last inst
2932
Make sure that you have the following packages installed and up to date before running cardioception:
3033

3134
* [psychopy](https://www.psychopy.org/) can be installed with `pip install psychopy`.
32-
3335
* [systole](https://systole-docs.github.io/) can be installed with `pip install systole`.
3436

3537
The other main dependencies are:
3638

37-
* [numpy](https://numpy.org/) (>=1.19.4)
39+
* [numpy](https://numpy.org/) (>=1.18,<=1.23)
3840
* [scipy](https://www.scipy.org/) (>=1.3.0)
3941
* [pandas](https://pandas.pydata.org/) (>=1.0.3)
4042
* [pyserial](https://pypi.org/project/pyserial/) (>=3.4)
@@ -45,7 +47,8 @@ In addition, some function for HTML reports will require:
4547
* [matplotlib](https://matplotlib.org/) (>=3.3.3)
4648
* [seaborn](https://seaborn.pydata.org/) (>=0.11.1)
4749
* [pingouin](https://pingouin-stats.org/) (>=0.3.10)
48-
* [metadpy](https://github.com/EmbodiedComputationGroup/metadpy) (>=0.01)
50+
* [metadpy](https://github.com/EmbodiedComputationGroup/metadpy) (>=0.1.0)
51+
* [pymc](https://www.pymc.io/welcome.html) (>=5.0)
4952

5053
```{note}
5154
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.

Diff for: environment.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: cardioception
2+
dependencies:
3+
- python=3.9
4+
- pip
5+
- conda-forge::pywinhook=1.6.2
6+
- pip:
7+
- bokeh==2.4.3
8+
- systole==0.2.4
9+
- psychopy==2022.2.5
10+
- cardioception

0 commit comments

Comments
 (0)