This package contains scripts which query external data sources in order to enrich our core community-generated content. In order to run the scripts, the following environment variables must be set:
- All:
AIRTABLE_API_KEY,AIRTABLE_BASE_ID - Crunchbase:
CRUNCHBASE_API_KEY - Geo: no additional variables needed
See .env.sample for more information
First, make sure you are in the enrich folder (not the repo root).
$ cd enrichInstall the necessary dependencies.
$ npm installIf all the ENV variables are provided, you can run all the enrichment scripts in one fell swoop.
$ npm run enrichOtherwise, you can run each individually
$ npm run enrich-crunchbase
$ npm run enrich-geoThere are tests associated with each of the enrichment scripts, which can be run like so.
$ npm testBefore pushing your work, it's a good idea to run the linter, which will fail the CI if anything is out of spec.
$ npm run lintfix