Replies: 1 comment 1 reply
-
@elbeejay Thank you for bringing up worldbank/GOSTnets#55 regarding the structure of a project. This discussion is relevant on that topic. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Within the (fabulously chaotic) Python packaging ecosystem, you'll typically encounter two main project structures: the src layout and the flat layout. Each of these layouts have advantages and disadvantages.
There is increasing consensus to adopt the src/ layout, for instance:
The src layout helps prevent accidental usage of the in-development copy of the code. Using a src layout ensures that tests run against the installed version of the package (the one that would be installed by pip), rather than the local source code.
The src layout helps enforce that an editable installation is only able to import files that were meant to be importable.
Several World Bank projects use the src layout, e.g., BlackMarblePy, GOSTnets and the Template.
But now, it is your turn. What are your thoughts on this topic? (And the following meme).
Beta Was this translation helpful? Give feedback.
All reactions