Skip to content
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

Various OpListing Improvements #647

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

gselzer
Copy link
Contributor

@gselzer gselzer commented Sep 16, 2022

This PR was originally designed to address #645, but breaks from the plan addressed in that PR a bit.

This PR does include the OpListing refactoring described in that issue, which is part of what we need for imagej/napari-imagej#96 (we'll need a release of imagej-ops, plus a PR in that repository to actually address the issue). Specifically, I wrote the private class OpListing.Parameter to keep track of all the needed state. This class also makes it significantly easier to make improvements to the stringification of each parameter.

The other improvement made by this PR is the re-inclusion of all parameter names. Previously, we were leaving out any names conforming to either "out" or "inX", because I thought they were redundant. It turns out that this got confusing, so I added them back. I actually tried making a bunch of different modifications to the OpListing strings (see this zulip thread), but for now I'm going to leave them out, and add them in later if people need (thanks for the suggestion @hinerm)

I'm not sure this fully solves #645, as I did not include the additional OpListing filtering I talked about in that PR. But, if we do it, I'd rather address it in another PR as it is a separate issue.

@gselzer gselzer requested review from ctrueden and hinerm September 16, 2022 15:17
@gselzer gselzer self-assigned this Sep 16, 2022
@gselzer gselzer linked an issue Sep 16, 2022 that may be closed by this pull request
@gselzer gselzer force-pushed the 645-oplistings-ignore-preallocated-outputs branch 5 times, most recently from 77b4094 to 2b0f9a7 Compare September 16, 2022 15:54
@hinerm
Copy link
Member

hinerm commented Sep 16, 2022

@gselzer is this currently a draft PR?

@gselzer
Copy link
Contributor Author

gselzer commented Sep 16, 2022

@hinerm nope! Ready for review! I could see why you think it might be, though, given the commit name...

EDIT: I fixed the commit name and description to make it clearer that I am ready for review

Specifically, we do two things in one commit, which is best practice.

* Refactor Input name and type lists and output name and type lists into
one parameter list. This allows use to maintain preallocated output
parameter data more easily
* Re-include parameter names when they are "out" or "inX". Leaving them
out before was confusing
@gselzer gselzer force-pushed the 645-oplistings-ignore-preallocated-outputs branch from 2b0f9a7 to f0d5a4a Compare September 16, 2022 18:29
@hinerm hinerm merged commit 1db6c2d into master Sep 16, 2022
@hinerm hinerm deleted the 645-oplistings-ignore-preallocated-outputs branch September 16, 2022 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants