{"id":23442301,"url":"https://github.com/repronim/hbcd-loris2reproschema","last_synced_at":"2026-03-20T01:25:35.798Z","repository":{"id":255243756,"uuid":"848981902","full_name":"ReproNim/hbcd-loris2reproschema","owner":"ReproNim","description":"HBCD LORIS format to ReproSchema format","archived":false,"fork":false,"pushed_at":"2026-01-19T06:05:33.000Z","size":13070,"stargazers_count":0,"open_issues_count":25,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-19T10:01:26.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://legacy.repronim.org/hbcd-loris2reproschema/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReproNim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-28T18:58:33.000Z","updated_at":"2026-01-19T00:04:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4228f32-a064-433d-a69a-a950004f1e92","html_url":"https://github.com/ReproNim/hbcd-loris2reproschema","commit_stats":null,"previous_names":["repronim/hbcd-loris2reproschema"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ReproNim/hbcd-loris2reproschema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReproNim%2Fhbcd-loris2reproschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReproNim%2Fhbcd-loris2reproschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReproNim%2Fhbcd-loris2reproschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReproNim%2Fhbcd-loris2reproschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReproNim","download_url":"https://codeload.github.com/ReproNim/hbcd-loris2reproschema/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReproNim%2Fhbcd-loris2reproschema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28632771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-23T17:29:20.018Z","updated_at":"2026-01-21T11:33:21.601Z","avatar_url":"https://github.com/ReproNim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hbcd-loris2reproschema\n\nConvert HBCD (HEALthy Brain and Child Development) LORIS data dictionaries to ReproSchema with an automated, change‑gated GitHub Actions pipeline.\n\n## What This Repo Does\n- Converts LORIS CSVs into a three‑layer ReproSchema structure (Protocol → Activities → Items).\n- Detects significant changes between CSV versions and only converts when thresholds are met.\n- Validates generated schemas and publishes tagged releases after PRs are merged.\n\n## Recommended: Online Workflow (GitHub Actions)\n1. Configure secrets: add `HBCD_USERNAME` and `HBCD_PASSWORD` (Repository → Settings → Secrets and variables → Actions).\n2. Run “Retrieve HBCD Data Dictionary” (manual or scheduled weekly). It:\n   - Downloads latest CSV → compares with previous → decides if conversion is needed.\n   - If significant: commits the CSV and dispatches “Automated LORIS to ReproSchema Update”.\n3. Automated Update creates a PR with generated schemas, logs, and a report.\n4. Merge the PR. After merge, a tag `vYYYY.MM.DD(.N)` is created and a GitHub Release is published.\n\n## Optional: Local Use (Developers)\n```bash\n# Env (Python 3.10)\nmicromamba create -n hbcd python=3.10\nmicromamba activate hbcd\nmicromamba install -c conda-forge requests pandas pyyaml beautifulsoup4\npip install reproschema pre-commit\n\n# Convert + validate\npython scripts/loris2reproschema.py \\\n  --csv_file loris_data_dictionaries/hbcd_data_dictionary_YYYY-MM-DD.csv \\\n  --config_file config/conversion.yml \\\n  --output_path reproschema_output\nreproschema validate reproschema_output/HBCD_LORIS/HBCD_LORIS_schema\n```\n\n## Repository Structure\n```\nconfig/                 # YAML configs (conversion, thresholds, pipeline)\nreproschema_output/     # Generated protocol + activities\nloris_data_dictionaries/# Downloaded LORIS CSVs\nscripts/                # Conversion + automation tools\n.github/workflows/      # CI workflows (retrieve, automated update)\nlogs/, reports/, docs/  # Artifacts, summaries, and comparison data\n```\n\n## Configuration\n- `config/conversion.yml`: column mappings, type overrides, and protocol settings.\n- `config/change_detection.yml`: thresholds and column rules (aligned to CSV headers).\n- `config/pipeline.yml`: output paths, validation options, and comparison settings.\n\n## CI Overview\n- Orchestrator: `./.github/workflows/automated_update.yml` delegates to two reusable workflows.\n  - `reusable-update.yml`: checks out code, runs conversion + validation, opens an auto PR if changes exist, and posts a one‑line schema diff summary (main → HEAD). Attaches `pr-schema-diff` JSON as an artifact.\n  - Release on merge: `release_on_auto_pr_merge.yml` triggers when the auto-update PR is merged, then tags (`vYYYY.MM.DD(.N)`), creates a GitHub Release, and publishes comparison JSON for recent tags into `docs/data/`.\n- Composite actions: live under `./.github/actions/` for easy reuse.\n  - `setup-python-deps`: sets up Python 3.10 and installs pinned deps.\n  - `pr-schema-diff`: generates a JSON diff and emits a concise summary for PRs.\n  - `publish-comparisons`: generates/commits website comparison data on main.\n- On‑demand comparisons: run any pair without regenerating everything.\n  - Action: “Generate On‑Demand Comparison” (workflow_dispatch). Inputs: `from_ref`, `to_ref`, `publish` (false by default).\n    - Always uploads the JSON as an artifact; when `publish=true`, it commits `docs/data/\u003cfrom\u003e_to_\u003cto\u003e.json` so the website can show it.\n  - CLI example: `gh workflow run compare_on_demand.yml -f from_ref=v2025.09.15 -f to_ref=v2025.10.05 -f publish=true --ref main`.\n- Diff website: `docs/index.html` lists tag versions dynamically and includes an On‑Demand panel.\n  - Versions are tags only, loaded from `docs/data/index.json` (published on main) with a GitHub API fallback.\n  - Enter refs to preview a published pair; if not found, run the on‑demand Action with `publish=true` to publish `docs/data/\u003cfrom\u003e_to_\u003cto\u003e.json`.\n\n## Development \u0026 Quality\n- Pre-commit: `pre-commit install \u0026\u0026 pre-commit run --all-files` (Black, YAML/JSON checks, optional validation hook).\n- Validate schemas: `reproschema validate reproschema_output/HBCD_LORIS/HBCD_LORIS_schema`.\n- Data quality checks (non-failing): `python scripts/check_data_quality.py`.\n\n## Notes\n- Tags/releases are created only after the auto PR is merged.\n- Comparisons are generated as artifacts; they do not block CI.\n\n## License\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepronim%2Fhbcd-loris2reproschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frepronim%2Fhbcd-loris2reproschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepronim%2Fhbcd-loris2reproschema/lists"}