grimme-lab / dxtb

Efficient And Fully Differentiable Extended Tight-Binding
https://dxtb.readthedocs.io
Apache License 2.0
71 stars 11 forks source link

Refactor src directory #142

Closed hoelzerC closed 7 months ago

hoelzerC commented 7 months ago

Was there a specific reason to have ./src/dxtb instead of ./dxtb in the root directory of the package?

marvinfriede commented 7 months ago

See: https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/

marvinfriede commented 7 months ago

Requiring an explicit installation avoids wrong paths and enforces a working installation for development. Otherwise, when running tests from the root of the repo, you just import from the ./dxtb directory.

hoelzerC commented 7 months ago

Okay, we can design the user story to require explicit installation. Let's make a note of that in the docs.

marvinfriede commented 7 months ago

The user does not need to do anything different here. The setup.cfg is configured to respect the src layout, so pip install . still works for installation from source. I will configure pip and conda for better installation anyway. The src layout really only avoids some undesired behavior for us developers.

hoelzerC commented 7 months ago

So far it was not designed that user == pip install dxtb and developer == git clone. That was the whole point. For developers, it is slightly unhandy to import modules manually.