-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Deprecate Path helpers in bezier.py #14199
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
Conversation
931adba
to
16b56dd
Compare
This sounds like a dangerous change of semantics when using the proposed alternatives. |
The thing with STOP would be a separate PR anyways, I'm just noting it here because I realized its nonobvious semantics in this PR. |
This needs a rebase and it is not immediately clear that not calling |
6fc5d56
to
acf2b61
Compare
rebased |
f4dafd9
to
800fedc
Compare
A couple thoughts
Had I been more confident that rocking the waters with my own opinions on naming was okay, I would have proposed renaming My opinion is that the proposed replacement ( |
800fedc
to
9616c3b
Compare
I clarified the deprecation note for make_path_regular to note that one may want to remove the final STOP. |
Fair, I should have phrased this better. What I meant was something like, "as long as you guys agree that losing this functionality would hurt the users by taking away some use case I haven't thought of". None of the use cases I was thinking of involve less than one stroke, it makes sense to |
In related news, since you've also noticed this last_vert, last_code = vertices[-1], codes[-1]
vertices = vertices[codes != self.STOP]
codes = codes[codes != self.STOP]
if last_code == self.STOP:
vertices = np.append(vertices, last_vert)
codes = np.append(codes, last_code) to prevent internal |
I think we should just deprecate STOPs, unless there's a good reason to keep them (which I can't think of...). |
I agree that STOP should be deprecated....but that seems out of scope of this PR, and until such day as it's actually done, it seems like |
Do you want to PR that? |
Sure! |
... in favor of the corresponding ones in path.py. (Strictly speaking, `make_path_regular` is closed to `cleaned(remove_nans=False)` but in practice `cleaned()` works equally well.)
9616c3b
to
090cc96
Compare
... in favor of the corresponding ones in path.py.
(Strictly speaking,
make_path_regular
is closer tocleaned(remove_nans=False)
but in practicecleaned()
works equallywell.)
Note that we may want to deprecate the STOP code, which is documented as "not required and ignored" but actually causes the rest of the path to be dropped silently; it gets appended by
cleaned()
and caused an earlier version of this PR to break (because the STOP would then cause the rest of the concatenated path to be dropped).PR Summary
PR Checklist