Skip to content

Commit

Permalink
Cleanup 🧹
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouni committed Dec 16, 2024
1 parent d5ba3f0 commit 1872ac9
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/scripts/docs/gen-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@

logging.basicConfig(level=logging.INFO)

logger = logging.getLogger("doc-gen")
logger = logging.getLogger("docs generator")


BASEPATH = Path(__file__).resolve().parent


# for no, parameter in p._data.items():
# print(no, parameter.name)


def gather_data() -> dict:
logger.info("gather docs data")
p = Parameters()
c = Calculations()
v = Visibilities()
Expand All @@ -36,19 +33,6 @@ def gather_data() -> dict:
return data


# def parse_group(group: Literal["calculations", "parameters", "visibilities"]) -> list[dict]:
# logger.info("parse group '%s'", group)
# data = []
# with open(BASEPATH.parents[3] / f"luxtronik/{group}.py") as f:
# raw = f.read()
# regex = re.compile(r"(?P<number>\d+):\s+(?P<type>[^(]+)\(\"(?P<name>[^\"]+)\"\)")
# results = [m.groupdict() for m in regex.finditer(raw)]
# logger.info("found %d entries", len(results))
# for r in results:
# data.append({"number": r["number"], "type": r["type"], "name": r["name"]})
# return data
#
#
def render_docs():
logger.info("render docs")
env = Environment(loader=FileSystemLoader(str(BASEPATH / "templates")), autoescape=select_autoescape())
Expand All @@ -59,7 +43,5 @@ def render_docs():
f.write(template.render(data=group_data))


#

if __name__ == "__main__":
render_docs()

0 comments on commit 1872ac9

Please sign in to comment.