Repository: usds/justice40-tool (language: python)

Issue:
Rename Census tract ID to Census tract 2010 ID
Given EPA's position of 2010 vs 2020 tracts, there is a concern that agencies who are using 2020 tracts who might join the 2010 list of tracts against their 2020 tracts and get nonsensical results. This change could alleviate that concern.


Discussion / hints:
This one is pretty straight forward --- only annoying part is updating pickles again I think. Will do tomorrow.

Fix patch:
diff --git a/data/data-pipeline/data_pipeline/content/config/csv.yml b/data/data-pipeline/data_pipeline/content/config/csv.yml
index 957b65734..7444e3647 100644
--- a/data/data-pipeline/data_pipeline/content/config/csv.yml
+++ b/data/data-pipeline/data_pipeline/content/config/csv.yml
@@ -1,12 +1,12 @@
 ---
 global_config:
-  sort_by_label: Census tract ID
+  sort_by_label: Census tract 2010 ID
   rounding_num:
     float: 2
     loss_rate_percentage: 4
 fields:
 - score_name: GEOID10_TRACT
-  label: Census tract ID
+  label: Census tract 2010 ID
   format: string
 - score_name: County Name
   label: County Name
diff --git a/data/data-pipeline/data_pipeline/content/config/excel.yml b/data/data-pipeline/data_pipeline/content/config/excel.yml
index 18f00bdec..6c3792604 100644
--- a/data/data-pipeline/data_pipeline/content/config/excel.yml
+++ b/data/data-pipeline/data_pipeline/content/config/excel.yml
@@ -1,6 +1,6 @@
 ---
 global_config:
-  sort_by_label: Census tract ID
+  sort_by_label: Census tract 2010 ID
   rounding_num:
     float: 2
     loss_rate_percentage: 4
@@ -10,7 +10,7 @@ sheets:
   - label: "Data"
     fields:
       - score_name: GEOID10_TRACT
-        label: Census tract ID
+        label: Census tract 2010 ID
         format: string
       - score_name: County Name
         label: County Name
diff --git a/data/data-pipeline/poetry.lock b/data/data-pipeline/poetry.lock
index 793c07023..eba2be994 100644
--- a/data/data-pipeline/poetry.lock
+++ b/data/data-pipeline/poetry.lock
@@ -881,7 +881,7 @@ test = ["coverage", "ipykernel", "pre-commit", "pytest-console-scripts", "pytest
 
 [[package]]
 name = "jupyterlab"
-version = "3.4.7"
+version = "3.5.0"
 description = "JupyterLab computational environment"
 category = "dev"
 optional = false
@@ -891,7 +891,7 @@ python-versions = ">=3.7"
 ipython = "*"
 jinja2 = ">=2.1"
 jupyter-core = "*"
-jupyter-server = ">=1.16,<2.0"
+jupyter-server = ">=1.16.0,<3"
 jupyterlab-server = ">=2.10,<3.0"
 nbclassic = "*"
 notebook = "<7"
@@ -1543,10 +1543,10 @@ version = "1.10.2"
 description = "Data validation and settings management using python type hints"
 category = "main"
 optional = false
-python-versions = ">=3.6.1"
+python-versions = ">=3.7"
 
 [package.dependencies]
-typing-extensions = ">=3.7.4.3"
+typing-extensions = ">=4.1.0"
 
 [package.extras]
 dotenv = ["python-dotenv (>=0.10.4)"]
@@ -1796,18 +1796,46 @@ optional = false
 python-versions = ">=3.7"
 
 [[package]]
-name = "safety"
-version = "1.10.3"
-description = "Checks installed dependencies for known vulnerabilities."
+name = "ruamel.yaml"
+version = "0.17.21"
+description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order"
+category = "dev"
+optional = false
+python-versions = ">=3"
+
+[package.dependencies]
+"ruamel.yaml.clib" = {version = ">=0.2.6", markers = "platform_python_implementation == \"CPython\" and python_version < \"3.11\""}
+
+[package.extras]
+docs = ["ryd"]
+jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"]
+
+[[package]]
+name = "ruamel.yaml.clib"
+version = "0.2.7"
+description = "C version of reader, parser and emitter for ruamel.yaml derived from libyaml"
 category = "dev"
 optional = false
 python-versions = ">=3.5"
 
+[[package]]
+name = "safety"
+version = "2.3.1"
+description = "Checks installed dependencies for known vulnerabilities and licenses."
+category = "dev"
+optional = false
+python-versions = "*"
+
 [package.dependencies]
-Click = ">=6.0"
-dparse = ">=0.5.1"
-packaging = "*"
+Click = ">=8.0.2"
+dparse = ">=0.6.2"
+packaging = ">=21.0"
 requests = "*"
+"ruamel.yaml" = ">=0.17.21"
+
+[package.extras]
+github = ["pygithub (>=1.43.3)", "jinja2 (>=3.1.0)"]
+gitlab = ["python-gitlab (>=1.3.0)"]
 
 [[package]]
 name = "scipy"
@@ -2207,7 +2235,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-
 [metadata]
 lock-version = "1.1"
 python-versions = "^3.8"
-content-hash = "f3d61a8c4ca54c580ba8d459aa76a9d956e046c2b8339602497ce53393ba9983"
+content-hash = "5409744ae006874a6de7666f28bb1dd6b91fb68008c8640488d3b847693b3168"
 
 [metadata.files]
 ansiwrap = []
@@ -2684,6 +2712,8 @@ rtree = [
     {file = "Rtree-1.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:bc6e7384684a260eb2f04fcac64ca5ffe28876132a11d1a883db2a5db8becb64"},
     {file = "Rtree-1.0.0.tar.gz", hash = "sha256:d0483482121346b093b9a42518d40f921adf445915b7aea307eb26768c839682"},
 ]
+"ruamel.yaml" = []
+"ruamel.yaml.clib" = []
 safety = []
 scipy = []
 seaborn = []
diff --git a/data/data-pipeline/pyproject.toml b/data/data-pipeline/pyproject.toml
index 8e1a40bc6..002a966ae 100644
--- a/data/data-pipeline/pyproject.toml
+++ b/data/data-pipeline/pyproject.toml
@@ -50,7 +50,7 @@ mypy = "^0.910"
 openpyxl = "^3.0.7"
 pylint = "^2.9.6"
 pytest = "^6.2.4"
-safety = "^1.10.3"
+safety = "^2.3.1"
 tox = "^3.24.0"
 pytest-mock = "^3.6.1"
 tox-poetry = "^0.4.1"
@@ -59,7 +59,7 @@ pytest-snapshot = "^0.8.1"
 nb-black = "^1.0.7"
 seaborn = "^0.11.2"
 papermill = "^2.3.4"
-jupyterlab = "^3.4.4"
+jupyterlab = "^3.5.0"
 
 [build-system]
 build-backend = "poetry.core.masonry.api"


Test patch:
diff --git a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl
index c7dbc2147..fddabc3f5 100644
Binary files a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl and b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl differ