Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Comments

chore: echarts type and add settings property#28

Merged
SAKURA-CAT merged 3 commits intomainfrom
feat/upgrad-settings
May 15, 2025
Merged

chore: echarts type and add settings property#28
SAKURA-CAT merged 3 commits intomainfrom
feat/upgrad-settings

Conversation

@SAKURA-CAT
Copy link
Member

This pull request includes updates to the swankit library, focusing on versioning, feature additions, and enhancements to the LazySettings class. It also introduces a new unit test for the LazySettings class. Below are the key changes grouped by theme:

Versioning Update:

  • Updated the version in pyproject.toml from 0.1.7 to 0.1.8 to reflect new changes.

Feature Additions:

  • Added a new chart type, ECHARTS, to the ChartItem enumeration in swankit/core/data.py.
  • Introduced a new tags property in the LazySettings class, allowing optional tagging with a setter that enforces immutability after the first assignment. [1] [2]

Enhancements to LazySettings:

  • Updated type hints for several properties in LazySettings (exp_colors, description) to make them optional, improving flexibility. [1] [2]

Unit Testing:

  • Added a new unit test, test_lazy_settings, in test/unit/core/test_settings.py to validate the behavior of the LazySettings class, including immutability checks for properties.

@SAKURA-CAT SAKURA-CAT requested a review from Copilot May 15, 2025 10:23
@SAKURA-CAT SAKURA-CAT self-assigned this May 15, 2025
@SAKURA-CAT SAKURA-CAT added the enhancement New feature or request label May 15, 2025
Copy link

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

A maintenance PR updating versioning, adding new features to the LazySettings class, and extending chart types and unit tests.

  • Updated pyproject.toml version to 0.1.8.
  • Added a new ECHARTS ChartItem in swankit/core/data.py.
  • Enhanced LazySettings by introducing optional type hints and an immutable tags property, with new related unit tests.

Reviewed Changes

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

File Description
test/unit/core/test_settings.py Added unit tests for LazySettings immutability behavior using try-except for exception checking.
swankit/core/settings.py Updated type hints for LazySettings and added a new immutable tags property.
swankit/core/data.py Introduced a new chart type ECHARTS to the ChartItem enum.
pyproject.toml Updated version from 0.1.7 to 0.1.8 to reflect the latest changes.

@SAKURA-CAT SAKURA-CAT merged commit 2440703 into main May 15, 2025
5 checks passed
@SAKURA-CAT SAKURA-CAT deleted the feat/upgrad-settings branch May 15, 2025 10:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant