Fix: Adding Pace and PySHiELD unit tests back in to workflow#66
Conversation
Pace and PySHiELD unit testsPace and PySHiELD unit tests back in to workflow
romanc
left a comment
There was a problem hiding this comment.
Good to see the test harness working again.
I think adding an exception for "F401" (no unused imports) in the flake8 config shouldn't be and we should find a way to only allow unused imports in __init__.py files (as previously). If that takes longer than expected, feel free to break out re-enabling the pace / pyshield tests (which are independent of the pyproject.toml changes.
|
|
||
| [tool.flake8] | ||
| exclude = ["docs"] | ||
| extend-ignore = ["W503", "E302", "E203", "F841", "F401"] |
There was a problem hiding this comment.
This adds the exception for F401 (no unused imports) to all files (not just __init__.py files as before). I think it would be good if we pruned unused imports in all files other than __init__.py (which can have convenience imports/exports).
There was a problem hiding this comment.
In the __init__.py you can do
import .moduleA
import .moduleB
__all__ = ["moduleA", "moduleB"]There was a problem hiding this comment.
Yes, this is why the F401 exception should be there for __init__.py files. I'm arguing it should only be there for __init__.py files (and not for any other python files).
There was a problem hiding this comment.
But if you do the __all__, which is the spec, I don't think you need the F401 at all (I could be wrong)
There was a problem hiding this comment.
Ah okay, today I learned ... Good to know!
…__.py in pyproject.toml
romanc
left a comment
There was a problem hiding this comment.
Some small things we learned from the NDSL repo recently.
romanc
left a comment
There was a problem hiding this comment.
If everybody agrees that we should merge now, we can also do the above in a follow-up.
romanc
left a comment
There was a problem hiding this comment.
Seems like I need to formally approve to make a follow-up possible, so here we go.
I will make these changes in this PR as I think they are also relevant to this one and dismiss stale reviews |
f2e050f
Description
This PR reintroduces the Pace and PySHiELD unit tests to the workflow. It also removes
setup.cfgin favor of specifying its contents withinpyproject.tomlFixes # (issue)
If this is a hotfix to a released version, please specify it
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note
any relevant details for your test configuration (e.g. compiler, OS). Include
enough information so someone can reproduce your tests.
Checklist: