colour-science / colour

Colour Science for Python
https://www.colour-science.org
BSD 3-Clause "New" or "Revised" License
2.03k stars 257 forks source link

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

Closed KelSolaar closed 5 months ago

KelSolaar commented 5 months ago

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:

This should help with #1221 and #1237.

Preflight

Code Style and Quality

Documentation

coveralls commented 5 months ago

Coverage Status

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