From 4716056aa8f1fb49a5b9a3ac99593d8888bcf6c7 Mon Sep 17 00:00:00 2001 From: Andrew Bolyachevets Date: Fri, 14 Jun 2024 12:25:20 -0700 Subject: [PATCH] poetry saves libs to .venv, not venv; use python3.12 explicitly (#1546) * poetry saves libs to .venv, not venv; use python3.12 explicitly --- api/Makefile | 16 ++++++++-------- jobs/nr-day-job/Makefile | 14 +++++++------- jobs/nro-extractor/Makefile | 16 ++++++++-------- services/namex-pay/Makefile | 14 +++++++------- services/solr-names-updater/Makefile | 14 +++++++------- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/api/Makefile b/api/Makefile index 13a38baa2..7976a59c0 100644 --- a/api/Makefile +++ b/api/Makefile @@ -23,7 +23,7 @@ license: ## Verify source code license headers. setup: clean install ## Setup the project clean: clean-build clean-pyc clean-test ## Clean the project - rm -rf venv/ + rm -rf .venv/ clean-build: ## Clean build files rm -fr build/ @@ -48,8 +48,8 @@ update: ## Upgrade lock poetry update install: clean ## Install python virtrual environment - test -f venv/bin/activate || python -m venv $(CURRENT_ABS_DIR)/venv ;\ - . venv/bin/activate ;\ + test -f .venv/bin/activate || python3.12 -m venv $(CURRENT_ABS_DIR)/.venv ;\ + . .venv/bin/activate ;\ pipx install poetry poetry install @@ -60,15 +60,15 @@ install: clean ## Install python virtrual environment ci: pylint flake8 test ## CI flow pylint: ## Linting with pylint - . venv/bin/activate && pylint --rcfile=setup.cfg $(PROJECT_FOLDER_NAME) + . .venv/bin/activate && pylint --rcfile=setup.cfg $(PROJECT_FOLDER_NAME) flake8: ## Linting with flake8 - . venv/bin/activate && flake8 $(PROJECT_FOLDER_NAME) tests + . .venv/bin/activate && flake8 $(PROJECT_FOLDER_NAME) tests lint: pylint flake8 ## run all lint type scripts test: ## Unit testing - . venv/bin/activate && pytest + . .venv/bin/activate && pytest mac-cov: local-test ## Run the coverage report and display in a browser window (mac) open -a "Google Chrome" htmlcov/index.html @@ -129,10 +129,10 @@ tag: push ## tag image # COMMANDS - Local # ################################################################################# run: db ## Run the project in local - . venv/bin/activate && python -m flask run -p 5000 + . venv/bin/activate && python3.12 -m flask run -p 5000 db: ## Update the local database - . venv/bin/activate && python -m manage db upgrade + . venv/bin/activate && python3.12 -m manage db upgrade ################################################################################# # Self Documenting Commands # diff --git a/jobs/nr-day-job/Makefile b/jobs/nr-day-job/Makefile index a4676ef4d..01dc7e283 100644 --- a/jobs/nr-day-job/Makefile +++ b/jobs/nr-day-job/Makefile @@ -15,7 +15,7 @@ DOCKER_NAME:=nr-day-job setup: install ## Setup the project clean: clean-build clean-pyc clean-test ## Clean the project - rm -rf venv/ + rm -rf .venv/ clean-build: ## Clean build files rm -fr build/ @@ -40,8 +40,8 @@ update: ## Upgrade lock poetry update install: clean ## Install python virtrual environment - test -f venv/bin/activate || python -m venv $(CURRENT_ABS_DIR)/venv ;\ - . venv/bin/activate ;\ + test -f .venv/bin/activate || python3.12 -m venv $(CURRENT_ABS_DIR)/.venv ;\ + . .venv/bin/activate ;\ pipx install poetry poetry install @@ -52,15 +52,15 @@ install: clean ## Install python virtrual environment ci: lint flake8 test ## CI flow pylint: ## Linting with pylint - . venv/bin/activate && pylint --rcfile=setup.cfg nr_day_job.py + . .venv/bin/activate && pylint --rcfile=setup.cfg nr_day_job.py flake8: ## Linting with flake8 - . venv/bin/activate && flake8 nr_day_job.py + . .venv/bin/activate && flake8 nr_day_job.py lint: pylint flake8 ## run all lint type scripts test: ## Unit testing - . venv/bin/activate && pytest + . .venv/bin/activate && pytest mac-cov: test ## Run the coverage report and display in a browser window (mac) @open -a "Google Chrome" htmlcov/index.html @@ -121,7 +121,7 @@ tag: push ## tag image ################################################################################# run: ## Run the project in local - . venv/bin/activate && python nr_day_job.py + . .venv/bin/activate && python3.12 nr_day_job.py ################################################################################# # Self Documenting Commands # diff --git a/jobs/nro-extractor/Makefile b/jobs/nro-extractor/Makefile index 57470958f..9ec32045b 100644 --- a/jobs/nro-extractor/Makefile +++ b/jobs/nro-extractor/Makefile @@ -21,7 +21,7 @@ license: ## Verify source code license headers. setup: install ## Setup the project clean: clean-build clean-pyc clean-test ## Clean the project - rm -rf venv/ + rm -rf .venv/ clean-build: ## Clean build files rm -fr build/ @@ -46,8 +46,8 @@ update: ## Upgrade lock poetry update install: clean ## Install python virtrual environment - test -f venv/bin/activate || python -m venv $(CURRENT_ABS_DIR)/venv ;\ - . venv/bin/activate ;\ + test -f .venv/bin/activate || python3.12 -m venv $(CURRENT_ABS_DIR)/.venv ;\ + . .venv/bin/activate ;\ pipx install poetry poetry install @@ -58,15 +58,15 @@ install: clean ## Install python virtrual environment ci: pylint flake8 test ## CI flow pylint: ## Linting with pylint - . venv/bin/activate && pylint --rcfile=setup.cfg nro_extractor.py extractor + . .venv/bin/activate && pylint --rcfile=setup.cfg nro_extractor.py extractor flake8: ## Linting with flake8 - . venv/bin/activate && flake8 nro_extractor.py extractor tests + . .venv/bin/activate && flake8 nro_extractor.py extractor tests lint: pylint flake8 ## run all lint type scripts test: ## Unit testing - . venv/bin/activate && pytest + . .venv/bin/activate && pytest mac-cov: local-test ## Run the coverage report and display in a browser window (mac) open -a "Google Chrome" htmlcov/index.html @@ -127,10 +127,10 @@ tag: push ## tag image # COMMANDS - Local # ################################################################################# run: db ## Run the project in local - . venv/bin/activate && python -m flask run -p 5000 + . .venv/bin/activate && python3.12 -m flask run -p 5000 db: ## Update the local database - . venv/bin/activate && python -m manage.py db upgrade + . .venv/bin/activate && python3.12 -m manage.py db upgrade ################################################################################# # Self Documenting Commands # diff --git a/services/namex-pay/Makefile b/services/namex-pay/Makefile index 85e4fcaf2..9571a2bbb 100644 --- a/services/namex-pay/Makefile +++ b/services/namex-pay/Makefile @@ -15,7 +15,7 @@ DOCKER_NAME:=namex-pay setup: install ## Setup the project clean: clean-build clean-pyc clean-test ## Clean the project - rm -rf venv/ + rm -rf .venv/ clean-build: ## Clean build files rm -fr build/ @@ -40,8 +40,8 @@ update: ## Upgrade lock poetry update install: clean ## Install python virtrual environment - test -f venv/bin/activate || python -m venv $(CURRENT_ABS_DIR)/venv ;\ - . venv/bin/activate ;\ + test -f .venv/bin/activate || python3.12 -m venv $(CURRENT_ABS_DIR)/.venv ;\ + . .venv/bin/activate ;\ pipx install poetry poetry install @@ -52,13 +52,13 @@ install: clean ## Install python virtrual environment ci: pylint flake8 test ## CI flow pylint: ## Linting with pylint - . venv/bin/activate && pylint --rcfile=setup.cfg src/$(PROJECT_NAME) + . .venv/bin/activate && pylint --rcfile=setup.cfg src/$(PROJECT_NAME) flake8: ## Linting with flake8 ## tests - . venv/bin/activate && flake8 src/$(PROJECT_NAME) + . .venv/bin/activate && flake8 src/$(PROJECT_NAME) test: ## Unit testing - . venv/bin/activate && pytest + . .venv/bin/activate && pytest mac-cov: test ## Run the coverage report and display in a browser window (mac) @open -a "Google Chrome" htmlcov/index.html @@ -119,7 +119,7 @@ tag: push ## tag image ################################################################################# run: ## Run the project in local - . venv/bin/activate && python run.py + . .venv/bin/activate && python3.12 run.py ################################################################################# # Self Documenting Commands # diff --git a/services/solr-names-updater/Makefile b/services/solr-names-updater/Makefile index ea0d11222..8dc030247 100644 --- a/services/solr-names-updater/Makefile +++ b/services/solr-names-updater/Makefile @@ -15,7 +15,7 @@ DOCKER_NAME:=solr-names-updater setup: install ## Setup the project clean: clean-build clean-pyc clean-test ## Clean the project - rm -rf venv/ + rm -rf .venv/ clean-build: ## Clean build files rm -fr build/ @@ -40,8 +40,8 @@ update: ## Upgrade lock poetry update install: clean ## Install python virtrual environment - test -f venv/bin/activate || python -m venv $(CURRENT_ABS_DIR)/venv ;\ - . venv/bin/activate ;\ + test -f .venv/bin/activate || python3.12 -m venv $(CURRENT_ABS_DIR)/.venv ;\ + . .venv/bin/activate ;\ pipx install poetry poetry install @@ -51,15 +51,15 @@ install: clean ## Install python virtrual environment ci: lint flake8 test ## CI flow pylint: ## Linting with pylint - . venv/bin/activate && pylint --rcfile=setup.cfg src/$(PROJECT_NAME) + . .venv/bin/activate && pylint --rcfile=setup.cfg src/$(PROJECT_NAME) flake8: ## Linting with flake8 ## tests - . venv/bin/activate && flake8 src/$(PROJECT_NAME) + . .venv/bin/activate && flake8 src/$(PROJECT_NAME) lint: pylint flake8 ## run all lint type scripts test: ## Unit testing - . venv/bin/activate && pytest + . .venv/bin/activate && pytest mac-cov: test ## Run the coverage report and display in a browser window (mac) @open -a "Google Chrome" htmlcov/index.html @@ -120,7 +120,7 @@ tag: push ## tag image ################################################################################# run: ## Run the project in local - . venv/bin/activate && python run.py + . .venv/bin/activate && python3.12 run.py ################################################################################# # Self Documenting Commands #