Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
ci: updates (#1)
Browse files Browse the repository at this point in the history
* feat: add funding

* ci: add dependabot

* ci: update julia and permission

* ci: quarto render

* feat: update julia to 1.10

* feat(python): simplify requirements

* ci: quarto render

* ci: julia-actions/cache

* ci: quarto-render

* ci: add IJulia

* ci: quarto-publish
  • Loading branch information
storopoli committed Jan 8, 2024
1 parent ba7faf2 commit a361568
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 105 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: storopoli
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Set update schedule for GitHub Actions
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
31 changes: 21 additions & 10 deletions .github/workflows/quarto-publish.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
on:
push:
branches: main
branches:
- main
- master
workflow_dispatch:

name: Render and Publish

jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
# For the push to `gh-pages` branch.
contents: write
pages: write
env:
JULIA_NUM_THREADS: "auto"
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
Expand All @@ -20,28 +28,31 @@ jobs:
# uncomment below and fill to pin a version
# version: SPECIFIC-QUARTO-VERSION-HERE

- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: "1"
- name: Instantiate Julia project
run: julia --color=yes --project -e 'using Pkg; Pkg.instantiate()'

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
cache: 'pip'
- name: Install Jupyter
run: pip install jupyter # (if jupyter is not part of your requirements.txt)
run: pip install jupyter jupyter-cache
- name: Install Python project
run: pip install -r requirements.txt
- run: echo "PYTHON=$(which python)" >> $GITHUB_ENV

- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: "1"
- name: Cache Julia
uses: julia-actions/cache@v1
- name: Instantiate Julia project
run: julia --color=yes --project -e 'using Pkg; Pkg.instantiate()'

- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
path: index.qmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions

62 changes: 62 additions & 0 deletions .github/workflows/quarto-render.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
workflow_dispatch:

name: Render

jobs:
build:
runs-on: ubuntu-latest
env:
JULIA_NUM_THREADS: "auto"
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# To install LaTeX to build PDF book
tinytex: false # we don't need latex
# uncomment below and fill to pin a version
# version: SPECIFIC-QUARTO-VERSION-HERE

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
cache: 'pip'
- name: Install Jupyter
run: pip install jupyter jupyter-cache
- name: Install Python project
run: pip install -r requirements.txt
- run: echo "PYTHON=$(which python)" >> $GITHUB_ENV

- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: "1"
- name: Cache Julia
uses: julia-actions/cache@v1
- name: Instantiate Julia project
run: julia --color=yes --project -e 'using Pkg; Pkg.instantiate()'

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html # If set, it will be equivalent to `quarto render --to html`
path: index.qmd

- name: Make preview available
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: html-preview
path: ./index.html
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Chain = "8be319e6-bccf-4806-a6f7-6fae938471bc"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
1 change: 0 additions & 1 deletion index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ format:
execute:
echo: true
cache: true
jupyter: julia-1.8
---

```{julia}
Expand Down
97 changes: 3 additions & 94 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,94 +1,3 @@
anyio==3.6.2
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arrow==1.2.3
asttokens==2.2.1
attrs==22.2.0
backcall==0.2.0
beautifulsoup4==4.11.2
bleach==6.0.0
cffi==1.15.1
click==8.1.3
comm==0.1.2
debugpy==1.6.6
decorator==5.1.1
defusedxml==0.7.1
executing==1.2.0
fastjsonschema==2.16.2
fqdn==1.5.1
greenlet==2.0.2
idna==3.4
importlib-metadata==6.0.0
ipykernel==6.21.1
ipython==8.9.0
ipython-genutils==0.2.0
ipywidgets==8.0.4
isoduration==20.11.0
jedi==0.18.2
Jinja2==3.1.2
jsonpointer==2.3
jsonschema==4.17.3
jupyter==1.0.0
jupyter-cache==0.5.0
jupyter-console==6.4.4
jupyter-events==0.6.3
jupyter_client==8.0.2
jupyter_core==5.2.0
jupyter_server==2.2.1
jupyter_server_terminals==0.4.4
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.5
MarkupSafe==2.1.2
matplotlib-inline==0.1.6
mistune==2.0.5
nbclassic==0.5.1
nbclient==0.5.13
nbconvert==7.2.9
nbformat==5.7.3
nest-asyncio==1.5.6
notebook==6.5.2
notebook_shim==0.2.2
numpy==1.24.2
packaging==23.0
pandas==1.5.3
pandocfilters==1.5.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
platformdirs==3.0.0
prometheus-client==0.16.0
prompt-toolkit==3.0.36
psutil==5.9.4
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
Pygments==2.14.0
pyrsistent==0.19.3
python-dateutil==2.8.2
python-json-logger==2.0.4
pytz==2022.7.1
PyYAML==6.0
pyzmq==25.0.0
qtconsole==5.4.0
QtPy==2.3.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
scipy==1.10.0
Send2Trash==1.8.0
six==1.16.0
sniffio==1.3.0
soupsieve==2.3.2.post1
SQLAlchemy==1.4.46
stack-data==0.6.2
tabulate==0.9.0
terminado==0.17.1
tinycss2==1.2.1
tornado==6.2
traitlets==5.9.0
uri-template==1.2.0
wcwidth==0.2.6
webcolors==1.12
webencodings==0.5.1
websocket-client==1.5.1
widgetsnbextension==4.0.5
zipp==3.12.1
numpy
pandas
scipy

0 comments on commit a361568

Please sign in to comment.