Skip to content

Conversation

@onerandomusername
Copy link
Contributor

@onerandomusername onerandomusername commented Sep 16, 2021

Installs poetry into a venv with pipx for docker.

This means that our dependencies and poetry's dependencies will not conflict.

@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #74 (2258c20) into main (b5ab21f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #74   +/-   ##
=======================================
  Coverage   38.62%   38.62%           
=======================================
  Files          16       16           
  Lines         769      769           
  Branches      105      105           
=======================================
  Hits          297      297           
  Misses        459      459           
  Partials       13       13           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5ab21f...2258c20. Read the comment docs.

@onerandomusername onerandomusername added a: dependencies Related to package dependencies and management a: tools Development related to our toolchain (Docker, poetry, flake8) p: normal Normal Priority s: needs review Ready for review and merge skip changelog Skip the need for a changelog entry for a Pull Request t: chore Maintainence fix labels Sep 16, 2021
@onerandomusername onerandomusername changed the title fix: install poetry into a venv in docker fix: install poetry with pipx when running in docker Sep 16, 2021
@onerandomusername onerandomusername force-pushed the use-pipx-to-install-poetry-in-docker branch from 4a7f5d4 to 6003db6 Compare September 16, 2021 04:19
@onerandomusername onerandomusername force-pushed the use-pipx-to-install-poetry-in-docker branch from 6003db6 to 84385ca Compare September 16, 2021 04:29
RUN poetry install --no-dev

CMD ["python", "-m", "modmail"]
CMD ["poetry","run","python", "-m", "modmail"]
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is needed, it was working perfectly before this, even on railway. If it is needed, do add a comment here explaining why.

ENV PIP_NO_CACHE_DIR=false \
POETRY_VIRTUALENVS_CREATE=false
POETRY_VIRTUALENVS_IN_PROJECT=true \
POETRY_INSTALLER_PARALLEL=false \
Copy link
Member

Choose a reason for hiding this comment

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

Whats the reason for adding this in? POETRY_INSTALLER_PARALLEL=false

@Shivansh-007
Copy link
Member

Shivansh-007 commented Sep 27, 2021

Could you also remove .gitattributes, we don't have that file anymore. A bit offtopic to this PR, but itsok

@onerandomusername
Copy link
Contributor Author

UPDATE: I never tested this before now, but poetry is not needed to install and use importlib.metadata

It is fully possible to use pip install . and importlib.metadata will still work.

I'll be redoing this pull request to best execute this.

@Shivansh-007 Shivansh-007 deleted the use-pipx-to-install-poetry-in-docker branch October 19, 2021 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: dependencies Related to package dependencies and management a: tools Development related to our toolchain (Docker, poetry, flake8) p: normal Normal Priority s: needs review Ready for review and merge skip changelog Skip the need for a changelog entry for a Pull Request t: chore Maintainence fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants