DHI / DHI/python-package-development

File structure

Open
#24 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Jupyter Notebook
Stars
8
Forks
1
Avg merge
4m
Merged PRs (30d)
1

Description

* Add a suggested file structure and the connection to modules and import resolution.
* [src layout vs flat layout](https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/)
* What belongs in a module level `__init__py`, should it be empty?
* Consider if placing the tests inside the modules make sense (see e.g. https://github.com/scikit-learn/scikit-learn/tree/main/sklearn/ensemble)
![Image](https://github.com/user-attachments/assets/c54e11b6-3989-4ee4-a7d5-f494cc9d575a)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked Python Packaging User Guide discussion and the scikit-learn ensemble tree to compare src and flat layouts and test placement. Done means the course documents a recommended file structure, its module and import-resolution relationship, guidance for module-level __init__.py files, and a position on placing tests inside modules.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.