Refactor code structure for improved readability and maintainability
Some checks failed
/ serve (push) Failing after 47s
Some checks failed
/ serve (push) Failing after 47s
This commit is contained in:
parent
7ea0ad923c
commit
71b8630862
7 changed files with 1378 additions and 25 deletions
|
@ -4,29 +4,20 @@ on:
|
||||||
- "main"
|
- "main"
|
||||||
jobs:
|
jobs:
|
||||||
serve:
|
serve:
|
||||||
runs-on: self-hosted
|
runs-on: uv
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: "true"
|
submodules: "true"
|
||||||
- name: Initialize virtual environment
|
|
||||||
run: /usr/bin/python -m venv .venv
|
|
||||||
- name: Install dependencies
|
|
||||||
run: ./.venv/bin/pip install -r requirements.txt
|
|
||||||
- name: Execute code
|
- name: Execute code
|
||||||
run: |
|
run: uv run myst build --execute
|
||||||
. .venv/bin/activate
|
|
||||||
myst build --execute
|
|
||||||
- name: Build PDF exports
|
- name: Build PDF exports
|
||||||
run: |
|
run: uv run myst build --execute --pdf
|
||||||
. .venv/bin/activate
|
|
||||||
myst build --execute --pdf
|
|
||||||
- name: Build static HTML
|
- name: Build static HTML
|
||||||
run: |
|
run: uv run myst build --execute --html
|
||||||
. .venv/bin/activate
|
|
||||||
myst build --execute --html
|
|
||||||
- name: Copy files
|
- name: Copy files
|
||||||
run: |
|
uses: actions/upload-artifact@v4
|
||||||
rm -rf /data/srv/forgejo-runner/cours4.0
|
with:
|
||||||
cp -r _build/html /data/srv/forgejo-runner/cours4.0
|
name: srv
|
||||||
|
path: _build/html
|
1
.python-version
Normal file
1
.python-version
Normal file
|
@ -0,0 +1 @@
|
||||||
|
3.13
|
|
@ -3,4 +3,4 @@
|
||||||
<https://cours.edgarpierre.fr>
|
<https://cours.edgarpierre.fr>
|
||||||
|
|
||||||
[](https://myst.tools)
|
[](https://myst.tools)
|
||||||
[](https://git.edgarpierre.fr/edpibu/cours4.0/actions?workflow=serve.yaml)
|
[](https://code.edgarpierre.fr/edpibu/cours4.0/actions?workflow=serve.yaml)
|
6
main.py
Normal file
6
main.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
def main():
|
||||||
|
print("Hello from cours4-0!")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
15
pyproject.toml
Normal file
15
pyproject.toml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[project]
|
||||||
|
name = "cours4-0"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "Cours 4.0"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.13"
|
||||||
|
dependencies = [
|
||||||
|
"mystmd",
|
||||||
|
"jupyter-server",
|
||||||
|
"ipykernel",
|
||||||
|
"matplotlib",
|
||||||
|
"numpy",
|
||||||
|
"pandas",
|
||||||
|
"scipy",
|
||||||
|
]
|
|
@ -1,7 +0,0 @@
|
||||||
mystmd
|
|
||||||
jupyter-server
|
|
||||||
ipykernel
|
|
||||||
matplotlib
|
|
||||||
numpy
|
|
||||||
pandas
|
|
||||||
scipy
|
|
Loading…
Add table
Add a link
Reference in a new issue