Refactor code structure for improved readability and maintainability
Some checks failed
/ serve (push) Failing after 47s

This commit is contained in:
Edgar P. Burkhart 2025-05-05 16:48:54 +02:00
parent 7ea0ad923c
commit 71b8630862
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
7 changed files with 1378 additions and 25 deletions

View file

@ -4,29 +4,20 @@ on:
- "main"
jobs:
serve:
runs-on: self-hosted
runs-on: uv
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
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
run: |
. .venv/bin/activate
myst build --execute
run: uv run myst build --execute
- name: Build PDF exports
run: |
. .venv/bin/activate
myst build --execute --pdf
run: uv run myst build --execute --pdf
- name: Build static HTML
run: |
. .venv/bin/activate
myst build --execute --html
run: uv run myst build --execute --html
- name: Copy files
run: |
rm -rf /data/srv/forgejo-runner/cours4.0
cp -r _build/html /data/srv/forgejo-runner/cours4.0
uses: actions/upload-artifact@v4
with:
name: srv
path: _build/html

1
.python-version Normal file
View file

@ -0,0 +1 @@
3.13

View file

@ -3,4 +3,4 @@
<https://cours.edgarpierre.fr>
[![Made with MyST](https://img.shields.io/badge/made%20with-myst-orange)](https://myst.tools)
[![Forgejo Actions](https://git.edgarpierre.fr/edpibu/cours4.0/badges/workflows/serve.yaml/badge.svg)](https://git.edgarpierre.fr/edpibu/cours4.0/actions?workflow=serve.yaml)
[![Forgejo Actions](https://code.edgarpierre.fr/edpibu/cours4.0/badges/workflows/serve.yaml/badge.svg)](https://code.edgarpierre.fr/edpibu/cours4.0/actions?workflow=serve.yaml)

6
main.py Normal file
View file

@ -0,0 +1,6 @@
def main():
print("Hello from cours4-0!")
if __name__ == "__main__":
main()

15
pyproject.toml Normal file
View 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",
]

View file

@ -1,7 +0,0 @@
mystmd
jupyter-server
ipykernel
matplotlib
numpy
pandas
scipy

1347
uv.lock generated Normal file

File diff suppressed because it is too large Load diff