Skip to content

Commit

Permalink
poetry saves libs to .venv, not venv; use python3.12 explicitly (#1546)
Browse files Browse the repository at this point in the history
* poetry saves libs to .venv, not venv; use python3.12 explicitly
  • Loading branch information
bolyachevets authored Jun 14, 2024
1 parent 243b0e5 commit 4716056
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
16 changes: 8 additions & 8 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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 #
Expand Down
14 changes: 7 additions & 7 deletions jobs/nr-day-job/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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 #
Expand Down
16 changes: 8 additions & 8 deletions jobs/nro-extractor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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 #
Expand Down
14 changes: 7 additions & 7 deletions services/namex-pay/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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 #
Expand Down
14 changes: 7 additions & 7 deletions services/solr-names-updater/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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 #
Expand Down

0 comments on commit 4716056

Please sign in to comment.