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

Support parsing input parametres from pyproject.toml config #200

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

mbalatsko
Copy link
Contributor

This PR adds possibility to set pip-licences input parameters from pyproject.toml file. The change made to be minimally invasive to project logic:

  • All parameters configurable using CLI are configurable using pyproject.toml in the special section for pip-licences tool
  • Inputs set in CLI have higher priority than pyproject.toml and can override them
  • All different types of parameters parsing from toml and overriding by cli was tested in a separate test

Main motivation: #148 and I really love that in modern python packages you could configure all tools in pyproject.toml

@raimon49
Copy link
Owner

@mbalatsko Thank you! Very interesting suggestion.

Also, your implementation is considerate of existing users and looks very professional.

Toward merging this PR, I think it would be better if the README document has the [tool] table contents of the example TOML file and the specs when loaded.

@mbalatsko
Copy link
Contributor Author

@raimon49 sure, I completely forgot to add it to README, will do!

@mbalatsko
Copy link
Contributor Author

@raimon49 please take a look, should be all there

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.13%. Comparing base (b3a3d87) to head (ee26a1c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   99.12%   99.13%   +0.01%     
==========================================
  Files           1        1              
  Lines         457      465       +8     
==========================================
+ Hits          453      461       +8     
  Misses          4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@raimon49 raimon49 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbalatsko Perfect! I will ship to PyPI based on the merged master branch.

@raimon49 raimon49 merged commit ef8805a into raimon49:master Jul 11, 2024
7 checks passed
@raimon49
Copy link
Owner

Just shipped v4.5.0 and we can now use the features implemented in this PR.
https://pypi.org/project/pip-licenses/4.5.0/

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.

2 participants