-
Notifications
You must be signed in to change notification settings - Fork 46
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 pyproject.toml
configuration
#203
use pyproject.toml
configuration
#203
Conversation
pyproject.toml
configurationpyproject.toml
configuration
5ae2fcf
to
be4b2b2
Compare
pyproject.toml
configurationpyproject.toml
configuration
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #203 +/- ##
==========================================
- Coverage 99.13% 98.91% -0.23%
==========================================
Files 1 1
Lines 465 462 -3
==========================================
- Hits 461 457 -4
- Misses 4 5 +1 ☔ View full report in Codecov by Sentry. |
@raimon49 should be ready for review |
pyproject.toml
Outdated
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "piplicenses.__version__"} | ||
readme = {file = ["README.md", "CHANGELOG.md"]} |
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.
@mbalatsko Thanks for finding a way to combine the README documents.
I tried uploading to TestPyPI and it returned an error regarding file content type.
ERROR HTTPError: 400 Bad Request from https://test.pypi.org/legacy/
The description failed to render for 'text/x-rst'. See https://test.pypi.org/help/#description-content-type for
more information.
Don't we need a content-type
key along with the file
key?
readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"}
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, in case we see that error. I was under intention that it is default, let me push fix for it now
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.
@raimon49 pushed, could you try it out please?
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.
Good, error resolved 👍
https://test.pypi.org/project/pip-licenses/4.6.0rc1/
One thing I saw and noticed is that the license metadata is very long full text when packaged with license = {file = “LICENSE”}
.
Wouldn't the pip-licenses command create a very large table in the output? Of course, Classifiers take precedence by default, so it is not worth worrying about.
Did you change from text to file because file is the preferred method?
b05111e
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.
According to https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license both options are equally right. I just wanted to make use of file we have in repository, no other reason.
I tried to run pip-licenses --with-system --from meta
:
pip-licenses 4.5.1 MIT License
Copyright (c) 2018 raimon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
And it is indeed long, but if you use mixed pip-licenses --with-system --mixed
:
pip-licenses 4.5.1 MIT License
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'd prefer to use textual format, I have no problems fixing it in the PR. But I suggest using MIT License
instead of MIT
as it is more semantically correct
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.
Thanks for the info. It still looks like I should adopt text
.
The notation MIT
also seems to be a short identifier standardized by SPDX.
https://spdx.org/licenses/
However, your suggestion is also acceptable.
Can you change the text
to either full or short and push it? I will merge it and ship as a new release.
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.
Reverted, should be ready to merge now
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 made sure I was ready to merge.
Ships as a production release over the weekend.
@mbalatsko pip-licenses 5.0.0 was shipped as our work product!! Package metadata of this project is now very modern. Thanks for your contribution 🎉 |
This PR unifies all configurations to be set in
pyproject.toml
:setup.py
,setup.cfg
,.coveragerc
pip-compile
frompyproject.toml
Resolves #201