Closed maffoo closed 7 years ago
Agree. We will move the parts which need to be compiled to the ProjectQ repo (also for other reasons) and hence we could rename the src
folder to fermilib
as no installation will be required.
I think we should also consider grouping modules into subpackages to clean up the fermilib directory and having a separate directory for examples would make the distinction between library code and code using the library a bit clearer.
Sounds good to me. This will a step in the ProjectQ / FermiLib integration that we're going to be working on pretty seriously in April.
I moved things around a little bit to separate actual source from examples. But eventually we will still do what Mathew suggests.
Currently the code is in a directory called
src
so if you have the repo checked out and on the python path you'd have to import things from a package calledsrc
, which is not ideal.My suggestion: move code into
src/fermilib
and then include a note in the readme that when running from source the user should put<checkout_dir>/src
on the python path. Then can do things likefrom fermilib import chemical_series
.Another option would be to just rename the existing
src
folder tofermilib
and recommend that people put the checkout directory onto the python path directly, however, there are some advantages to putting code into a subdirectory likesrc
, especially in dev setups where you might want to have compiled extensions.