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
Owner

Description

This pull request removes the implicit assumptions of the project directory structure. Now, there is no need that there is a src/ directory in the project directory and top-level directories in the project directory are not treated as top-level packages, which will be installed as separate packages, but normal packages in the project like every other. As a result, top-level *.py files are no longer ignored.

Tests were updated to the new behavior and the test project directories are restructured.

There is a new entry in the changelog for this change.

Related issues

Closes #32

## Description This pull request removes the implicit assumptions of the project directory structure. Now, there is no need that there is a `src/` directory in the project directory and top-level directories in the project directory are not treated as top-level packages, which will be installed as separate packages, but normal packages in the project like every other. As a result, top-level `*.py` files are no longer ignored. Tests were updated to the new behavior and the test project directories are restructured. There is a new entry in the changelog for this change. ## Related issues Closes #32
jakob.scheid added this to the 0.2.0 milestone 2026-09-22 19:15:07 +02:00
jakob.scheid added the Kind/DocumentationKind/Feature
Priority
High
2
Compat/Breaking
labels 2026-09-22 19:15:07 +02:00
jakob.scheid added this to the Project Board project 2026-09-22 19:15:07 +02:00
jakob.scheid added 1 commit 2026-09-22 19:15:08 +02:00
Removed all implicit assumptions of a project structure:
  - no 'src/' directory is required
  - top-level modules are no longer ignored
jakob.scheid moved this to Review in Project Board on 2026-09-22 19:15:13 +02:00
@@ -12,6 +12,7 @@
- Replaced the installation instructions, which used the old registry, with a reference to the Gitea Package Registry in README
- Made Python function signatures (argument default values) compliant with PEP 8
- Removed implicit project directory structure assumptions
Author
Owner

Mention that it only affects Python projects.

Mention that it only affects Python projects.
jakob.scheid marked this conversation as resolved
@@ -30,5 +30,5 @@
'tests/unit/core/python/_core/test_project_dirs/pdir_1'
),
pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_1/docs'
),
Author
Owner

Keep the src/ and docs/ directory.

Keep the `src/` and `docs/` directory.
jakob.scheid marked this conversation as resolved
jakob.scheid force-pushed feature/no-src-dir-need from cfc00dadb2 to 62cadcc7ae 2026-09-22 19:26:00 +02:00 Compare
jakob.scheid added 1 commit 2026-09-22 19:27:47 +02:00
Updated tests to do not implicitly assume a 'src/' directory structure
and removed all 'src/' subdirectory structures in test project
directories (if possible).
jakob.scheid force-pushed feature/no-src-dir-need from 62cadcc7ae to 9a2bee78a1 2026-09-22 19:27:47 +02:00 Compare
jakob.scheid added 1 commit 2026-09-22 19:28:40 +02:00
Added an entry that the implicit Python project directory
structure assumptions have been removed to the changelog.
jakob.scheid force-pushed feature/no-src-dir-need from 9a2bee78a1 to 53ab0e3829 2026-09-22 19:28:40 +02:00 Compare
jakob.scheid merged commit 2fe342cbc6 into main 2026-09-22 19:28:50 +02:00
jakob.scheid deleted branch feature/no-src-dir-need 2026-09-22 19:28:50 +02:00
jakob.scheid moved this to Done in Project Board on 2026-09-22 19:28:54 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jCloud/jcloud-docsgen#39