Skip to content

Commit f59df5a

Browse files
authored
Merge pull request #6 from pathsim/feature/chem-docs-config
chem docs config
2 parents 2c6b46c + c59d1b8 commit f59df5a

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

scripts/lib/api.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def extract_api(package_id: str, source_path: Path, root_modules: list[str]) ->
5050

5151

5252
def _discover_modules(source_path: Path, root_module: str) -> list[str]:
53-
"""Discover all modules under a root module path."""
53+
"""Recursively discover all modules and subpackages under a root module path."""
5454
modules = []
5555
parts = root_module.split(".")
5656
module_dir = source_path / Path(*parts)
@@ -71,6 +71,13 @@ def _discover_modules(source_path: Path, root_module: str) -> list[str]:
7171
if not _should_skip_module(submodule):
7272
modules.append(submodule)
7373

74+
# recurse into subpackages
75+
for subdir in sorted(module_dir.iterdir()):
76+
if subdir.is_dir() and (subdir / "__init__.py").exists():
77+
subpackage = f"{root_module}.{subdir.name}"
78+
if not _should_skip_module(subpackage):
79+
modules.extend(_discover_modules(source_path, subpackage))
80+
7481
return modules
7582

7683

scripts/lib/config.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
"griffe_package": "pathsim",
2323
"root_modules": [
2424
"pathsim",
25-
"pathsim.blocks",
26-
"pathsim.solvers",
27-
"pathsim.events",
28-
"pathsim.optim",
29-
"pathsim.utils",
3025
],
3126
},
3227
"chem": {
@@ -38,8 +33,6 @@
3833
"griffe_package": "pathsim_chem",
3934
"root_modules": [
4035
"pathsim_chem",
41-
"pathsim_chem.thermodynamics",
42-
"pathsim_chem.tritium",
4336
],
4437
},
4538
"vehicle": {

scripts/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ipykernel>=6.0.0
1414

1515
# PathSim and dependencies (for notebook execution)
1616
pathsim
17+
pathsim-chem
1718
matplotlib
1819
numpy
1920
scipy

0 commit comments

Comments
 (0)