Merge pull request #29 from senju1337/feat/OPS-61

feat/OPS-61: auto documentation
This commit is contained in:
Guts 2025-03-20 11:42:14 +01:00 committed by GitHub
commit 440aaa2bd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 373 additions and 14 deletions

View file

@ -10,6 +10,13 @@ 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]

View file

@ -15,6 +15,13 @@ 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")
@ -31,6 +38,7 @@ def haiku_index_view():
@app.route("/haiku/<int:haiku_id>")
def haiku_view(haiku_id):
"""test"""
haiku: Haiku | None = store.load_haiku(haiku_id)
if haiku is None:
# TODO: add "haiku not found" page

View file

@ -12,6 +12,13 @@ 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