Skip to content

Round model outputs to 4 decimal places - #12

Closed
david-mears-2 wants to merge 119 commits into
mainfrom
copilot/poc-with-tests-again
Closed

david-mears-2 wants to merge 119 commits into
mainfrom
copilot/poc-with-tests-again

Conversation

@david-mears-2

Copy link
Copy Markdown
Contributor
  • Add script to generate example model output parquet files
  • Add metadata for model outputs
  • Rename column variant_string to variant to match survey data parquet
  • wip wip wip wip
  • Make versions soft-coded in metadata endpoint
  • Make prevalences parquets include all ancestor region ids, not just region id of most granular level
  • Implement prevalences endpoint
  • Update example model outputs generator to (1) go back to 1970 more often and (2) not run out of memory when running
  • Add instrumentation for timing requests
  • Fix survey data requests scoped by admin0
  • Response optimizations: columnar format and round high-precision floats
  • Rows for survey data, columns for prevalences
  • Fix keys/names of rounded columns
  • Extract grout region metadata fetch into a startup script
  • Extract some consts/types
  • Extract some validators
  • Extract DuckDB connection
  • Extract querying logic
  • Refactor querying logic
  • Move error handler call to correct place
  • Finish implementing query param validators and refactor them
  • Tidy comments; extract todos into youtrack tickets
  • Reword variable names
  • Make node types package match canonical node version
  • Apply tsconfig to scripts ts files too
  • Tests - iteration 0
  • Tests - iteration 1 (refactor fixture generation)
  • Remove fixture validation
  • Rename GHA workflow
  • Small refactors
  • Start to type column names; simplify validator test mock
  • Alphabetise column types and add unrequestable columns
  • Give up having a subset of columns be requestable
  • Lots of rewriting tests; remove admin0 format validation
  • Make exmaple model outputs generation script a bit more clear
  • Remove request timing logger
  • Update README.md
  • Fix lint command
  • Remove tests
  • Refactor: make validation-wrapper funcs for two endpoints
  • fix f74509c
  • Remove some gubbins
  • Use DuckDB in READ_ONLY mode
  • Add script to generate example model output parquet files
  • Add metadata for model outputs
  • Rename column variant_string to variant to match survey data parquet
  • wip wip wip wip
  • Make versions soft-coded in metadata endpoint
  • Make prevalences parquets include all ancestor region ids, not just region id of most granular level
  • Implement prevalences endpoint
  • Update example model outputs generator to (1) go back to 1970 more often and (2) not run out of memory when running
  • Add instrumentation for timing requests
  • Fix survey data requests scoped by admin0
  • Response optimizations: columnar format and round high-precision floats
  • Rows for survey data, columns for prevalences
  • Fix keys/names of rounded columns
  • Extract grout region metadata fetch into a startup script
  • Extract some consts/types
  • Extract some validators
  • Extract DuckDB connection
  • Extract querying logic
  • Refactor querying logic
  • Move error handler call to correct place
  • Finish implementing query param validators and refactor them
  • Tidy comments; extract todos into youtrack tickets
  • Reword variable names
  • Make node types package match canonical node version
  • Apply tsconfig to scripts ts files too
  • Tests - iteration 0
  • Tests - iteration 1 (refactor fixture generation)
  • Remove fixture validation
  • Rename GHA workflow
  • Small refactors
  • Start to type column names; simplify validator test mock
  • Alphabetise column types and add unrequestable columns
  • Give up having a subset of columns be requestable
  • Lots of rewriting tests; remove admin0 format validation
  • Make exmaple model outputs generation script a bit more clear
  • Remove request timing logger
  • Update README.md
  • Fix lint command
  • Remove tests
  • Refactor: make validation-wrapper funcs for two endpoints
  • fix f74509c
  • Remove some gubbins
  • Use DuckDB in READ_ONLY mode
  • Don't lint non-existent file
  • Don't lint non-existent file
  • Remove tests
  • Revert "Remove tests"
  • Update tests for validator changes and filename changes
  • Extract properties from query params only once
  • Improve date validation for query parameters
  • Fix grammatical error in README.md
  • Fix endpointConfigs file path in README
  • jsonc in README
  • Update main entry point to dist/server.js
  • Linting/typing
  • Remove tests
  • Revert "Remove tests"
  • Update tests for validator changes and filename changes
  • Update tests
  • Use more toStrictEqual
  • Add expect.closeTo
  • Update GHA versions
  • Update README.md
  • Add coverage
  • Add coverage thresholds
  • Lower coverage threshold
  • Remove deprecated prevalence columns
  • Remove obsolete STAVE dependency
  • Update README.md
  • Commit missing .env.example
  • Round generated model output values
  • Update rounded fixtures and docs

scripts/create_example_model_outputs.R writes three parquet files at
data/model/2026.05.08/ (one per admin level 0–2) with real GADM region
IDs for sub-Saharan Africa fetched from the grout endpoint, variant
strings selected (by non-committed code) from WHO target markers, ene/mutation
columns derived via variantstring, gapless monthly time series per variant
(biased to later years), summary/exceedance value columns, and data support
columns (no_of_informing_surveys, nearest_survey_by_time) using real survey
IDs from stave_data.rds.
…ten and (2) not run out of memory when running
david-mears-2 and others added 29 commits September 3, 2026 16:28
Don't validate a different thing than what is interpolated into SQL
Exclude non-date values like 2020-99-99

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This reverts commit 30505c1.
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.com>
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.com>
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.com>
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.com>
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.

2 participants