Skip to content

Accept datafiles for USDA's Food and Nutrition Service.

License

Notifications You must be signed in to change notification settings

isabella232/usda-fns-ingest

 
 

Repository files navigation

usda-fns-ingestor

An experiment in ingesting data for the USDA's Food and Nutrition Service using ReVAL.

Use the webform to interactively upload files and see validation results, or the API to simply see the validation results.

Development

To start development, clone this repository:

git clone https://github.com/18F/usda-fns-ingest.git

You will need to install Python 3.6

Install development dependencies using Pipenv:

pipenv install --dev

This tool makes use of the ReVAL tool, if you also are developing that tool at the same time, you will need to have a local copy of it. You can then install and point to the local copy so the changes you make there will reflect on this tool immediately.

pipenv install -d -e <path to ReVAL>

Copy .env_sample to .env and update the variables according to cloud.gov env.

You can then activate the Python virtual environment:

pipenv shell

Deploying locally

You'll need to install PostgreSQL, then

createdb usda_fns_ingestor
cd usda_fns_ingestor
python manage.py runserver

You can use other PostgreSQL configurations (database name, user, require a password, etc); just export DATABASE_URL=<database url>. See dj-database-url

Then you can access the system at http://localhost:8000/data_ingest/

Deploying to cloud.gov

Once logged into a cloud.gov workspace, you can

cd usda_fns_ingestor
cf create-service aws-rds shared-psql usda-fns-ingestor-db
cf push

Other CloudFoundry platforms and Heroku should work similarly, though different plans may be available (see cf marketplace)

Contributing

See CONTRIBUTING for additional information.

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

About

Accept datafiles for USDA's Food and Nutrition Service.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.0%
  • Shell 2.0%