Skip to content

Commit

Permalink
Merge pull request #183 from ds-wizard/hotfix/4.4.1
Browse files Browse the repository at this point in the history
Hotfix 4.4.1
  • Loading branch information
MarekSuchanek authored Mar 19, 2024
2 parents aa087a1 + 82e44a1 commit 53ca43a
Show file tree
Hide file tree
Showing 23 changed files with 93 additions and 32 deletions.
5 changes: 5 additions & 0 deletions packages/dsw-command-queue/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]


## [4.4.1]

Released for version consistency with other DSW tools.

## [4.4.0]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -189,3 +193,4 @@ Released for version consistency with other DSW tools.
[4.3.0]: /../../tree/v4.3.0
[4.3.1]: /../../tree/v4.3.1
[4.4.0]: /../../tree/v4.4.0
[4.4.1]: /../../tree/v4.4.1
4 changes: 2 additions & 2 deletions packages/dsw-command-queue/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'dsw-command-queue'
version = "4.4.0"
version = "4.4.1"
description = 'Library for working with command queue and persistent commands'
readme = 'README.md'
keywords = ['dsw', 'subscriber', 'publisher', 'database', 'queue', 'processing']
Expand All @@ -25,7 +25,7 @@ classifiers = [
requires-python = '>=3.10, <4'
dependencies = [
# DSW
"dsw-database==4.4.0",
"dsw-database==4.4.1",
]

[project.urls]
Expand Down
5 changes: 5 additions & 0 deletions packages/dsw-config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]


## [4.4.1]

Released for version consistency with other DSW tools.

## [4.4.0]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -197,3 +201,4 @@ Released for version consistency with other DSW tools.
[4.3.0]: /../../tree/v4.3.0
[4.3.1]: /../../tree/v4.3.1
[4.4.0]: /../../tree/v4.4.0
[4.4.1]: /../../tree/v4.4.1
2 changes: 1 addition & 1 deletion packages/dsw-config/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'dsw-config'
version = "4.4.0"
version = "4.4.1"
description = 'Library for DSW config manipulation'
readme = 'README.md'
keywords = ['dsw', 'config', 'yaml', 'parser']
Expand Down
5 changes: 5 additions & 0 deletions packages/dsw-data-seeder/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]


## [4.4.1]

Released for version consistency with other DSW tools.

## [4.4.0]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -247,3 +251,4 @@ Released for version consistency with other DSW tools.
[4.3.0]: /../../tree/v4.3.0
[4.3.1]: /../../tree/v4.3.1
[4.4.0]: /../../tree/v4.4.0
[4.4.1]: /../../tree/v4.4.1
2 changes: 1 addition & 1 deletion packages/dsw-data-seeder/dsw/data_seeder/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
DEFAULT_PLACEHOLDER = '<<|TENANT-ID|>>'
NULL_UUID = '00000000-0000-0000-0000-000000000000'
PROG_NAME = 'dsw-data-seeder'
VERSION = '4.4.0'
VERSION = '4.4.1'

VAR_APP_CONFIG_PATH = 'APPLICATION_CONFIG_PATH'
VAR_WORKDIR_PATH = 'WORKDIR_PATH'
Expand Down
10 changes: 5 additions & 5 deletions packages/dsw-data-seeder/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'dsw-data-seeder'
version = "4.4.0"
version = "4.4.1"
description = 'Worker for seeding DSW data'
readme = 'README.md'
keywords = ['data', 'database', 'seed', 'storage']
Expand All @@ -29,10 +29,10 @@ dependencies = [
'sentry-sdk',
'tenacity',
# DSW
"dsw-command-queue==4.4.0",
"dsw-config==4.4.0",
"dsw-database==4.4.0",
"dsw-storage==4.4.0",
"dsw-command-queue==4.4.1",
"dsw-config==4.4.1",
"dsw-database==4.4.1",
"dsw-storage==4.4.1",
]

[project.urls]
Expand Down
5 changes: 5 additions & 0 deletions packages/dsw-database/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]


## [4.4.1]

Released for version consistency with other DSW tools.

## [4.4.0]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -206,3 +210,4 @@ Released for version consistency with other DSW tools.
[4.3.0]: /../../tree/v4.3.0
[4.3.1]: /../../tree/v4.3.1
[4.4.0]: /../../tree/v4.4.0
[4.4.1]: /../../tree/v4.4.1
4 changes: 2 additions & 2 deletions packages/dsw-database/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'dsw-database'
version = "4.4.0"
version = "4.4.1"
description = 'Library for managing DSW database'
readme = 'README.md'
keywords = ['dsw', 'database']
Expand All @@ -26,7 +26,7 @@ dependencies = [
'psycopg[binary]',
'tenacity',
# DSW
"dsw-config==4.4.0",
"dsw-config==4.4.1",
]

[project.urls]
Expand Down
5 changes: 5 additions & 0 deletions packages/dsw-document-worker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]


## [4.4.1]

Released for version consistency with other DSW tools.

## [4.4.0]

### Changed
Expand Down Expand Up @@ -252,3 +256,4 @@ Released for version consistency with other DSW tools.
[4.3.0]: /../../tree/v4.3.0
[4.3.1]: /../../tree/v4.3.1
[4.4.0]: /../../tree/v4.4.0
[4.4.1]: /../../tree/v4.4.1
2 changes: 1 addition & 1 deletion packages/dsw-document-worker/dsw/document_worker/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
EXIT_SUCCESS = 0
NULL_UUID = '00000000-0000-0000-0000-000000000000'
PROG_NAME = 'docworker'
VERSION = '4.4.0'
VERSION = '4.4.1'

VAR_APP_CONFIG_PATH = 'APPLICATION_CONFIG_PATH'
VAR_WORKDIR_PATH = 'WORKDIR_PATH'
Expand Down
10 changes: 5 additions & 5 deletions packages/dsw-document-worker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'dsw-document-worker'
version = "4.4.0"
version = "4.4.1"
description = 'Worker for assembling and transforming documents'
readme = 'README.md'
keywords = ['documents', 'generation', 'jinja2', 'pandoc', 'worker']
Expand Down Expand Up @@ -40,10 +40,10 @@ dependencies = [
'weasyprint',
'XlsxWriter',
# DSW
"dsw-command-queue==4.4.0",
"dsw-config==4.4.0",
"dsw-database==4.4.0",
"dsw-storage==4.4.0",
"dsw-command-queue==4.4.1",
"dsw-config==4.4.1",
"dsw-database==4.4.1",
"dsw-storage==4.4.1",
]

[project.urls]
Expand Down
7 changes: 7 additions & 0 deletions packages/dsw-mailer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]


## [4.4.1]

### Fixed

- Fixed color handling for custom colors in emails

## [4.4.0]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -217,3 +223,4 @@ Released for version consistency with other DSW tools.
[4.3.0]: /../../tree/v4.3.0
[4.3.1]: /../../tree/v4.3.1
[4.4.0]: /../../tree/v4.4.0
[4.4.1]: /../../tree/v4.4.1
2 changes: 1 addition & 1 deletion packages/dsw-mailer/dsw/mailer/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
DEFAULT_ENCODING = 'utf-8'
NULL_UUID = '00000000-0000-0000-0000-000000000000'
PROG_NAME = 'dsw-mailer'
VERSION = '4.4.0'
VERSION = '4.4.1'

VAR_APP_CONFIG_PATH = 'APPLICATION_CONFIG_PATH'
VAR_WORKDIR_PATH = 'WORKDIR_PATH'
24 changes: 19 additions & 5 deletions packages/dsw-mailer/dsw/mailer/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import re

from typing import Optional

Expand All @@ -18,10 +19,23 @@ def contrast_ratio(color1: 'Color', color2: 'Color') -> float:
else:
return l2 / l1

def __init__(self, color_hex: str = '#000000'):
def __init__(self, color_hex: str = '#000000', default: str = '#000000'):
color_hex = self.parse_color_to_hex(color_hex) or default
h = color_hex.lstrip('#')
self.red, self.green, self.blue = tuple(int(h[i:i+2], 16) for i in (0, 2, 4))

@staticmethod
def parse_color_to_hex(color: str) -> Optional[str]:
color = color.strip()
if re.match(r'^#[0-9a-fA-F]{6}$', color):
return color
if re.match(r'^#[0-9a-fA-F]{3}$', color):
r = color[1]
g = color[2]
b = color[3]
return f'#{r}{r}{g}{g}{b}{b}'
return None

@property
def hex(self):
return f'#{self.red:02x}{self.green:02x}{self.blue:02x}'
Expand Down Expand Up @@ -67,8 +81,8 @@ class StyleConfig:
def __init__(self, logo_url: Optional[str], primary_color: str,
illustrations_color: str):
self.logo_url = logo_url
self.primary_color = Color(primary_color)
self.illustrations_color = Color(illustrations_color)
self.primary_color = Color(primary_color, Color.DEFAULT_PRIMARY_HEX)
self.illustrations_color = Color(illustrations_color, Color.DEFAULT_ILLUSTRATIONS_HEX)

def from_dict(self, data: Optional[dict]):
data = data or dict()
Expand All @@ -78,12 +92,12 @@ def from_dict(self, data: Optional[dict]):
self.primary_color = Color(data.get(
'primaryColor',
self.default().primary_color.hex
))
), Color.DEFAULT_PRIMARY_HEX)
if data.get('illustrationsColor', None) is not None:
self.illustrations_color = Color(data.get(
'illustrationsColor',
self.default().illustrations_color.hex,
))
), Color.DEFAULT_ILLUSTRATIONS_HEX)

@classmethod
def default(cls):
Expand Down
8 changes: 4 additions & 4 deletions packages/dsw-mailer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'dsw-mailer'
version = "4.4.0"
version = "4.4.1"
description = 'Worker for sending email notifications'
readme = 'README.md'
keywords = ['email', 'jinja2', 'notification', 'template']
Expand All @@ -31,9 +31,9 @@ dependencies = [
'sentry-sdk',
'tenacity',
# DSW
"dsw-command-queue==4.4.0",
"dsw-config==4.4.0",
"dsw-database==4.4.0",
"dsw-command-queue==4.4.1",
"dsw-config==4.4.1",
"dsw-database==4.4.1",
]

[project.urls]
Expand Down
5 changes: 5 additions & 0 deletions packages/dsw-models/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]


## [4.4.1]

Released for version consistency with other DSW tools.

## [4.4.0]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -120,3 +124,4 @@ Released for version consistency with other DSW tools.
[4.3.0]: /../../tree/v4.3.0
[4.3.1]: /../../tree/v4.3.1
[4.4.0]: /../../tree/v4.4.0
[4.4.1]: /../../tree/v4.4.1
2 changes: 1 addition & 1 deletion packages/dsw-models/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'dsw-models'
version = "4.4.0"
version = "4.4.1"
description = 'Library with DSW models and basic IO operations'
readme = 'README.md'
keywords = ['dsw', 'config', 'yaml', 'parser']
Expand Down
5 changes: 5 additions & 0 deletions packages/dsw-storage/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]


## [4.4.1]

Released for version consistency with other DSW tools.

## [4.4.0]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -187,3 +191,4 @@ Released for version consistency with other DSW tools.
[4.3.0]: /../../tree/v4.3.0
[4.3.1]: /../../tree/v4.3.1
[4.4.0]: /../../tree/v4.4.0
[4.4.1]: /../../tree/v4.4.1
4 changes: 2 additions & 2 deletions packages/dsw-storage/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'dsw-storage'
version = "4.4.0"
version = "4.4.1"
description = 'Library for managing DSW S3 storage'
readme = 'README.md'
keywords = ['dsw', 's3', 'bucket', 'storage']
Expand All @@ -26,7 +26,7 @@ dependencies = [
'minio',
'tenacity',
# DSW
"dsw-config==4.4.0",
"dsw-config==4.4.1",
]

[project.urls]
Expand Down
5 changes: 5 additions & 0 deletions packages/dsw-tdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]


## [4.4.1]

Released for version consistency with other DSW tools.

## [4.4.0]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -409,3 +413,4 @@ Initial DSW Template Development Kit (versioned as part of the [DSW platform](ht
[4.3.0]: /../../tree/v4.3.0
[4.3.1]: /../../tree/v4.3.1
[4.4.0]: /../../tree/v4.4.0
[4.4.1]: /../../tree/v4.4.1
2 changes: 1 addition & 1 deletion packages/dsw-tdk/dsw/tdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re

APP = 'dsw-tdk'
VERSION = '4.4.0'
VERSION = '4.4.1'
METAMODEL_VERSION = 13

REGEX_SEMVER = re.compile(r'^[0-9]+\.[0-9]+\.[0-9]+$')
Expand Down
2 changes: 1 addition & 1 deletion packages/dsw-tdk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'dsw-tdk'
version = "4.4.0"
version = "4.4.1"
description = 'Data Stewardship Wizard Template Development Toolkit'
readme = 'README.md'
keywords = ['documents', 'dsw', 'jinja2', 'template', 'toolkit']
Expand Down

0 comments on commit 53ca43a

Please sign in to comment.