-
Notifications
You must be signed in to change notification settings - Fork 295
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
Improve Inheriting Workplane Fluent Methods #677
Improve Inheriting Workplane Fluent Methods #677
Conversation
* Updated `Workplane.workplane()`, `Workplane.copyWorkplane()`, `Workplane.newObject()` to return instances of a type that's based on the input parameters (such as `self`). * Updated type hints to reflect that return types of fluent methods depend on the type of method arguments. * Added a unit test to verify fluent methods in a derived class return instances of the derived class.
Codecov Report
@@ Coverage Diff @@
## master #677 +/- ##
==========================================
+ Coverage 94.19% 94.28% +0.08%
==========================================
Files 31 31
Lines 6689 6752 +63
Branches 725 727 +2
==========================================
+ Hits 6301 6366 +65
+ Misses 253 252 -1
+ Partials 135 134 -1
Continue to review full report at Codecov.
|
* Fixed type hints in `sweep()` and `_selectObjects()`.
* Ran `black` on `test_cadquery.py`.
AppVeyor is failing a single test on 3.6,
That test passes in all other CI envs, including Win 3.6 on Azure. @adam-urbanczyk this looks super weird, you might want to re-run that test? I don't have the permissions. Although honestly, if it goes away after re-running that's going to be just as confusing. It's not like it's a network error... |
Hm. Yeah, these tests pass for me with Python 3.6.13 and 3.9.2 on Windows. It would be useful if someone is able to reproduce this error. I can also push a whitespace change to force a re-run of the appveyor job. Or, is there a way to re-run it manually? |
@adam-urbanczyk should have the permissions to re-run it manually, but he's busy at the moment. so feel free to do the whitespace change. Here is a (hopefully semi-permanent) link to the failing job for posterity: https://ci.appveyor.com/project/adam-urbanczyk/cadquery-icqj5/builds/38091458/job/k9pg21fnvqup9be5 |
If all fails, you can always close an reopen to trigger CI |
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.
One change request, otherwise looks good!
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.
I think once the requested change is done this will be ready to merge. Thanks @pavpen !
* Renamed `WorkplaneT` to `T` in `cq.py`.
* Re-formatted `cq.py` with `black`.
* Re-formatted `cq.py` with `black` 19.10b0.
Thanks @pavpen ! |
Thanks for the help! If you can figure out the differences between execution environments, it could help track the causes of the flaky unit tests. |
Workplane.workplane()
,Workplane.copyWorkplane()
,Workplane.newObject()
to return instances of a type that's based on the input parameters (such asself
).This is a pull request for issue #673.