Fix task README rendering, deprecate openproblems.docs - #42
Merged
Conversation
* Sort the api graph with kahn's algorithm seeded with all roots, instead of a bfs from a single root * Tasks with more than one raw dataset (e.g. task_predict_modality) no longer strand all but the first at the very end of the readme * A component is no longer documented before the files it consumes
* Stop filtering the arguments table down to `type: file`, which dropped `--seed` from the process_dataset spec entirely * Fall back to an argument's `description` when it has no `summary` -- only file arguments get a summary, through `__merge__` * Add a `--seed` to the example project to cover both
* Add `.deprecate_docs()`, which warns once per session per function * Deprecate all eight exported functions; the readme pipeline (`common/scripts/create_task_readme`) runs the python implementation, so `openproblems.project.docs` is the source of truth now * `render_json_schema_example()` has no python replacement -- say so * Note in the changelog that the two readme bugs fixed in python core v0.2.0 were not backported here
* styler 1.11.0 puts one argument per line at a single indent with the
closing `) {` on its own line, where the older styler used a hanging
double indent -- lintr 3.4.0 flags the latter with indentation_linter
* Pre-existing on main; the R workflow only triggers on `packages/r/**`,
so this pr is simply the first in a while to run it
…ring' of github.com:openproblems-bio/core into fix-task-readme-rendering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bugs in the README rendering, spotted while looking at task_predict_modality. Both are in the python package, which is what
common/scripts/create_task_readmeruns throughopenproblems/src/project/render_readme.Section order
read_task_metadata()picked a single root (in-degree 0) and did a bfs from it. Two consequences:task_predict_modalityhas two roots (file_common_dataset_mod1andfile_common_dataset_mod2), so only mod1 was reachable and Raw dataset mod2 ended up dead last, after Score -- plus a "Multiple root nodes" warning on every run.Now sorted with kahn's algorithm seeded with all roots, so nothing is documented before its inputs:
I ran this over all 21 task repos I have checked out locally: no cycles, no dropped nodes, and every one of them moved Metric after its input file. Three repos (
task_batch_integration,task_ist_preprocessing,task_workshop_example) error out on both old and new code, because of absolute__merge__paths in their own yamls -- unrelated.Missing
--seedrender_component_spec()filtered the arguments table down totype: file, which dropped--seedfrom the process_dataset spec entirely. It also only readsummary, which file arguments inherit through__merge__but plain ones don't have -- that's why the currently published README (generated by the older R code, which didn't filter) shows--seed | integer | NA.Both fixed, so
task_predict_modalitynow renders:Deprecating openproblems.docs
The R package has both bugs too, but nothing outside the package itself calls it -- I grepped
openproblems,common_resourcesandcore, and only the python module is wired intorender_readme. So rather than backporting, all eight exported functions now warn once per session and point atopenproblems.project.docs.render_json_schema_example()has no python counterpart, so it says that instead.