Skip to content

Conversation

@cvanelteren
Copy link
Collaborator

Closes #200

With the improved Configurator instantiation, we can now more easily allow for cycle passing to enhance user experience to define default cycle colors. This PR introduces the ability for users to pass on lists of colors or Cycle objects directly.

@cvanelteren cvanelteren changed the title Allow cycle instance Feature: allow cycle objects to be set on rc Oct 25, 2025
@cvanelteren cvanelteren requested a review from Copilot October 25, 2025 15:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables users to set cycle objects directly on the rc configuration, improving user experience for defining default cycle colors. Users can now pass color lists or Cycle objects in addition to string names.

Key Changes:

  • Extended _validate_cmap function to handle Cycle objects and color lists when validating cycle configurations
  • Added test coverage for different cycle input formats (string names, color lists, Cycle objects, and invalid inputs)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
ultraplot/internals/rcsetup.py Modified _validate_cmap to accept and validate Cycle objects and iterables when cycle=True parameter is set
ultraplot/tests/test_config.py Added parameterized test to verify cycle setting behavior with various input types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cvanelteren cvanelteren enabled auto-merge (squash) October 25, 2025 15:07
@codecov
Copy link

codecov bot commented Oct 25, 2025

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/internals/rcsetup.py 87.50% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@cvanelteren cvanelteren disabled auto-merge October 25, 2025 15:13
@cvanelteren cvanelteren merged commit 4ac496f into Ultraplot:main Oct 25, 2025
25 checks passed
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.

how to set the default color cycle

1 participant