Skip to content
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

Add Poetry as package manager | added github actions for publishing upon release creation #6

Merged
merged 31 commits into from
Jan 9, 2025

Conversation

gabrielfior
Copy link
Collaborator

No description provided.

@gabrielfior gabrielfior marked this pull request as draft January 8, 2025 12:48
@gabrielfior gabrielfior marked this pull request as ready for review January 8, 2025 20:43
@gabrielfior gabrielfior requested a review from kongzii January 8, 2025 20:43
with:
python-version: 3.10.14

- name: Cache Poetry installation
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice idea with cache!

I didn't use that in Github before, but from their repo, it seems like there needs to be something as

if: steps.cache-primes.outputs.cache-hit != 'true'

in the follow-up step. Or did you test that Poetry will quickly skip the installation by itself?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Please see latest changes and the corresponding CI run -> https://github.com/gnosis/python-web3-wallet-streamlit/actions/runs/12692379504?pr=6

I believe the cache is working now 🙏

- name: Cache Poetry dependencies
uses: actions/cache@v3
with:
path: .venv
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you test that this cache stuff works/makes it faster? From CI it looks like virtualenv is installed elsewhere:

Run poetry install
Creating virtualenv python-web3-wallet-96aaq9Ev-py3.10 in /home/runner/.cache/pypoetry/virtualenvs

so I wonder what is this caching.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See CI run above, Python packages + node packages are installed only once, although the action inside python_prepare is called by both.

pyproject.toml Show resolved Hide resolved
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install Python dependencies
if: steps.cache_poetry_dependencies.outputs.cache-hit != 'true'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kongzii Here the check for installing packages again - thanks for the observation

@gabrielfior gabrielfior merged commit 6f682ad into main Jan 9, 2025
4 checks passed
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