-
Notifications
You must be signed in to change notification settings - Fork 58
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
Read strategy from pyproject toml #32
Read strategy from pyproject toml #32
Conversation
unauthorized_licenses = [ | ||
"gpl v3" | ||
] | ||
[tool.liccheck.authorized_packages] |
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 not incuding authorized_packages
in the tool.liccheck
section above? Also, does this syntax supports all version requirements operators, i.e. can we specify for example uuid >= 1.30, < 2
?
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.
authorized_packages
must be a dictionary to map the package name to the allowed versions. And afaik there is no other way to define a dictionary within a dictionary in toml than this (e.g. indendation seems to be ignored entirely). See https://github.com/toml-lang/toml
Also, does this syntax supports all version requirements operators, i.e. can we specify for example uuid >= 1.30, < 2?
Yes, see the example in the PR description
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.
Great! Before merging, could you add a paragraph in the readme regarding this new feature? Thanks a lot.
I use pyproject.toml too and this would be a pretty cool feature. Are you still on it @larsrinn? |
Merging. Readme and tests still to be updated, though. |
closes #31
As proposed in #31 I added a capability to read the strategy from a
pyproject.toml
file. By default it looks for atool.liccheck
section in such a file. If this is not there, it falls back to the file passed in via the-s
parameter. If this is not there either, an error message is shown.A valid section in
pyproject.toml
would beWhat do you think about this approach? Should the
Strategy
parameter also be configurable by that way?Todo before merge
pyproject.toml
But I wanted to get some feedback before doing this...