Title: Improve mechanism for documenting ops · Issue #50 · scijava/scijava · GitHub
Open Graph Title: Improve mechanism for documenting ops · Issue #50 · scijava/scijava
X Title: Improve mechanism for documenting ops · Issue #50 · scijava/scijava
Description: It is crucial that we have a robust, simple, and integrated mechanism for documenting ops. Documenting specific implementations Our current plan/idea is to use javadoc on the method/field/class implementing it. (It makes most sense for c...
Open Graph Description: It is crucial that we have a robust, simple, and integrated mechanism for documenting ops. Documenting specific implementations Our current plan/idea is to use javadoc on the method/field/class imp...
X Description: It is crucial that we have a robust, simple, and integrated mechanism for documenting ops. Documenting specific implementations Our current plan/idea is to use javadoc on the method/field/class imp...
Opengraph URL: https://github.com/scijava/scijava/issues/50
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve mechanism for documenting ops","articleBody":"It is crucial that we have a robust, simple, and integrated mechanism for documenting ops.\r\n\r\n### Documenting specific implementations\r\n\r\nOur current plan/idea is to use javadoc on the method/field/class implementing it. (It makes most sense for classes and methods; we'll need to think carefully about the best way to document parameters of lambdas assigned to fields.) The main challenge for this is that javadoc is not retained in bytecode. Possible solutions:\r\n* An annotation processor that executes as compilation time to scrape the javadoc and record it into some metadata inside the main JAR file—e.g. [therapi-runtime-javadoc](https://github.com/dnault/therapi-runtime-javadoc)\r\n* Scraping the `-javadoc` classifier JAR on demand for the content. But then we'd need to download these from the remote on demand and cache them somewhere and parse it. But this could create a substantial delay the first time `help` is called, or upon the first op lookup failure.\r\n\r\n### Algorithms as a whole\r\n\r\nWe also need to document algorithms as a whole—e.g. what does `filter.sobel` do mathematically? (Thanks @marktsuchida for suggesting this.) Each `filter.sobel` op implementation can then lead with a link to the general algorithm documentation for overview, and then focus on any implementation-specific notes as needed.\r\n\r\nI don't currently have a great idea where this general documentation would be placed, technically. If we do go with javadoc for documenting implementations, we would need another class somewhere per op name, which seems suboptimal. Maybe `package-info.java` in packages?\r\n\r\n### Possible syntax\r\n\r\nSyntax for getting help on a specific algorithm could be:\r\n```\r\nops.op(\"math.add\").inputs(in1, in2).outputs(out).help()\r\n```\r\n\r\nSyntax for accessing the general documentation could be:\r\n```\r\nops.help(\"math.add\")\r\n```\r\nor:\r\n```\r\nops.op(\"math.add\").help()\r\n```\r\n\r\n\r\nas well as algorithms as a whole (thanks @marktsuchida for suggesting.\r\n","author":{"url":"https://github.com/ctrueden","@type":"Person","name":"ctrueden"},"datePublished":"2020-08-26T19:14:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/50/scijava/issues/50"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c5415e8b-7b54-a611-9262-40b462414800 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD88:2BBCB0:2B8F148:3954717:696B2F58 |
| html-safe-nonce | 7b764981c5f2eb1f3d771259e3750642ddc7870619851f3c07e89ed3c58c84c6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDg4OjJCQkNCMDoyQjhGMTQ4OjM5NTQ3MTc6Njk2QjJGNTgiLCJ2aXNpdG9yX2lkIjoiNTM3NjExNTY4NTQ5NjQwMTc1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8868c9fff390ff90c3448efba42071c4aed16f0656b7c512fa3e1f090ad49b7f |
| hovercard-subject-tag | issue:686555725 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/scijava/scijava/50/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a5037c9694e9af13d892eca9f9ef1d507e99cfb7b49c61b627e02a2d3277e1ca/scijava/scijava/issues/50 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a5037c9694e9af13d892eca9f9ef1d507e99cfb7b49c61b627e02a2d3277e1ca/scijava/scijava/issues/50 |
| og:image:alt | It is crucial that we have a robust, simple, and integrated mechanism for documenting ops. Documenting specific implementations Our current plan/idea is to use javadoc on the method/field/class imp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ctrueden |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/scijava/scijava git https://github.com/scijava/scijava.git |
| octolytics-dimension-user_id | 1262770 |
| octolytics-dimension-user_login | scijava |
| octolytics-dimension-repository_id | 85618439 |
| octolytics-dimension-repository_nwo | scijava/scijava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 85618439 |
| octolytics-dimension-repository_network_root_nwo | scijava/scijava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width