-
Notifications
You must be signed in to change notification settings - Fork 38
Add Poetry #15
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 #15
Conversation
c60b85e
to
eb11a54
Compare
eb11a54
to
b34d334
Compare
b34d334
to
310ca2b
Compare
@@ -1,3 +1,58 @@ | |||
[tool.poetry] | |||
name = "pytest-split" | |||
version = "0.2.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.
How is this updated? Manually?
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.
Yeah so when I update a package I would manually indent the version here and publish a release in the github repo 🙂
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 wonder if there's some way to get the version from git tags with poetry 🤔 But yeah, I can look into that later.
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've not used it, but this popped up in my feed a few weeks back https://github.com/tiangolo/poetry-version-plugin
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.
If you want to add this in a follow-up PR you'd just need to change the test and publish action to this as well, since it requires >= 1.2.0a1
- name: Install poetry
uses: snok/install-poetry@v1.1.6
with:
version: 1.2.0a1
virtualenvs-in-project: true
There's btw still the travis setup which publishes to PyPI on tags Lines 10 to 16 in beed24d
|
.github/workflows/publish.yml
Outdated
|
||
on: | ||
release: | ||
types: [published, edited] |
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.
Why on edited?
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.
No reason really - I can remove it. Think I added it to a project when the initial release failed because of bad credentials in the repo.
Pypi won't allow you to re-republish a package though, so you could in theory run the workflow 100x and it would only publish successfully once.
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 assume edited
will be triggered also with some simple typo fix? Let's have only published
here 🙂
Should I just delete the |
Yeah let's burn it 🔥 |
'flake8-print', | ||
'flake8-type-checking', | ||
] | ||
- repo: https://github.com/pycqa/isort |
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.
👍
Seems to work nicely, 0.2.1 was published using the GHA workflow added here 👍 |
Nice 🚀 |
This PR adds Poetry for package management.
Changes:
isort
for import management in the pre-commit config (say the word and we can revert this)__version__
declaration in__init__.py
since I think this relies on the setup.py setupAre you familiar with Poetry already @jerry-git? If not I would recommend just reading their docs - they're pretty short and very good 👍
The tl;dr is
poetry install
to install all dependenciespoetry update
to update dependenciespoetry build
to build the package (though that's usually not something I would do locally ever)poetry add <package>
to add a dependencypoetry add -D <package>
to add a dev dependency