Merge branch 'devel' into feat/OPS-56

This commit is contained in:
0xjrx 2025-03-23 18:11:44 +01:00
commit fbdd07c0fb
No known key found for this signature in database
GPG key ID: 61C53033867D0271
5 changed files with 59 additions and 22 deletions

54
.github/workflows/gendocs.yml vendored Normal file
View file

@ -0,0 +1,54 @@
name: Build and Store Documentation Artifact
on:
push:
branches:
- master
- devel
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx poetry
poetry install
- name: Build Sphinx documentation
run: |
cd docs && ls
bash auto_docu.sh
- name: Upload documentation files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
with:
path: docs/build/html/
deploy:
needs: build
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

4
.gitignore vendored
View file

@ -175,5 +175,9 @@ pyrightconfig.json
# Ollama Local Dir
ollama
# Yes i know
*.kate-swp
# sphinx rst files
docs/source/_modules

View file

@ -10,13 +10,6 @@ AI_BASE_URL: str = "http://ollama:11434/api"
AI_GEN_ENDPOINT: str = "/generate"
def foobar():
"""WE KNOW"""
a = 3
b = 3
return a + b
@dataclass
class Haiku:
lines: list[str]
@ -46,7 +39,7 @@ class Haiku:
lines = ai_response.split("\n")
for _ in range(0, 2):
while len(lines) != 3:
lines.pop()
logging.warning(lines)

View file

@ -15,13 +15,6 @@ app = Flask(__name__)
store = StoreManager(Path("/tmp/store.db"))
def foobar():
"""WE KNOW"""
a = 3
b = 3
return a + b
@app.route("/")
def index_view():
return render_template("index.html", title="Senju")

View file

@ -12,13 +12,6 @@ from senju.haiku import Haiku
DEFAULT_DB_PATH: Path = Path("/var/lib/senju.json")
def foobar():
"""WE KNOW"""
a = 3
b = 3
return a + b
class StoreManager:
__slots__ = "_db", "logger"
_db: TinyDB