Closed benhammondmusic closed 4 months ago
I am receiving some TypeScript errors but they don't always appear in VSCode. I'm going to push my code and hopefully, the errors won't persist. I may not know enough about TypeScript yet to be able to double-check myself
Looks like some of the merge tests failed. I'll try to go through the TS errors and learn as I go
Usually VSCode only runs its type checking stuff against the open files; however some changes are definitely rippling down and affecting other files that you haven't opened in VSCode. for this type of stuff where the PR (CI) tests are failing, the best is to try to figure out exactly what was running on CI to cause the failure and then replicate that. So here for instance, if you look at the failed step on the github action it was running the "build" command, which in turn was running the type checker tsc
.
We should probably add a tsc
check to our pre-commit step; I think we used to have it and I forgot to put it back in when I redid everything. but for now, you can either manually run tsc
on your CLI in frontend/ and it should generate all these same errors, or usually I just look at which files are causing issues on the error log, and open them in VSCode, and then vscode will highlight the errors
Setting Up a New Data Provider
[YourDatasetName]Provider.ts
in thefrontend/data/providers/
directory.{condition}_per_100k
and{condition}_estimated_total
getDataSetId
: Determines the correct dataset ID based on the provided breakdowns. The returnedDatasetId
will be the same as the BigQuerydata_source
+-
+ BigQuerytable_name
: e.g.cdc_hiv_data-sex_state_current
getDataInternal
: Fetches and processes the data according to the metric query, applying filters and returning a MetricQueryResponse.allowsBreakdowns
: Checks if the requested demographic breakdowns are supported by this provider.VariableProviderMap.ts