Closed peterkaminski closed 1 year ago
I'm happy to adjust this for "best practices" but figuring out what that is, is hard. Changing the readme is easiest in some sense.
I'm not against removing the mostly useless "src" level of the hierarchy, but only after seeing if I can reconstruct the reason I added it in the first place.
Having a "src/" directory is recommended by pypa documentation as is using "pip install -e" to work in 'development mode' (more on development mode)
Given these two pieces of advice from the official python packaging documentation, I don't plan to remove the src/ directory level at this time.
However, in #15 I have added a script "chap.py" in the top level that does allow pip install -r requirements.txt; python chap.py
to work.
Thank you for the accommodation!
Following the pypa advice is obviously a good thing, and I generally like the top-level script to run chap -- I think it makes the repo more usable, if also a little more messy.
@jepler, this is more of a question or a comment than an issue.
When I work on the
chap
code in the checked-out repo, I end up running the code withpython -m chap
. (Hence the desire to have arequirements.txt
file, as noted in #5 and #15.)You've got the
chap
directory in the/src
directory, which makes sense, because it's source code.However, for
python -m chap
to work, I need to change directory to be within thesrc
directory. Which in itself is fine, no big deal.However^2, the new
requirements.txt
file from #15 is at the root. So forpip install -r requirements.txt
to work, I need to be at the root.Again, none of this is a big deal, but it's a little detail that I would smooth out, probably by moving the
chap
directory to the root (orrequirements.txt
to src, but that seems less aesthetically pleasing).It's not a problem to prepend
src
or..
in the right places, either:python -m src.chap
orpip install -r ../requirements.txt
Or to just change directory at the right times.
But it seems like extra and unexpected cognitive overhead, just for having
chap
insidesrc
.Possible next steps:
python -m chap
for people who are running from the source codeLet me know if I can help on any of those!