-
Notifications
You must be signed in to change notification settings - Fork 3
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
Replace pipenv with poetry #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaurav: Thank you so much for this PR. I've left a few trivial comments, which you can either choose to address or not. But everything works seamlessly even without them, so you can merge whenever.🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to run pytest and flake8 locally, so I'm inclined to approve this if the GH actions work
This seems unnecessary: even if we hit the cache, the versions of the files in the Poetry config and lock files might have changed, and so require re-installation.
Thanks for explaining, Gaurav
… On Dec 9, 2021, at 2:53 PM, Gaurav Vaidya ***@***.***> wrote:
@gaurav commented on this pull request.
In .github/workflows/pytest.yaml <#41 (comment)>:
> + - id: cache-poetry
uses: ***@***.***
with:
- path: ~/.local/share/virtualenvs
- key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- - name: Install dependencies
- if: steps.cache-pipenv.outputs.cache-hit != 'true'
- run: |
- pipenv install --deploy --dev
+ path: ~/.local
+ key: ${{ runner.os }}-python-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}
Sujay: Yup, that makes sense! Fixed in 41522b9 <41522b9>.
Mark:
Is this PR primarily about getting poetry to work with the GH actions? Is the ability to use poetry in a locally cloned repo a direct side effect of that? A new user would still have to install the poetry application and run the poetry install command before doing any local development or testing. right?
It's primarily about getting Poetry settings in here so that you can run the local scripts and tests and things with poetry run pytest ..., but one way of testing that we've set that up correctly is that to ensure that GitHub Actions can run the tests via Poetry as well.
This caching is allows us to keep a copy of the installed dependencies on the GitHub Actions system <https://github.com/snok/install-poetry#caching-the-poetry-installation> -- that way, we don't need to redownload the dependencies every time we run the tests.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub <#41 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AGAEX6OD7ZK2SX23QYJA5RTUQECLVANCNFSM5IKQSIMQ>.
|
This PR replaces Pipenv with Poetry, which is better and faster at managing dependencies.