Skip to content

Commit

Permalink
Poetry + Dep fixes (#1727)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 authored Sep 5, 2024
2 parents df80f3c + ebac4b3 commit 13dca4e
Show file tree
Hide file tree
Showing 23 changed files with 1,189 additions and 673 deletions.
1 change: 1 addition & 0 deletions bcol-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ COPY --chown=web:web ./README.md /code
# Project initialization:
RUN --mount=type=cache,target="$POETRY_CACHE_DIR" \
echo "$APP_ENV" \
&& poetry config installer.max-workers 1 \
&& poetry version \
# Install deps:
&& poetry run pip install -U pip \
Expand Down
1 change: 1 addition & 0 deletions bcol-api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ clean-test: ## clean test files
install: clean
unset HOME ## unset HOME because it's in the DEV .env file, will cause permissions issues
pip install poetry ;\
poetry config installer.max-workers 1
poetry install

#################################################################################
Expand Down
716 changes: 406 additions & 310 deletions bcol-api/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bcol-api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
python = "^3.12"
sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"}
flask-jwt-oidc = {git = "https://github.com/thorwolpert/flask-jwt-oidc.git"}
gunicorn = "^21.2.0"
gunicorn = "^22.0.0"
flask = "^3.0.2"
flask-script = "^2.0.6"
flask-moment = "^1.0.5"
Expand Down
1 change: 1 addition & 0 deletions bcol-api/src/bcol_api/resources/bcol_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class AccountPayment(Resource):
def post():
"""Create a payment record in BCOL."""
try:
is_apply_charge = False
if _jwt.validate_roles([Role.STAFF.value, Role.EDIT.value]) or _jwt.validate_roles([Role.SYSTEM.value]):
is_apply_charge = True
elif _jwt.validate_roles([Role.ACCOUNT_HOLDER.value]):
Expand Down
1 change: 1 addition & 0 deletions jobs/ftp-poller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ COPY --chown=web:web ./poetry.lock ./pyproject.toml .
RUN --mount=type=cache,target="$POETRY_CACHE_DIR" \
echo "$APP_ENV" \
&& poetry version \
&& poetry config installer.max-workers 1 \
&& poetry run pip install -U pip \
&& poetry install \
$(if [ -z ${APP_ENV+x} ] | [ "$APP_ENV" = 'production' ]; then echo '--only main'; fi) \
Expand Down
1 change: 1 addition & 0 deletions jobs/ftp-poller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ clean-test: ## clean test files
install: clean
unset HOME ## unset HOME because it's in the DEV .env file, will cause permissions issues
pip install poetry ;\
poetry config installer.max-workers 1
poetry install

#################################################################################
Expand Down
611 changes: 518 additions & 93 deletions jobs/ftp-poller/poetry.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions jobs/ftp-poller/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"
gunicorn = "^21.2.0"
flask = "^3.0.2"
flask-restplus = "^0.13.0"
python-dotenv = "^1.0.1"
Expand All @@ -23,7 +22,7 @@ jinja2 = "^3.1.3"
protobuf = "4.25.3"
launchdarkly-server-sdk = "^8.2.1"
sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"}
pay-api = {git = "https://github.com/seeker25/sbc-pay.git", subdirectory = "pay-api", branch = "21721"}
pay-api = {git = "https://github.com/bcgov/sbc-pay.git", subdirectory = "pay-api", branch = "main"}
wheel = "^0.43.0"


Expand Down
1 change: 1 addition & 0 deletions jobs/payment-jobs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ COPY --chown=web:web ./poetry.lock ./pyproject.toml .
RUN --mount=type=cache,target="$POETRY_CACHE_DIR" \
echo "$APP_ENV" \
&& poetry version \
&& poetry config installer.max-workers 1 \
&& poetry run pip install -U pip \
&& poetry install \
$(if [ -z ${APP_ENV+x} ] | [ "$APP_ENV" = 'production' ]; then echo '--only main'; fi) \
Expand Down
2 changes: 1 addition & 1 deletion jobs/payment-jobs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ clean-test: ## clean test files
rm -fr htmlcov/

install: clean
unset HOME ## unset HOME because it's in the DEV .env file, will cause permissions issues
pip install poetry ;\
poetry config installer.max-workers 1
poetry install

#################################################################################
Expand Down
110 changes: 53 additions & 57 deletions jobs/payment-jobs/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions jobs/payment-jobs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"
pay-api = {git = "https://github.com/ochiu/sbc-pay.git", branch = "22391-21560", subdirectory = "pay-api"}
gunicorn = "^21.2.0"
pay-api = {git = "https://github.com/bcgov/sbc-pay.git", branch = "main", subdirectory = "pay-api"}
flask = "^3.0.2"
flask-sqlalchemy = "^3.1.1"
sqlalchemy = "^2.0.28"
Expand Down
1 change: 1 addition & 0 deletions pay-admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ COPY --chown=web:web ./README.md /code
RUN --mount=type=cache,target="$POETRY_CACHE_DIR" \
echo "$APP_ENV" \
&& poetry version \
&& poetry config installer.max-workers 1 \
# Install deps:
&& poetry run pip install -U pip \
&& poetry install \
Expand Down
1 change: 1 addition & 0 deletions pay-admin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ clean-test: ## clean test files
install: clean
unset HOME ## unset HOME because it's in the DEV .env file, will cause permissions issues
pip install poetry ;\
poetry config installer.max-workers 1
poetry install

#################################################################################
Expand Down
Loading

0 comments on commit 13dca4e

Please sign in to comment.