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

PR: Implement Support to Load Environment Variables from File #1239

Merged
merged 5 commits into from
Jan 28, 2024

Conversation

KelSolaar
Copy link
Member

@KelSolaar KelSolaar commented Jan 26, 2024

Summary

This PR implements support to load environment variables from a file.

It is now possible to create a ~/.colour-science/colour-science.jenv JSON file from which Colour will load environment variables from:

{
  "COLOUR_SCIENCE__COLOUR__SHOW_WARNINGS_WITH_TRACEBACK": 1
}

The following new environment variables are now supported:

  • COLOUR_SCIENCE__FILTER_RUNTIME_WARNINGS: Filter Colour runtime warnings.
  • COLOUR_SCIENCE__FILTER_USAGE_WARNINGS: Filter Colour usage warnings.
  • COLOUR_SCIENCE__FILTER_COLOUR_WARNINGS: Filter Colour warnings, this also filters Colour usage and runtime warnings.
  • COLOUR_SCIENCE__FILTER_PYTHON_WARNINGS: Filter Python warnings.

This should help with #1221 and #1237.

Preflight

Code Style and Quality

  • Unit tests have been implemented and passed.
  • Pyright static checking has been run and passed.
  • Pre-commit hooks have been run and passed.
  • [N/A] New transformations have been added to the Automatic Colour Conversion Graph.
  • [N/A] New transformations have been exported to the relevant namespaces, e.g. colour, colour.models.

Documentation

  • New features are documented along with examples if relevant.
  • The documentation is Sphinx and numpydoc compliant.

…ILTER_USAGE_WARNINGS`, `COLOUR_SCIENCE__FILTER_COLOUR_WARNINGS` and `COLOUR_SCIENCE__FILTER_PYTHON_WARNINGS` environment variables.
@KelSolaar KelSolaar requested a review from tjdcs January 26, 2024 08:05
@coveralls
Copy link

Coverage Status

coverage: 99.721% (-0.009%) from 99.73%
when pulling 2baa1a9 on feature/jenv
into 8098fbc on develop.

@KelSolaar KelSolaar merged commit cf81438 into develop Jan 28, 2024
30 of 32 checks passed
@KelSolaar KelSolaar deleted the feature/jenv branch January 28, 2024 02:11
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