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

labels added, custom cmaps added also if they are not in styles #1057

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

konstntokas
Copy link
Contributor

@konstntokas konstntokas commented Aug 8, 2024

Closes #1046 second part; see discussion comment and comments below

CHANGES.md will not be updated, as it is already updated in #1055.

Checklist:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/source/*
  • Changes documented in CHANGES.md
  • GitHub CI passes
  • AppVeyor CI passes
  • Test coverage remains or increases (target 100%)

@konstntokas konstntokas requested a review from forman August 8, 2024 13:25
@konstntokas
Copy link
Contributor Author

  • The labels are published now at the endpoint /colorbar.
  • All color maps are published given in the section CustomColorMaps, even if they are not used in Styles

Screenshot from 2024-08-08 15-44-25

@@ -403,6 +403,7 @@ def test_create_colormap_from_config_color_entry_object(self):
"name": "my_cmap",
"type": "continuous",
"colors": [[0.0, "red"], [12.0, "#0000FF"], [24.0, [0, 1, 0, 0.3]]],
"labels": ["low", "medium", "high"],
Copy link
Member

Choose a reason for hiding this comment

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

That's not correct - at least not what was specified:

type ColorEntryTuple = [number, Color] | [number, Color, label];

See also docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the update. Is that okay?

Screenshot from 2024-08-08 17-03-44

name=cmap_config["Identifier"],
type=cmap_config["Type"],
colors=colors,
labels=labels,
Copy link
Member

Choose a reason for hiding this comment

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

See comment above.

@konstntokas konstntokas requested a review from forman August 8, 2024 15:05
Copy link
Member

@forman forman left a comment

Choose a reason for hiding this comment

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

Nice!

@forman forman merged commit 055b234 into main Aug 8, 2024
2 of 3 checks passed
@konstntokas konstntokas deleted the konstntokas-1046-custom_color_maps branch August 9, 2024 06:03
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.

Configure custom color maps in xcube server
2 participants