Compare commits

...

13 Commits

Author SHA1 Message Date
ccostino
69c8bbc6b7 Merge pull request #2615 from GSA/poetry
upgrade poetry to 2.1.3
2025-05-30 11:50:27 -04:00
Carlo Costino
6a606a467e Update bootstrap-with-git-hooks command
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2025-05-30 11:06:45 -04:00
ccostino
3d44e76383 Update .github/workflows/checks.yml
Removing extraneous vulnerability ignore config.
2025-05-30 10:57:24 -04:00
Kenneth Kehl
038f4e294a merge from main 2025-05-29 14:46:02 -07:00
Kenneth Kehl
3fe74bea54 add exclusion 2025-05-29 11:25:01 -07:00
Kenneth Kehl
6aa84305f6 code review feedback 2025-05-29 11:19:22 -07:00
Kenneth Kehl
8b2139727e add README comments about poetry upgrades 2025-05-29 08:49:38 -07:00
Kenneth Kehl
665d7b543b upgrade poetry to 2.1.3 2025-05-27 12:44:28 -07:00
Kenneth Kehl
7ba4f3658e upgrade poetry to 2.1.3 2025-05-27 12:32:54 -07:00
Kenneth Kehl
0afc93958c upgrade poetry to 2.1.3 2025-05-27 12:25:52 -07:00
Kenneth Kehl
d27bc213d4 upgrade poetry to 2.1.3 2025-05-27 12:00:46 -07:00
Kenneth Kehl
589c01ed75 upgrade poetry to 2.1.3 2025-05-27 11:41:33 -07:00
Kenneth Kehl
29db4dcf4d upgrade poetry to 2.1.3 2025-05-27 11:34:11 -07:00
8 changed files with 28 additions and 11 deletions

View File

@@ -15,7 +15,10 @@ runs:
python-version: "3.12.3"
- name: Install poetry
shell: bash
run: pip install poetry==1.8.5
run: pip install poetry==2.1.3
- name: Install poetry export plugin
shell: bash
run: poetry self add poetry-plugin-export
- name: Downgrade virtualenv to compatible version
shell: bash
run: pip install "virtualenv<20.30"

View File

@@ -139,7 +139,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-project
- name: Create requirements.txt
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
run: poetry export --output requirements.txt
- uses: pypa/gh-action-pip-audit@v1.1.0
with:
inputs: requirements.txt

View File

@@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-project
- name: Create requirements.txt
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
run: poetry export --output requirements.txt
- uses: pypa/gh-action-pip-audit@v1.1.0
with:
inputs: requirements.txt

View File

@@ -42,7 +42,7 @@ jobs:
- uses: ./.github/actions/setup-project
- name: Create requirements.txt
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
run: poetry export --output requirements.txt
- name: Deploy to cloud.gov
uses: cloud-gov/cg-cli-tools@main

View File

@@ -42,7 +42,7 @@ jobs:
- uses: ./.github/actions/setup-project
- name: Create requirements.txt
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
run: poetry export --output requirements.txt
- name: Deploy to cloud.gov
uses: cloud-gov/cg-cli-tools@main

View File

@@ -47,7 +47,7 @@ jobs:
- uses: ./.github/actions/setup-project
- name: Create requirements.txt
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
run: poetry export --output requirements.txt
- name: Deploy to cloud.gov

View File

@@ -17,8 +17,7 @@ NVMSH := $(shell [ -f "$(HOME)/.nvm/nvm.sh" ] && echo "$(HOME)/.nvm/nvm.sh" || e
.PHONY: bootstrap
bootstrap: ## Set up everything to run the app
make generate-version-file
poetry lock --no-update
poetry install --sync --no-root
poetry sync --no-root
poetry run playwright install --with-deps
poetry run pre-commit install
source $(NVMSH) --no-use && nvm install && npm install
@@ -28,8 +27,7 @@ bootstrap: ## Set up everything to run the app
.PHONY: bootstrap-with-git-hooks
bootstrap-with-git-hooks: ## Sets everything up and accounts for pre-existing git hooks
make generate-version-file
poetry lock --no-update
poetry install --sync --no-root
poetry sync --no-root
poetry run playwright install --with-deps
git config --global --unset-all core.hooksPath
poetry run pre-commit install
@@ -129,7 +127,7 @@ py-lock: ## Syncs dependencies and updates lock file without performing recursiv
.PHONY: freeze-requirements
freeze-requirements: ## create static requirements.txt
poetry export --without-hashes --format=requirements.txt > requirements.txt
poetry export --output requirements.txt
.PHONY: pip-audit
pip-audit:

View File

@@ -308,6 +308,22 @@ you'll be set with an upgraded version of Python.
_If you're not sure about the details of your current virtual environment, you can run `poetry env info` to get more information. If you've been using `pyenv` for everything, you can also see all available virtual environments with `pyenv virtualenvs`._
#### Poetry upgrades ####
If you are doing a new project setup, then after you install poetry you need to install the export plugin
```sh
poetry self add poetry-plugin-export
```
If you are upgrading from poetry 1.8.5, you need to do this:
```sh
curl -sSL https://install.python-poetry.org | python3 - --version 2.1.3
poetry self add poetry-export-plugin
```
#### Updating the .env file for Login.gov
To configure the application for Login.gov, you will need to update the following environment variables in the .env file: