pvlib-python icon indicating copy to clipboard operation
pvlib-python copied to clipboard

Consider switching to `src` layout

Open kandersolar opened this issue 10 months ago • 2 comments

To my mind, src is a separate discussion, and doesn't need to be done in https://github.com/pvlib/pvlib-python/pull/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.

kandersolar avatar Mar 05 '25 13:03 kandersolar

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

echedey-ls avatar Mar 13 '25 00:03 echedey-ls

Idk, the definitive source recommends core or lib :laughing:

mikofski avatar Mar 13 '25 01:03 mikofski