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: Add default shape argument to colour.quality.cfi2017.sd_reference_illuminant definition. #1320

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

tjdcs
Copy link
Contributor

@tjdcs tjdcs commented Jan 3, 2025

I frequently use this function elsewhere, and having a default shape is convenient. :)

@coveralls
Copy link

Coverage Status

coverage: 97.471%. remained the same
when pulling 1a49fff on feature/sd_reference_illum
into 87ea299 on develop.

Copy link
Member

@KelSolaar KelSolaar left a comment

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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",
Copy link
Member

Choose a reason for hiding this comment

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

Question

Why addition/removal/order change of the objects?

@KelSolaar KelSolaar changed the title Add default shape argument to sd_reference_illuminant PR: Add default shape argument to colour.quality.cfi2017.sd_reference_illuminant definition. Jan 7, 2025
@KelSolaar KelSolaar added this to the v0.4.7 milestone Jan 7, 2025
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.

3 participants