From 85f149146a40d35f404e4c459a506ec4a561a351 Mon Sep 17 00:00:00 2001 From: Madison Swain-Bowden Date: Fri, 15 Dec 2023 14:21:47 -0800 Subject: [PATCH] Rename catalog requirements files to match Renovate pattern (#3521) --- catalog/Dockerfile | 4 ++-- catalog/justfile | 6 +++--- catalog/{requirements_dev.txt => requirements-dev.txt} | 2 +- catalog/{requirements_prod.txt => requirements-prod.txt} | 0 docker-compose.yml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename catalog/{requirements_dev.txt => requirements-dev.txt} (89%) rename catalog/{requirements_prod.txt => requirements-prod.txt} (100%) diff --git a/catalog/Dockerfile b/catalog/Dockerfile index c9330844986..bb4288bdd89 100644 --- a/catalog/Dockerfile +++ b/catalog/Dockerfile @@ -10,7 +10,7 @@ FROM apache/airflow:slim-${CATALOG_AIRFLOW_VERSION}-python${CATALOG_PY_VERSION} LABEL org.opencontainers.image.source = "https://github.com/WordPress/openverse" # Build-time arguments, with sensible defaults -ARG REQUIREMENTS_FILE=requirements_prod.txt +ARG REQUIREMENTS_FILE=requirements-prod.txt # Path configurations ENV AIRFLOW_HOME=/opt/airflow @@ -59,7 +59,7 @@ USER airflow WORKDIR ${AIRFLOW_HOME} # Always add the prod req because the dev reqs depend on it for deduplication -COPY ${REQUIREMENTS_FILE} requirements_prod.txt ${AIRFLOW_HOME}/ +COPY ${REQUIREMENTS_FILE} requirements-prod.txt ${AIRFLOW_HOME}/ # args go out of scope when a new build stage starts so it must be redeclared here ARG CATALOG_PY_VERSION diff --git a/catalog/justfile b/catalog/justfile index fd34546cd23..5bf3859d913 100644 --- a/catalog/justfile +++ b/catalog/justfile @@ -16,8 +16,8 @@ SERVICE := env_var_or_default("SERVICE", "scheduler") # Version # ########### -export CATALOG_PY_VERSION := `grep '# PYTHON' requirements_prod.txt | awk -F= '{print $2}'` -export CATALOG_AIRFLOW_VERSION := `grep '^apache-airflow' requirements_prod.txt | awk -F= '{print $3}'` +export CATALOG_PY_VERSION := `grep '# PYTHON' requirements-prod.txt | awk -F= '{print $2}'` +export CATALOG_AIRFLOW_VERSION := `grep '^apache-airflow' requirements-prod.txt | awk -F= '{print $3}'` # Print the required Python version @py-version: @@ -49,7 +49,7 @@ check-py-version: # Install dependencies install *args: check-py-version - python -m pip install -r requirements_dev.txt + python -m pip install -r requirements-dev.txt ###### # Up # diff --git a/catalog/requirements_dev.txt b/catalog/requirements-dev.txt similarity index 89% rename from catalog/requirements_dev.txt rename to catalog/requirements-dev.txt index b656646e870..b84e71be18a 100644 --- a/catalog/requirements_dev.txt +++ b/catalog/requirements-dev.txt @@ -1,6 +1,6 @@ # Note: Unpinned packages have their versions determined by the Airflow constraints file --r requirements_prod.txt +-r requirements-prod.txt flaky==3.7.0 ipython diff --git a/catalog/requirements_prod.txt b/catalog/requirements-prod.txt similarity index 100% rename from catalog/requirements_prod.txt rename to catalog/requirements-prod.txt diff --git a/docker-compose.yml b/docker-compose.yml index 0053062fe69..7cc269fbb21 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ x-airflow-common: &airflow-common context: ./catalog/ target: cat args: # Automatically inferred from env vars, unless specified - - REQUIREMENTS_FILE=requirements_dev.txt + - REQUIREMENTS_FILE=requirements-dev.txt - CATALOG_PY_VERSION - CATALOG_AIRFLOW_VERSION volumes: