Skip to content

Poetry install to virtualenv #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Poetry install to virtualenv #436

merged 2 commits into from
Feb 1, 2024

Conversation

jonkafton
Copy link
Contributor

@jonkafton jonkafton commented Feb 1, 2024

What are the relevant tickets?

Let Poetry use a virtualenv in docker container #434

Description (What does it do?)

Updates the Docker build config for Poetry’s installation to create a virtual environment for the project.

Aligns the container build with OCW Studio and MITxOnline.

Note that we're setting POETRY_VIRTUALENVS_CREATE to the default true so it reads better (it is false in other projects). The assumption is that this has no impact as true creates if one does not already exist (we create before the poetry install with python3 -m venv $VIRTUAL_ENV).

We get the same output for containers created with either:

$ poetry env list
-- empty --

$ poetry env info

Virtualenv
Python:         3.11.5
Implementation: CPython
Path:           /opt/venv
Executable:     /opt/venv/bin/python
Valid:          True

System
Platform:   linux
OS:         posix
Python:     3.11.5
Path:       /usr/local
Executable: /usr/local/bin/python3.11

How can this be tested?

Locally:

  • The container for the web service builds successfully
docker compose build web
  • Services start and site loads
yarn run build
docker compose up

Navigate to http://localhost:8063

RC:

  • This needs a post deployment check. Confirm successful deployment to RC post release or roll back.

Copy link

github-actions bot commented Feb 1, 2024

OpenAPI Changes

Show/hide No detectable change.

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b965a71) 76.85% compared to head (327a0e2) 76.87%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #436      +/-   ##
==========================================
+ Coverage   76.85%   76.87%   +0.01%     
==========================================
  Files         244      245       +1     
  Lines        9975     9983       +8     
  Branches     1703     1703              
==========================================
+ Hits         7666     7674       +8     
  Misses       2141     2141              
  Partials      168      168              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mbertrand mbertrand self-assigned this Feb 1, 2024
@jonkafton jonkafton added the Needs Review An open Pull Request that is ready for review label Feb 1, 2024
Copy link
Member

@mbertrand mbertrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@mbertrand mbertrand added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Feb 1, 2024
@jonkafton jonkafton merged commit 0c45c3d into main Feb 1, 2024
@jonkafton jonkafton deleted the jk/434-poetry-virtualenv branch February 1, 2024 15:36
This was referenced Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants