Skip to content

Consider switching to src layout #2403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kandersolar opened this issue Mar 5, 2025 · 2 comments
Open

Consider switching to src layout #2403

kandersolar opened this issue Mar 5, 2025 · 2 comments

Comments

@kandersolar
Copy link
Member

To my mind, src is a separate discussion, and doesn't need to be done in #2277, if at all.

I brought it up because it seems to me that the majority of projects that use /tests also use /src. Indeed most of the linked packages on the PyOpenSci reference use /pkg/tests rather than /pkg + /tests. Also pytest docs include examples for either /src + /tests OR /pkg/tests but not /pkg + /tests. Maybe it's ok but I like to follow the more popular patterns unless I know why I am deviating from them.

Originally posted by @wholmgren in #2271

#2277 moved the package from a flat layout to a "halfway-src" layout. We should consider adopting the src layout entirely, as the python community seems broadly agreed that the src layout is beneficial.

@echedey-ls
Copy link
Contributor

as the python community seems broadly agreed that the src layout is beneficial

(Relevant source): https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html#the-src-layout-and-testing

@mikofski
Copy link
Member

Idk, the definitive source recommends core or lib 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants