mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
Merge branch 'devel' into feat/OPS-56
This commit is contained in:
commit
fbdd07c0fb
5 changed files with 59 additions and 22 deletions
54
.github/workflows/gendocs.yml
vendored
Normal file
54
.github/workflows/gendocs.yml
vendored
Normal 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
4
.gitignore
vendored
|
|
@ -175,5 +175,9 @@ pyrightconfig.json
|
||||||
# Ollama Local Dir
|
# Ollama Local Dir
|
||||||
ollama
|
ollama
|
||||||
|
|
||||||
|
|
||||||
|
# Yes i know
|
||||||
|
*.kate-swp
|
||||||
# sphinx rst files
|
# sphinx rst files
|
||||||
docs/source/_modules
|
docs/source/_modules
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,6 @@ AI_BASE_URL: str = "http://ollama:11434/api"
|
||||||
AI_GEN_ENDPOINT: str = "/generate"
|
AI_GEN_ENDPOINT: str = "/generate"
|
||||||
|
|
||||||
|
|
||||||
def foobar():
|
|
||||||
"""WE KNOW"""
|
|
||||||
a = 3
|
|
||||||
b = 3
|
|
||||||
return a + b
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class Haiku:
|
class Haiku:
|
||||||
lines: list[str]
|
lines: list[str]
|
||||||
|
|
@ -46,7 +39,7 @@ class Haiku:
|
||||||
|
|
||||||
lines = ai_response.split("\n")
|
lines = ai_response.split("\n")
|
||||||
|
|
||||||
for _ in range(0, 2):
|
while len(lines) != 3:
|
||||||
lines.pop()
|
lines.pop()
|
||||||
|
|
||||||
logging.warning(lines)
|
logging.warning(lines)
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,6 @@ app = Flask(__name__)
|
||||||
store = StoreManager(Path("/tmp/store.db"))
|
store = StoreManager(Path("/tmp/store.db"))
|
||||||
|
|
||||||
|
|
||||||
def foobar():
|
|
||||||
"""WE KNOW"""
|
|
||||||
a = 3
|
|
||||||
b = 3
|
|
||||||
return a + b
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index_view():
|
def index_view():
|
||||||
return render_template("index.html", title="Senju")
|
return render_template("index.html", title="Senju")
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,6 @@ from senju.haiku import Haiku
|
||||||
DEFAULT_DB_PATH: Path = Path("/var/lib/senju.json")
|
DEFAULT_DB_PATH: Path = Path("/var/lib/senju.json")
|
||||||
|
|
||||||
|
|
||||||
def foobar():
|
|
||||||
"""WE KNOW"""
|
|
||||||
a = 3
|
|
||||||
b = 3
|
|
||||||
return a + b
|
|
||||||
|
|
||||||
|
|
||||||
class StoreManager:
|
class StoreManager:
|
||||||
__slots__ = "_db", "logger"
|
__slots__ = "_db", "logger"
|
||||||
_db: TinyDB
|
_db: TinyDB
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue