Skip to content

Commit

Permalink
update default packages and python versions (#177)
Browse files Browse the repository at this point in the history
* update default packages and python versions

* drop bokeh from requirements
  • Loading branch information
LegrandNico authored Apr 19, 2024
1 parent ed2379c commit a5d5a3a
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 472 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'

- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- name: Install pypa/build
run: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
512 changes: 68 additions & 444 deletions docs/source/notebooks/Example_1_Heart_rate_variability.ipynb

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions docs/source/notebooks/Example_1_Heart_rate_variability.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.15.1
jupytext_version: 1.16.1
kernelspec:
display_name: Python 3 (ipykernel)
language: python
Expand Down Expand Up @@ -45,8 +45,6 @@ import matplotlib.pyplot as plt
import numpy as np
import pymc as pm
import seaborn as sns
from bokeh.io import output_notebook
from bokeh.plotting import show
from systole import import_dataset1
from systole.detection import ecg_peaks
from systole.plots import plot_raw
Expand All @@ -57,10 +55,6 @@ from pyhgf.model import HGF
from pyhgf.response import total_gaussian_surprise
```

```{code-cell} ipython3
output_notebook()
```

The nodalized version of the Hierarchical Gaussian Filter that is implemented in [pyhgf](https://github.com/ilabcode/pyhgf) opens the possibility to create filters with multiple inputs. Here, we illustrate how we can use this feature to create an agent that is filtering their physiological signals in real-time. We use a two-level Hierarchical Gaussian Filter to predict the dynamics of the instantaneous heart rate (the RR interval measured at each heartbeat). We then extract the trajectory of surprise at each predictive node to relate it with the cognitive task performed by the participant while the signal is being recorded.

+++
Expand All @@ -79,9 +73,7 @@ ecg = physio_df.ecg
### Plot the signal with instantaneous heart rate derivations

```{code-cell} ipython3
show(
plot_raw(ecg, modality='ecg', sfreq=1000, show_heart_rate=True, backend="bokeh")
)
plot_raw(ecg, modality='ecg', sfreq=1000, show_heart_rate=True);
```

### Preprocessing
Expand Down
15 changes: 8 additions & 7 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: pyhgf_dev
dependencies:
- python=3.9
- python=3.12
- pip
- conda-forge::pymc
- graphviz
- pip:
- jax>=0.4.1
- jaxlib>=0.4.1
- numpy>=1.18,<=1.23
- jax==0.4.26
- jaxlib==0.4.26
- numpy==1.26.4
- matplotlib>=3.0.2
- seaborn>=0.9.0
- arviz>=0.12.0
- setuptools>=38.4
- arviz>=0.18.0
- setuptools>=69.5.1
- packaging
- graphviz
- pytest
- pre-commit
3 changes: 1 addition & 2 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ numpydoc>=1.6.0
myst-parser>=2.0.0
graphviz
watermark
systole
bokeh==2.3.2
systole>=0.3.0
sphinx-togglebutton
sphinx-design
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
numpy>=1.18, <1.26
numpy>=1.18
matplotlib>=3.0.2
seaborn>=0.9.0
arviz>=0.12.0
pymc>=5.0.0
jax>=0.4.14, <0.4.20
jaxlib>=0.4.14, <0.4.20
jax>=0.4.26
jaxlib>=0.4.26
setuptools>=38.4
packaging
packaging

0 comments on commit a5d5a3a

Please sign in to comment.