Merged
Conversation
Settings can now be defined through environment variables, .env local file or regular arguments to the script. All variables need to be prefixed by PYTHON_INSPECTOR_ to be recognized. Example: PYTHON_INSPECTOR_INDEX_URL="https://pypy1.org,https://foo.bar" will add this two repositories overriding the public repository. Raise the minimum python version to 3.9 as 3.8 is EOL. Adapt base code to use new settings class Adapt tests to use new settings class Signed-off-by: Helio Chissini de Castro <helio.chissini.de.castro@cariad.technology>
* Do not hide settings module imports with settings variable * Update requirements for pydantic and pydantic_settings * Restore tests on Python 3.8 * Regenerate tests expectations * Remove code formatting changes and minor typing changes * Improve support for defaults and index_urls Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This was removed implicitly when adding a default OS to the CLI. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Member
Author
|
In the meantime, I found out that click (the library which is used here for the command line processing) has built-in support for environment variables, and that it is trivial to add support for .env files with the https://github.com/theskumar/python-dotenv library which is also used in Flask (where click started).
So I am wondering if using the built-in click support would not be better than using pydantic and also limit the number of deps. |
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Member
Author
|
The tests all pass. The only pending issue is the Ci for doc, and it will solved elsewhere. Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on @heliocastro PR:
This is a draft. It should be split in something else for the CHANGELOG and for the tests.