-
Notifications
You must be signed in to change notification settings - Fork 5
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
Make lsqecc pep 561 compliant #260
Make lsqecc pep 561 compliant #260
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #260 +/- ##
==========================================
+ Coverage 68.32% 68.60% +0.27%
==========================================
Files 23 23
Lines 1926 1978 +52
==========================================
+ Hits 1316 1357 +41
- Misses 610 621 +11
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mstechly. I think all these changes are desirable if they make it easier for other people to use the package. For the __init__.py
thing, I think that since all our sources are in the src
directory, everything that is not a package will be out of it, which sounds to me like we don't init files at all levels.
@alexnguyenn might have more insight than I do into packaging though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. I agree that these changes are desirable.
- For
namespace_packages=true
, I don't think we are using any namespace packages atm, but I am ok with having it there just in case (as long as there is no conflict). - It will be great if you could put some comments in as well.
@alexnguyenn I have added some comments and removed some of the options after consideration. It should work fine and I guess it's better to add them when we need them, rather than get into trouble because of having them and not understanding all the consequences. |
Imagine some other projects wants to use
lsqecc
. They can use it, but unfortunately the won't be able to run mypy against any imports fromlsqecc
, unless package is PEP 561 compliant.This PR adds the components necessary to make it works.
It also solves a couple of other issues:
setup.cfg
, when I was buildinglsqecc
locally and trying to install with wheel, I noticed that the package is empty. Changing topackages = find:
insetup.cfg
solved this issue.zip_safe=False
, as it's known to interfere with editable installations (see herenamespace_packages=true
– this will allow to avoid__init__.py
at all the levels. I'm not sure if this change is actually desirable, please let me know.explicit_package_bases=true
allows to avoid some issues with mypy configuration in the future.If you want I can add inline comments to those config files explaining the reason behind them.