-
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
Use Poetry in awssh #26
base: develop
Are you sure you want to change the base?
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.
I'm still not sold on using one of these project managers, but if we were going that route I would prefer we use something more "official" like Hatch. Poetry is not PEP-621 compliant and due to design decision that introduced incompatible elements to pyproject.toml
it will take time to become compliant. It also has a poor history of semver compliance (bugs/breaking changes introduced on minor or even patch releases).
Those two aren't necessarily the same thing though. Sure, it will take some time but they're working on it. Until then, it's not the end of the world. I think this is something we should seriously consider adopting. Our current process is old. This will be more beneficial and save lots of time especially with maintenance. Also, if you do more research into Poetry you will find it shares some features with Hatch as well. Lack of PEP-621 compliance isn't a very good reason to not use it. |
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.
How does poetry
compare with pipenv
? Do we have an indication as to what will likely become the standard tool?
I see that some well-established Python packages still use setuptools
, others use pipenv
, and still others use poetry
. We should probably have a team discussion about this.
[tool.poetry.group.dev.dependencies] | ||
boto3-stubs = "^1.28.5" | ||
coverage = "^7.2.7" | ||
coveralls = "!= 1.11.0" | ||
pre-commit = "^3.3.3" | ||
pytest-cov = "^4.1.0" | ||
pytest = "^7.4.0" | ||
types-docopt = "^0.6.11.3" | ||
types-requests = "^2.31.0.1" |
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.
We previously had (via the requirements*.txt
files and setup.py
) installation, testing, and development modes. (Dev packages are a superset of the testing packages which are themselves a superset of the installation packages.) Is that not possible in Poetry?
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.
How does poetry compare with pipenv? Do we have an indication as to what will likely become the standard tool?
Poetry will create and manage a virtual env for you. It's faster than pipenv and is better at resolving dependencies. https://python-poetry.org/docs/managing-environments/
We previously had (via the requirements*.txt files and setup.py) installation, testing, and development installations. (Dev packages are a superset of the testing packages which are themselves a superset of the installation packages.) Is that not possible in Poetry?
Yes this is possible. We can group them just like the above. Something like: poetry add pytest@latest --group dev
And then it will create a section in the toml for dev dependencies or testing if you want based on specification.
I guess what's not clear to me is if there really is anything "official" right now. I see both Personally, I don't have any issue with using multiple tools like we do now with |
Sounds good. Yeah, there is no official tooling. These are just tools that are gaining popularity because they're more modern.
I understand, personally, I find creating venv annoying but Poetry I can say does keep current with out current packaging and I'd argue will make the process more simpler and will take less than an hour to learn. |
I argue instead that |
I'm 100% onboard with moving to Based on the reading I've been doing this morning, I also lean toward |
Sorry @jasonodoom, but I am in agreement with @mcdonnnj and @jsf9k here. It sounds like That being said, I don't love this nugget in their FAQ:
However, since we currently don't already have that capability across our skeletons, I don't think this is a deal-breaker. |
I'll take a look at Hatch and see what I can do. |
🗣 Description
Considering the need for awssh, I found the installation process tedious and figured since I was to create a PR to add to the README I should contribute more to the repo. I initially was to create a
flake.nix
but decided to also include poetry.💭 Motivation and context
There are many benefits to using poetry as opposed to
setup.py
andvirtualenv
. Besides having less files (as you can see from the ones I've removed). Did you know you can (in the example of awssh) execute the program viapoetry run awssh
without having to set-up a virtualenv? Poetry does that for you among other things! Let's discuss.🧪 Testing
✅ Pre-approval checklist
in code comments.
to reflect the changes in this PR.
✅ Pre-merge checklist
✅ Post-merge checklist