Skip to content

Commit 18b9fd3

Browse files
authored
Merge pull request #7 from ssciwr/add_conda_ci
Add conda CI and local use instructions, add buttons for colab/binder in quickstart
2 parents b0056dc + 8f93912 commit 18b9fd3

File tree

4 files changed

+80
-12
lines changed

4 files changed

+80
-12
lines changed

.github/workflows/notebooks.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,39 @@ on:
77
branches:
88
- main
99
jobs:
10-
deploy:
11-
runs-on: ubuntu-latest
10+
pypi:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
15+
python-version: ["3.11", "3.12", "3.13"]
16+
runs-on: ${{ matrix.os }}
17+
name: "${{ matrix.os }} :: pypi :: ${{ matrix.python-version }}"
1218
steps:
1319
- uses: actions/checkout@v4
1420
- uses: actions/setup-python@v5
1521
with:
16-
python-version: "3.12"
22+
python-version: ${{ matrix.python-version }}
1723
- run : |
1824
pip install uv
1925
uv pip install --system -r requirements.txt
2026
- run: |
2127
jupyter execute notebooks/example.ipynb
28+
conda-forge:
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
os: ["ubuntu-latest", "macos-latest"]
33+
runs-on: ${{ matrix.os }}
34+
name: "${{ matrix.os }} :: conda-forge"
35+
timeout-minutes: 15
36+
defaults:
37+
run:
38+
shell: bash -leo pipefail {0}
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: mamba-org/setup-micromamba@v1
42+
with:
43+
environment-file: environment.yml
44+
- run: |
45+
jupyter execute notebooks/example.ipynb

docs/index.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,56 @@ Some text about what this is...
66

77
Our example notebook shows how you can download a dataset from heiData.
88

9-
### Online with Colab
9+
### Online
1010

11-
You can run our example notebook online without installing anything locally using Google Colab (Google account required):
11+
You can run our example notebook online without installing anything on your computer.
1212

13-
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ssciwr/QHCC/blob/main/notebooks/example.ipynb)
13+
<div class="grid cards" markdown>
1414

15-
### Online with Binder
15+
- __Google Colab__
1616

17-
Alternatively you can run it online using Binder:
17+
---
1818

19-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ssciwr/QHCC/HEAD?labpath=notebooks%2Fexample.ipynb)
19+
[Open In Colab](https://colab.research.google.com/github/ssciwr/QHCC/blob/main/notebooks/example.ipynb){ .md-button }
2020

21-
### Locally with Docker
21+
(Google account required)
2222

23-
todo
23+
- __Binder__
24+
25+
---
26+
27+
[Open in Binder](https://mybinder.org/v2/gh/ssciwr/QHCC/HEAD?labpath=notebooks%2Fexample.ipynb){ .md-button }
28+
</div>
2429

2530
### Locally
2631

27-
todo
32+
Alternatively you can run it on your computer.
33+
34+
First clone the repository using git:
35+
36+
```bash
37+
git clone https://github.com/ssciwr/QHCC
38+
cd QHCC
39+
```
40+
41+
Then install the required Python libraries and launch JupyterLab:
42+
43+
=== "pip"
44+
```bash
45+
pip install -r requirements.txt
46+
jupyter lab notebooks/example.ipynb
47+
```
48+
49+
=== "conda"
50+
```bash
51+
conda env create -f environment.yml
52+
conda activate QHCC
53+
jupyter lab notebooks/example.ipynb
54+
```
55+
56+
=== "micromamba"
57+
```bash
58+
micromamba env create -f environment.yml
59+
micromamba activate QHCC
60+
jupyter lab notebooks/example.ipynb
61+
```

environment.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: QHCC
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python
6+
- pooch
7+
- pandas
8+
- jupyter

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ markdown_extensions:
1515
- pymdownx.inlinehilite
1616
- pymdownx.snippets
1717
- pymdownx.superfences
18+
- attr_list
19+
- md_in_html
1820
nav:
1921
- Home: index.md
2022
- Data: data.md

0 commit comments

Comments
 (0)