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

run script in venv through Poetry #92

Merged
merged 1 commit into from
Aug 23, 2022
Merged

run script in venv through Poetry #92

merged 1 commit into from
Aug 23, 2022

Conversation

hms5232
Copy link

@hms5232 hms5232 commented Aug 22, 2022

I recommend running script through Poetry after Poetry is used.

Maybe consider migrate publish action to poetry-publish; test action can use actions-poetry?

@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@afunTW
Copy link
Collaborator

afunTW commented Aug 23, 2022

Thanks for the recommendation. In my perspective, actions-poetry is the right way to prevent we invoke the tools outside the virtualenv.

However, we would not consider the publish action at this moment since this is a fork project and we are not ready for it.

@bluet
Copy link
Owner

bluet commented Aug 23, 2022

As the original maintainer of the proxybroker is out of the grid, I'll publish the module under the name of proxybroker2 or something else in the near future once #82 💯

Thanks @hms5232 and @afunTW

@bluet bluet merged commit e8393f2 into bluet:master Aug 23, 2022
@bluet
Copy link
Owner

bluet commented Aug 23, 2022

@hms5232 Would you also like to help migrate to actions-poetry and poetry-publish?

@hms5232
Copy link
Author

hms5232 commented Aug 23, 2022

@hms5232 Would you also like to help migrate to actions-poetry and poetry-publish?

@bluet Yes, I will be willing to help this if project sure to migrate to Poetry 😄

@bluet
Copy link
Owner

bluet commented Aug 23, 2022

@hms5232 Go Go Power Rangers!

@bluet
Copy link
Owner

bluet commented Aug 30, 2022

@afunTW @hms5232 seems that we no longer need the requirements.txt, right?

@bluet
Copy link
Owner

bluet commented Aug 30, 2022

@all-contributors add @hms5232 for code

@allcontributors
Copy link

@bluet

I've put up a pull request to add @hms5232! 🎉

@afunTW
Copy link
Collaborator

afunTW commented Aug 30, 2022

@bluet It depends on the project's orientation, here's the detail

  1. If we aim to use Poetry as the only dependencies source, we don't need the requirements.txt but require to maintain the poetry.lock and pyproject.toml
  2. If we aim to support multiple dependencies tools e.g. poetry, pipenv, pip etc, recommend keeping the requirement.txt and syncing all the states in all supported dependencies tools

@bluet
Copy link
Owner

bluet commented Aug 30, 2022

@afunTW 1. seems to be easier to maintain. Any downside?

What do you suggest?

@afunTW
Copy link
Collaborator

afunTW commented Aug 31, 2022

@bluet
I would like to approach development-tools-agnostic and the maintenance could be solved by automation flow.

For example, the core developer and CI flow use poetry to maintain the dependencies, and CI flow generates the requirements.txt based on the lock file. It leads to anyone who does not familiar with poetry can still import the requirements.txt and contribute.

@hms5232
Copy link
Author

hms5232 commented Aug 31, 2022

@bluet It depends on the project's orientation, here's the detail

1. If we aim to use Poetry as the **only** dependencies source, we don't need the `requirements.txt` but require to maintain the `poetry.lock` and `pyproject.toml`

2. If we aim to support multiple dependencies tools e.g. `poetry`, `pipenv`, `pip` etc, recommend keeping the `requirement.txt` and syncing all the states in all supported dependencies tools

In my option, we don't need and have no time to fit every package manager which user used. If they prefer other tools or CI need something else, Poetry support that exports lock file to other formats. Just use poetry export and it will generate requirements.txt.

@afunTW 1. seems to be easier to maintain. Any downside?

What do you suggest?

In summary, I vote 1..

@hms5232
Copy link
Author

hms5232 commented Aug 31, 2022

Another point, Poetry is both a package manager and a virtual environment tool. Using Poetry not only make sure dependencies is same for everyone but also keep everybody's environment is clean.

@bluet
Copy link
Owner

bluet commented Aug 31, 2022

@hms5232 @afunTW Hi I've opened a new issue for follow-up discussions #105

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.

3 participants