diff --git a/.github/workflows/release_workflow.yml b/.github/workflows/release_workflow.yml index 522a8f2..96cc89c 100644 --- a/.github/workflows/release_workflow.yml +++ b/.github/workflows/release_workflow.yml @@ -1,13 +1,13 @@ name: Release Alpha and Propose Stable on: + workflow_dispatch: pull_request: types: [closed] branches: [dev] jobs: publish_alpha: - if: github.event.pull_request.merged == true uses: TigreGotico/gh-automations/.github/workflows/publish-alpha.yml@master secrets: inherit with: @@ -23,7 +23,7 @@ jobs: needs: publish_alpha runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Send message to Matrix bots channel id: matrix-chat-message uses: fadenb/matrix-chat-message@v0.0.6 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5169583..b55c57b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,16 @@ # Changelog -## [0.0.8a2](https://github.com/OpenVoiceOS/ovos-color-parser/tree/0.0.8a2) (2025-03-30) +## [0.0.9a1](https://github.com/OpenVoiceOS/ovos-color-parser/tree/0.0.9a1) (2025-10-26) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-color-parser/compare/0.0.8a1...0.0.8a2) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-color-parser/compare/0.0.8...0.0.9a1) -**Merged pull requests:** - -- es-es/translate [\#27](https://github.com/OpenVoiceOS/ovos-color-parser/pull/27) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app)) - -## [0.0.8a1](https://github.com/OpenVoiceOS/ovos-color-parser/tree/0.0.8a1) (2024-12-11) +**Fixed bugs:** -[Full Changelog](https://github.com/OpenVoiceOS/ovos-color-parser/compare/0.0.7...0.0.8a1) +- Error with black color [\#29](https://github.com/OpenVoiceOS/ovos-color-parser/issues/29) **Merged pull requests:** -- de-de/translate [\#24](https://github.com/OpenVoiceOS/ovos-color-parser/pull/24) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app)) +- fixes https://github.com/OpenVoiceOS/ovos-color-parser/issues/29 [\#30](https://github.com/OpenVoiceOS/ovos-color-parser/pull/30) ([builderjer](https://github.com/builderjer)) diff --git a/downstream_report.txt b/downstream_report.txt index 37917f6..0eb2e5e 100644 --- a/downstream_report.txt +++ b/downstream_report.txt @@ -1,2 +1,2 @@ -ovos-color-parser==0.0.8a1 +ovos-color-parser==0.0.8 └── ovos-skill-color-picker==0.0.7 [requires: ovos-color-parser] diff --git a/ovos_color_parser/matching.py b/ovos_color_parser/matching.py index dd51b8c..f24caee 100644 --- a/ovos_color_parser/matching.py +++ b/ovos_color_parser/matching.py @@ -114,7 +114,11 @@ def match_color_automaton(cls, description: str, lang: str = "en", if s >= 0.15: #print(f"DEBUG: matched fuzzy color -> {(n, h, s)}") weights.append(s) - candidates.append(HLSColor.from_hex_str(h, name=n)) + try: + candidates.append(HLSColor.from_hex_str(h, name=n)) + except ValueError as e: + #print(f"DEBUG: {e}") + pass else: hex_strs = cls.match_automaton(automaton, description) for hex_str in hex_strs: diff --git a/ovos_color_parser/models.py b/ovos_color_parser/models.py index 5fee275..0cbb852 100644 --- a/ovos_color_parser/models.py +++ b/ovos_color_parser/models.py @@ -55,9 +55,16 @@ def hex_str(self) -> str: def from_hex_str(hex_str: str, name: Optional[str] = None, description: Optional[str] = None) -> 'sRGBAColor': if hex_str.startswith('#'): hex_str = hex_str[1:] - r = int(hex_str[0:2], 16) - g = int(hex_str[2:4], 16) - b = int(hex_str[4:6], 16) + if len(hex_str) == 6: + r = int(hex_str[0:2], 16) + g = int(hex_str[2:4], 16) + b = int(hex_str[4:6], 16) + elif len(hex_str) == 3: + r = int(hex_str[0:1] * 2, 16) + g = int(hex_str[1:2] * 2, 16) + b = int(hex_str[2:3] * 2, 16) + else: + raise ValueError(f"Invalid hex sting {hex_str}") return sRGBAColor(r, g, b, name=name, description=description) def __post_init__(self): diff --git a/ovos_color_parser/version.py b/ovos_color_parser/version.py index e157dbf..8775b03 100644 --- a/ovos_color_parser/version.py +++ b/ovos_color_parser/version.py @@ -1,6 +1,6 @@ # START_VERSION_BLOCK VERSION_MAJOR = 0 VERSION_MINOR = 0 -VERSION_BUILD = 8 -VERSION_ALPHA = 0 +VERSION_BUILD = 9 +VERSION_ALPHA = 1 # END_VERSION_BLOCK