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

Minimize and proof SciJava Ops API & SPI #90

Merged
merged 23 commits into from
Oct 10, 2023

Conversation

gselzer
Copy link
Member

@gselzer gselzer commented Aug 28, 2023

This PR reduces the footprint of the SciJava Ops API, moving implementation-specific classes to other components (mostly to SciJava Ops Engine) - this reduces the burden of maintaining our exposed API.

To enable testing API functionality, I've created a module scijava-ops-test, which allows runtime access to DefaultOpEnvironment, but only a compile-time dependency on scijava-ops-api. This module will prove that the API is powerful enough to access all functionality housed in the incubator.

To ensure that the SPI is suitable, I've tried to remove the engine dependency from ImageJ Ops2 - unfortunately, it still requires an API dependency, although maybe we can fix this later!

TODO:

  • Clean up scijava-ops-test - do we really need a separate module? We might want to consider making this an integration test package in the engine...
  • Determine why we needed to open the net.imagej.ops2 module to get the tests to pass... is this something that rebasing over Scijava/scijava javadoc parser/javadoc to yaml #79 might fix?
  • net.imagej.ops2.OpRegressionTest reports finding 2 fewer Ops - did we actually remove some Ops?
  • Can we remove the org.scijava.ops.api dependency from imagej ops2? It looks like only the map Ops use it to avoid recording the history of dependencies - relevant topics may include Initialize SciJava Concurrent module #33, Scijava/scijava ops engine/skip map history #64 - EDIT: No, we can't, right now, without removing functionality. Skipping this...
  • Rename DefaultMatchingErrorTest to OpMatchingExceptionTest

Closes scijava/scijava#73

@gselzer gselzer requested a review from hinerm August 28, 2023 17:23
@gselzer gselzer self-assigned this Aug 28, 2023
@gselzer
Copy link
Member Author

gselzer commented Aug 28, 2023

Determine why we needed to open the net.imagej.ops2 module to get the tests to pass... is this something that rebasing over

To add some context, here's what happens - in the tests, we use therapi to discover OpInfos from imagej ops2, and the therapi javadoc parser calls loader.getResourcesAsStream("/" + resourceName), where resourceName is a __Javadoc.json file and loader is a class within the imagej.ops2 module. For some reason, this does a Module.opens check, ensuring that net.imagej.ops2 is open to the unnamed module - I have no idea why we'd need this - would be worth checking whether this same check was made before...

@gselzer
Copy link
Member Author

gselzer commented Sep 26, 2023

TODO: Make changes described in this comment

@gselzer gselzer force-pushed the scijava/scijava-ops-api/migrate-features-to-engine branch 4 times, most recently from 4deeb83 to af70fa1 Compare October 5, 2023 16:05
@gselzer gselzer linked an issue Oct 5, 2023 that may be closed by this pull request
@gselzer gselzer marked this pull request as ready for review October 9, 2023 18:10
@gselzer gselzer force-pushed the scijava/scijava-ops-api/migrate-features-to-engine branch 7 times, most recently from fdd597d to 9c507a0 Compare October 10, 2023 16:43
I added some new API that might make skipping logging history nicer. But
we should replace the hint, if we like it
More accurate description of what the object is
Was tired of seeing warnings, so I got rid of (a lot) of them
@gselzer gselzer force-pushed the scijava/scijava-ops-api/migrate-features-to-engine branch from 9c507a0 to b3599a3 Compare October 10, 2023 16:54
@gselzer gselzer force-pushed the scijava/scijava-ops-api/migrate-features-to-engine branch from 390e596 to 436fa5a Compare October 10, 2023 18:56
@gselzer gselzer merged commit dd16e9a into main Oct 10, 2023
1 check passed
@gselzer gselzer deleted the scijava/scijava-ops-api/migrate-features-to-engine branch October 10, 2023 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Finalize naming of ops-related core classes Consider separating SciJava Ops API into two (or more) modules
1 participant