Skip to content

Change to src layout #506

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

Closed
rettigl opened this issue Oct 13, 2024 · 3 comments
Closed

Change to src layout #506

rettigl opened this issue Oct 13, 2024 · 3 comments

Comments

@rettigl
Copy link
Member

rettigl commented Oct 13, 2024

Most large python projects have adopted a layout, where the source code files reside inside a src folder. This avoids potential problems with packaging and testing, see e.g. here: https://hynek.me/articles/testing-packaging/

I suggest doing the same for sed for V1

@rettigl rettigl mentioned this issue Oct 14, 2024
@zain-sohail
Copy link
Member

I also ported to the src layout in hextof-processor but I see no real advantage of it, especially considering we only have one top level package called sed in the repo.
And from my experience, since it's less standard, always confuses people wanting to do an editable install.
https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/

Also many large projects from my knowledge don't use it, and others do
https://github.com/pandas-dev/pandas
https://github.com/numpy/numpy
https://github.com/dask/dask

@rettigl
Copy link
Member Author

rettigl commented Oct 22, 2024

I also ported to the src layout in hextof-processor but I see no real advantage of it, especially considering we only have one top level package called sed in the repo.
And from my experience, since it's less standard, always confuses people wanting to do an editable install.

The big advantage is that you don't do a silent, unintended import of the package, where your development version behavior might deviate from the packaged version. I find that relevant for good development practice. I also sorted things a litte bit more systematically in the PR #508 to strictly separate source code from everything else.
The editable install works just the same way as before. Only thing is that you might have to re-install when the layout changes. But as we are introducing this on the v1, this should not be an issue.

@rettigl
Copy link
Member Author

rettigl commented Nov 12, 2024

Closed by #508

@rettigl rettigl closed this as completed Nov 12, 2024
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

2 participants