Skip to content

Commit fccd4d3

Browse files
Update repo for pyproject.yml with requirements.txt
1 parent 0b05797 commit fccd4d3

File tree

5 files changed

+37
-16
lines changed

5 files changed

+37
-16
lines changed

.github/workflows/build-book.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,25 @@ jobs:
1818
with:
1919
python-version: 3.11
2020

21+
- name: Install Poetry
22+
run: |
23+
curl -sSL https://install.python-poetry.org | python3 -
24+
2125
- name: Install dependencies
2226
run: |
23-
pip install -r requirements.txt
27+
poetry install
2428
2529
# (optional) Cache your executed notebooks between runs
2630
- name: Cache executed notebooks
2731
uses: actions/cache@v4
2832
with:
2933
path: _build/.jupyter_cache
30-
key: jupyter-book-cache-${{ hashFiles('requirements.txt') }}
34+
key: jupyter-book-cache-${{ hashFiles('pyproject.toml') }}
3135

3236
# Build the book
3337
- name: Build the book
3438
run: |
35-
jupyter-book build .
39+
poetry run jupyter-book build .
3640
3741
# Always upload logs, even if build succeeds
3842
- name: Upload error logs

.github/workflows/deploy-book.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,25 @@ jobs:
2525
with:
2626
python-version: 3.11
2727

28+
- name: Install Poetry
29+
run: |
30+
curl -sSL https://install.python-poetry.org | python3 -
31+
2832
- name: Install dependencies
2933
run: |
30-
pip install -r requirements.txt
34+
poetry install
3135
3236
# (optional) Cache your executed notebooks between runs
3337
- name: Cache executed notebooks
34-
uses: actions/cache@v3
38+
uses: actions/cache@v4
3539
with:
3640
path: _build/.jupyter_cache
37-
key: jupyter-book-cache-${{ hashFiles('requirements.txt') }}
41+
key: jupyter-book-cache-${{ hashFiles('pyproject.toml') }}
3842

3943
# Build the book
4044
- name: Build the book
4145
run: |
42-
jupyter-book build .
46+
poetry run jupyter-book build .
4347
4448
# Upload the book's HTML as an artifact
4549
- name: Upload artifact

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ There are also several files within the root directory; these include:
3030
- **_toc.yml**: This file organizes the structure and overall navigation of the content of the Jupyter Book that is built.
3131
- **CITATION.cff**: Provides citation information for the CfRR website, and the course content aggregated throughout the website.
3232
- **references.bib**: Used to store bibliographic references throughout all of the content on the website.
33-
- **requirements.txt**: A file that specifies the dependencies of the Python kernel used in the website.
33+
- **pyproject.yml**: A file that specifies the dependencies of the Python kernel used in the website.
3434

3535
## Contributing
3636

pyproject.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[tool.poetry]
2+
name = "Coding for Reproducible Research Courses"
3+
description = "Coding for Reproducible Research: Courses and Training Materials"
4+
authors = ["CfRR Contributors"]
5+
repository = "https://github.com/coding-for-reproducible-research/CfRR_Courses"
6+
homepage = "https://coding-for-reproducible-research.github.io/CfRR_Courses/home_page.html"
7+
8+
[tool.poetry.dependencies]
9+
python = "^3.8"
10+
numpy = "1.26.4"
11+
pandas = "^latest"
12+
jupyter-book = "^latest"
13+
ghp-import = "^latest"
14+
jupyterquiz = "^latest"
15+
matplotlib = "^latest"
16+
scikit-learn = "^latest"
17+
pyvis = "^latest"
18+
19+
[build-system]
20+
requires = ["poetry-core>=1.0.0"]
21+
build-backend = "poetry.core.masonry.api"

requirements.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)