From 595cb4fb45c0b38e375a440fd3af8766da2b8018 Mon Sep 17 00:00:00 2001 From: Peter Wolanin <107691+pwolanin@users.noreply.github.com> Date: Wed, 10 Sep 2025 13:10:35 -0400 Subject: [PATCH 1/2] Use pipenv and upgrade python deps --- data-scripts/Pipfile | 16 ++++++++++++++++ data-scripts/README.md | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 data-scripts/Pipfile diff --git a/data-scripts/Pipfile b/data-scripts/Pipfile new file mode 100644 index 00000000..fdf5e358 --- /dev/null +++ b/data-scripts/Pipfile @@ -0,0 +1,16 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +contentful-management = "~=2.14" +click = "~=8.2" +petl = "~=1.7" +ratelimit = "~=2.2" +tqdm = "~=4.67" + +[dev-packages] + +[requires] +python_version = "3.10" diff --git a/data-scripts/README.md b/data-scripts/README.md index 6c56c531..963aa45b 100644 --- a/data-scripts/README.md +++ b/data-scripts/README.md @@ -2,6 +2,23 @@ Handy little python scripts to clean and merge voter turnout and registration data. Also a script to migrate content. +You should use the `pipenv` command to install the dependencies. +Install that with a package manager or `pip install pipenv`. + +To run the commands, use a pipenv shell like: + +``` +pipenv shell +python cli.py +``` + +or the run command: +``` +pipenv run python cli.py +``` + +## Available commands + ``` Usage: cli.py [OPTIONS] COMMAND [ARGS]... From 6d33cb3378f5c706cb98ad0c132272097d4d5d9a Mon Sep 17 00:00:00 2001 From: Peter Wolanin <107691+pwolanin@users.noreply.github.com> Date: Mon, 22 Sep 2025 20:51:10 -0400 Subject: [PATCH 2/2] update README --- data-scripts/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data-scripts/README.md b/data-scripts/README.md index 963aa45b..51692cbe 100644 --- a/data-scripts/README.md +++ b/data-scripts/README.md @@ -5,6 +5,9 @@ and registration data. Also a script to migrate content. You should use the `pipenv` command to install the dependencies. Install that with a package manager or `pip install pipenv`. +After you have pipenv, change in to this data-scripts directory and +run `pipenv install` + To run the commands, use a pipenv shell like: ```