Fixes #935 - Ensure installed package contents are correct#943
Conversation
saroad2
left a comment
There was a problem hiding this comment.
An important PR. It is good that you move all the content in setup.py to setup.cfg.
I recommend, since you already touch all of this code, to use bump2version in order handle version throughout the code.
If you would like, it can be handed in a different PR.
| max-line-length = 119 | ||
| ignore = E121,E123,E126,E226,E24,E704,W503,W504,C901 | ||
|
|
||
| [isort] |
There was a problem hiding this comment.
Do not use isort until it gets to version 5.0.0. It has some major issues that needs to be fixed until then, including consistent handling of 3rd parties libraries in virtual environments. Look at PyCQA/isort#1147
There was a problem hiding this comment.
That's an interesting bug, to be sure; but I'm not sure it's likely to affect us in practice. It seems to mostly affect packages with... dubiously names (like a top level "config") package.
In practical terms: I've been using isort in production for years without any problems. On top of that, in this particular instance, isort isn't actually hooked into CI. I added the configuration so that we get "black compatible" import styling. This lets us run isort, get imports that are sorted and formatted cleanly, and audit the results before commiting.
In truth, there's a couple of files (like the GTK and Winforms libs module) that we'll need to turn off isort, because they have very specific import ordering. So it's unlikely we're ever going to add isort to CI - the configuration is just here as a convenience.
There was a problem hiding this comment.
Perhaps this merits adding a comment next to the [isort] configuration, so that people can quickly get up-to-speed on how we use isort in this project.
There was a problem hiding this comment.
I had a lot of problems with that in Eddington. I still hold to my suggestion.
|
I left some comments; they're not showstoppers; feel free to ignore or handle at your leisure. |
Modifies the packaging of toga to ensure that test directories are not installed.
The underlying problem was that the
include_package_datadirective results in the use ofMANIFEST.inbeing used as the source of truth for package data, rather than thepackage_datadirective.However this is as good a time as any to do some housecleaning around our package configurations, so this PR:
setup.cfgformats (except for the handful of directives - version and test related) that must remain computed.flake8across the entire codebase; however, this isn't currently included in CI. My intention is to use a subsequent PR to clean up the flake8 problems with the existing codebase, and then enable the tox flake8 test and deprecate beefore.togasource distribution to contain a full copy of the examples and source.PR Checklist: