Skip to content

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

Merged
KelSolaar merged 5 commits intodevelopfrom
feature/jenv
Jan 28, 2024
Merged

PR: Implement Support to Load Environment Variables from File#1239
KelSolaar merged 5 commits intodevelopfrom
feature/jenv

Conversation

@KelSolaar
Copy link
Copy Markdown
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
Copy Markdown

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
@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