-
Notifications
You must be signed in to change notification settings - Fork 25
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
Accept a Python range when setting scoping IDs. #2001
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2001 +/- ##
==========================================
- Coverage 88.40% 88.38% -0.02%
==========================================
Files 89 89
Lines 10252 10261 +9
==========================================
+ Hits 9063 9069 +6
- Misses 1189 1192 +3 |
@PProfizi I see post ci failing, do we need a PR there to support something related to the server? Otherwise, this LGTM! |
Ah, indeed, @rafacanton the scoping factory for named selections has a |
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.
A couple of minor points.
Co-authored-by: JennaPaikowsky <[email protected]>
…ated PR to properly use the server argument.
Hi @JennaPaikowsky, the PR for the field inspired me to do this for the
Scoping
class as I noticed we were doinglist(range(*))
in the docstring examples for theField
when defining aScoping
.This PR mainly adds the support for a range as input when setting the IDs of a scoping.
It also adds type hinting and improves the docstrings a bit. I'll also add some docstring examples and testing.
I'll actually add the
AnyServerType
type for type hint in a dedicated PR if @moe-ad and @jorgepiloto confirm this is the correct way to provide a combination of allowed types for type hints in the rest of the library. See #2002@jorgepiloto @moe-ad one thing I would like our opinion on is the type hint for pointers and Grpc messages as I think it will not work as-is. Edit: it looks like it does! Even though the IDE is complaining that
ansys.grpc.dpf.scoping_pb2.Scoping
does not exist.