Skip to content
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

[DISCUSSION] Move to /src project layout #740

Open
ethanwhite opened this issue Aug 11, 2024 · 0 comments
Open

[DISCUSSION] Move to /src project layout #740

ethanwhite opened this issue Aug 11, 2024 · 0 comments

Comments

@ethanwhite
Copy link
Member

ethanwhite commented Aug 11, 2024

Our current code structure is:

├─ packagename
│     ├─ __init__.py
│     └─ ...
├─ tests
│  └─ ...
└─ setup.py

While this is valid it causes a problem in that the tests end up running against the source code not against the installed package (because run from the package root import deepforest sees the source code directory). This is currently causing two issues #562 and #531 (because it is blocking the fix in #739).

These sorts of problems are why an alternative structure is often recommended:

├─ src
│  └─ packagename
│     ├─ __init__.py
│     └─ ...
├─ tests
│  └─ ...
└─ setup.py

A couple of recommendations:

So, I'm opening this issue to have a discussion about whether we should move to a /src/deepforest/ structure in order to fix #562 and #531 and generally improve the robustness of our testing going forward be testing against the package as installed not the source code.

@ethanwhite ethanwhite changed the title Move to /src project layout [DISCUSSION] Move to /src project layout Aug 11, 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

1 participant