Feat(python-generator): remove implicit assumptions of project directory structure #39

Merged
jakob.scheid merged 3 commits from feature/no-src-dir-need into main 2026-09-22 19:28:50 +02:00
9 changed files with 5 additions and 5 deletions
Showing only changes of commit c40e965d8d - Show all commits

No files matched your search

@@ -31,7 +31,7 @@ from src.jcloud_docsgen.core.python.namespaces import (
(
PythonDocumentationGenerator(
pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_1'
'tests/unit/core/python/_core/test_project_dirs/pdir_1/src'
jakob.scheid marked this conversation as resolved Outdated
Outdated
Review

Keep the src/ and docs/ directory.

Keep the `src/` and `docs/` directory.
),
pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_1/docs'
@@ -42,7 +42,7 @@ from src.jcloud_docsgen.core.python.namespaces import (
(
PythonDocumentationGenerator(
pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_2'
'tests/unit/core/python/_core/test_project_dirs/pdir_2/src'
),
pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_2/docs'
@@ -58,7 +58,7 @@ from src.jcloud_docsgen.core.python.namespaces import (
(
PythonDocumentationGenerator(
pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_3'
'tests/unit/core/python/_core/test_project_dirs/pdir_3/src'
),
pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_3/docs'
@@ -85,7 +85,7 @@ def test_PythonDocumentationGenerator_collect_modules(
python_documentation_generator: PythonDocumentationGenerator,
expected,
):
assert python_documentation_generator.namespace() == expected
assert python_documentation_generator.namespace().sub_namespaces == expected
@pytest.mark.parametrize(
@@ -130,7 +130,7 @@ def test_creates_directory():
project_dir = pathlib.Path(project_dir)
# The directory of the package
package_dir = project_dir / 'src' / 'pkg'
package_dir = project_dir / 'pkg'
assert not package_dir.exists()
package_dir.mkdir(parents=True, exist_ok=True)