PR: Add default shape argument to colour.quality.cfi2017.sd_reference_illuminant definition.#1320
Open
PR: Add default shape argument to colour.quality.cfi2017.sd_reference_illuminant definition.#1320
shape argument to colour.quality.cfi2017.sd_reference_illuminant definition.#1320Conversation
KelSolaar
requested changes
Jan 7, 2025
Member
KelSolaar
left a comment
There was a problem hiding this comment.
Thanks, this is useful!
I left two small comments.
Comment on lines
+928
to
+935
| def test_default_args(self) -> None: | ||
| """Test :func:`color.quality.CIE2017.sd_reference_illuminant` for | ||
| default shape argument. | ||
| """ | ||
|
|
||
| sd = sd_reference_illuminant(5421) | ||
| assert sd.shape == SPECTRAL_SHAPE_DEFAULT | ||
|
|
Member
There was a problem hiding this comment.
Minor
It is fine to have this test in the test_sd_reference_illuminant method. We are not doing "true" unit tests.
Comment on lines
-69
to
-78
| "SPECTRAL_SHAPE_CIE2017", | ||
| "ROOT_RESOURCES_CIE2017", | ||
| "DataColorimetry_TCS_CIE2017", | ||
| "SPECTRAL_SHAPE_CIE2017", | ||
| "CCT_reference_illuminant", | ||
| "ColourRendering_Specification_CIE2017", | ||
| "DataColorimetry_TCS_CIE2017", | ||
| "colour_fidelity_index_CIE2017", | ||
| "delta_E_to_R_f", | ||
| "load_TCS_CIE2017", | ||
| "CCT_reference_illuminant", | ||
| "sd_reference_illuminant", | ||
| "tcs_colorimetry_data", | ||
| "delta_E_to_R_f", |
Member
There was a problem hiding this comment.
Question
Why addition/removal/order change of the objects?
sd_reference_illuminantshape argument to colour.quality.cfi2017.sd_reference_illuminant definition.
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.
I frequently use this function elsewhere, and having a default shape is convenient. :)