mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
feat/OPS-61: added auto documentation for haiku.py, main.py and store_manager.py
At the moment it works by converting senju into a python package. This causes the html docu to start with a link 'senju package' which lists all three moduls and their documentation. I will try now to make it so all three moduls have a docu link of their own. The method foobar in each modul is for testing purposes and should be deleted once full functionality is confirmed.
This commit is contained in:
parent
39369a65d6
commit
b9c4091299
12 changed files with 250 additions and 44 deletions
0
senju/__init__.py
Normal file
0
senju/__init__.py
Normal file
|
|
@ -37,6 +37,13 @@ USER INPUT FOR HAIKU CREATION:
|
|||
"""
|
||||
|
||||
|
||||
def foobar():
|
||||
"""WE KNOW"""
|
||||
a = 3
|
||||
b = 3
|
||||
return a+b
|
||||
|
||||
|
||||
@dataclass
|
||||
class Haiku:
|
||||
lines: list[str]
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ 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():
|
||||
|
|
@ -31,6 +36,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
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ 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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue