Skip to content

Commit

Permalink
Merge pull request #7 from ssciwr/add_conda_ci
Browse files Browse the repository at this point in the history
Add conda CI and local use instructions, add buttons for colab/binder in quickstart
  • Loading branch information
lkeegan authored Dec 3, 2024
2 parents b0056dc + 8f93912 commit 18b9fd3
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 12 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,39 @@ on:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
pypi:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
name: "${{ matrix.os }} :: pypi :: ${{ matrix.python-version }}"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: ${{ matrix.python-version }}
- run : |
pip install uv
uv pip install --system -r requirements.txt
- run: |
jupyter execute notebooks/example.ipynb
conda-forge:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
name: "${{ matrix.os }} :: conda-forge"
timeout-minutes: 15
defaults:
run:
shell: bash -leo pipefail {0}
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
- run: |
jupyter execute notebooks/example.ipynb
52 changes: 43 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,56 @@ Some text about what this is...

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

### Online with Colab
### Online

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

[![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)
<div class="grid cards" markdown>

### Online with Binder
- __Google Colab__

Alternatively you can run it online using Binder:
---

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

### Locally with Docker
(Google account required)

todo
- __Binder__

---

[Open in Binder](https://mybinder.org/v2/gh/ssciwr/QHCC/HEAD?labpath=notebooks%2Fexample.ipynb){ .md-button }
</div>

### Locally

todo
Alternatively you can run it on your computer.

First clone the repository using git:

```bash
git clone https://github.com/ssciwr/QHCC
cd QHCC
```

Then install the required Python libraries and launch JupyterLab:

=== "pip"
```bash
pip install -r requirements.txt
jupyter lab notebooks/example.ipynb
```

=== "conda"
```bash
conda env create -f environment.yml
conda activate QHCC
jupyter lab notebooks/example.ipynb
```

=== "micromamba"
```bash
micromamba env create -f environment.yml
micromamba activate QHCC
jupyter lab notebooks/example.ipynb
```
8 changes: 8 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: QHCC
channels:
- conda-forge
dependencies:
- python
- pooch
- pandas
- jupyter
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ markdown_extensions:
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- attr_list
- md_in_html
nav:
- Home: index.md
- Data: data.md
Expand Down

0 comments on commit 18b9fd3

Please sign in to comment.