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

feat: handle values passed via envvars #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tecoholic
Copy link

Description

Click allows setting envvars to be used as a way to pass values to arguments and options. In such scenarios, the webui doesn't use the values from the environment it's run from.

In this PR, the default values in the forms are parsed and then overridden using the values from environment variables.

@tecoholic
Copy link
Author

@fredrik-corneliusson Hi, thank you for this amazing library. I thought I could add an improvement there. Can you kindly give this a review?

@fredrik-corneliusson
Copy link
Owner

fredrik-corneliusson commented Dec 9, 2024

Thanks @tecoholic
I ran the tests and some failed. I have not investigated why. Please take a look and make sure all tests run by the check.sh script works. For more information about how to run in see the first section in:
https://github.com/fredrik-corneliusson/click-web/blob/master/CONTRIBUTING.rst

@tecoholic
Copy link
Author

@fredrik-corneliusson Thank you for responding. I apologize for missing the contributing guidelines. I will test everything locally and update the PR.

@tecoholic tecoholic marked this pull request as draft December 10, 2024 03:24
@tecoholic tecoholic marked this pull request as ready for review December 10, 2024 04:50
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Util command to run tests and code lint.

pytest && isort . && flake8
pytest && isort click_web tests && flake8 click_web tests
Copy link
Author

Choose a reason for hiding this comment

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

The check.sh kept messing with the virutalenv files at .venv. So I made it more explicit.

@tecoholic
Copy link
Author

@fredrik-corneliusson I updated the changes to make sure tests aren't failing and added a couple of tests for the newly introduced changes as well. Kindly take another look when you have some time.

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