diff --git a/.vscode/settings.json b/.vscode/settings.json index 1275e032..e6bca039 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,4 +16,5 @@ "python.testing.cwd": "${workspaceFolder}/doc", "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, + "python.analysis.extraPaths": ["${workspaceFolder}/doc/src", "${workspaceFolder}/doc/test"] } diff --git a/doc/pyproject.toml b/doc/pyproject.toml index e9c1357c..1f5d5ebe 100644 --- a/doc/pyproject.toml +++ b/doc/pyproject.toml @@ -7,7 +7,7 @@ markers = [ "file_contents: data for fixtures to write to files", "fixture_data: other misc data", ] -pythonpath = ["."] +pythonpath = ["src", "test"] [tool.coverage.report] include_namespace_packages = true diff --git a/doc/requirements.txt b/doc/requirements.txt index 52a23239..24df3335 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,4 @@ -black==22.10.0 # formatting -pytest==7.3.1 # testing framework -syrupy==4.0.2 # snapshot tests +black==22.10.0 # formatting +pytest==7.3.1 # testing framework +syrupy==4.0.2 # snapshot tests +typed-argument-parser==1.8.0 # better argument parsing diff --git a/doc/collate_data.py b/doc/src/collate_data.py old mode 100755 new mode 100644 similarity index 95% rename from doc/collate_data.py rename to doc/src/collate_data.py index fb341d1e..a19e3cc4 --- a/doc/collate_data.py +++ b/doc/src/collate_data.py @@ -4,7 +4,7 @@ import os # listdir import re # parsing from collections import namedtuple from html import escape -from sys import argv, stdout +from typing import TextIO # TO USE: put in Hexcasting root dir, collate_data.py src/main/resources hexcasting thehexbook out.html @@ -725,32 +725,17 @@ def write_book(out, book): write_category(out, book, category) -def main(argv): - if len(argv) < 5: - print( - f"Usage: {argv[0]}