Skip to content

Add min/max validation limits for numeric design questions (#33) - #164

Open
reyyishreyas wants to merge 2 commits into
INCF:mainfrom
reyyishreyas:main
Open

reyyishreyas wants to merge 2 commits into
INCF:mainfrom
reyyishreyas:main

Conversation

@reyyishreyas

Copy link
Copy Markdown

Summary

Closes #33 and partially addresses #100.

Issue #33 — min/max limits for numeric questions

Numeric design questions (sample size, number of trials, groups, factors, etc.) previously had no bounds in the schema. This PR pipes min_value / max_value from the Google spreadsheet through the converter and into the generated JSON-LD responseOptions.minValue.

Changes:

  • inputs/tsv/design_sample.tsv: added min_value / max_value columns and filled values for the 9 numeric design_sample items
  • convert_table/src/convert.py: TSV header now includes the new columns
  • convert_table/src/utils.py: new convert_to_optional_int() helper + reading/printing of the columns with NaN/blank handling
  • 9 JSON-LD item files under schemas/artemis/activities/design_and_sample/items/: minValue set (1 for counts, 0 for factors)
  • outputs/artemis.tsv: regenerated with the new columns

Issue #100 — document spreadsheet backup

  • README.md: added a "Backup of the Google Spreadsheet" section explaining that inputs/tsv/*.tsv are committed snapshots produced by make download and consumed by convert_table/src/convert.py into outputs/artemis.tsv.

Validation

Ran make validate locally (fork PRs skip the CI because validate.yml only runs on the upstream repo):

  • pre-commit run -a check-json → Passed
  • reproschema validate schemas/artemis/activities → conforms
  • reproschema validate schemas/artemis/protocols → conforms
  • reproschema validate schemas/artemis/artemis_schema.jsonld → conforms

Maintainer action needed

The live Google Spreadsheet does not contain min_value / max_value columns yet. Please add them, otherwise the next make download will overwrite inputs/tsv/design_sample.tsv and drop the limits.

Carry min_value and max_value from the Google spreadsheet through the
converter into the generated JSON-LD schema items, so numeric responses
(e.g. sample size, number of trials/groups/factors) encode their bounds.

Also document in the README that the files under inputs/tsv are the
versioned backup of the spreadsheet (INCF#100).
The original run for this pull request scheduled no jobs and its logs
have expired, and re-running on GitHub needs admin rights I do not have
on this repository. `make validate` passes on this exact commit locally:
check-json passes and all three reproschema validates report conforms.

A no-op commit, made only to start a fresh workflow run.
@reyyishreyas

Copy link
Copy Markdown
Author

The validate jsonld run for this PR is sitting in action_required, so it needs someone with write access to click Approve and run.

For the record, the earlier red run was not a code failure. It scheduled no jobs at all:

{"total_count": 0, "jobs": []}

There are no logs for it because nothing ever executed. The approval request then went unactioned for exactly 30 days — started 2026-09-20T07:54:04Z, recorded as failed 2026-10-20T07:56:48Z — and GitHub expired it, which is written up as failure. That is the whole reason for the red X, rather than anything in the diff.

I pushed an empty commit purely to start a fresh run. It now reports action_required instead of failure, which is the accurate state: waiting on approval, not failing.

The content passes the check on that commit. I ran CI's exact command locally:

$ make validate
check json...............................................................Passed
schemas/artemis/activities conforms.       Validation successful
schemas/artemis/protocols conforms.        Validation successful
schemas/artemis/artemis_schema.jsonld conforms.  Validation successful

So no change to the PR's files is needed — this only needs the workflow approved.

One observation, offered without having confirmed it: validate carries if: github.repository_owner == 'INCF', and both runs for this PR created zero jobs. That condition may be why fork PRs never schedule a job, though I could not verify it from outside the repository.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a new column for simple numerical limits within one question

1 participant