Skip to content

Commit

Permalink
Merge pull request #115 from ds-wizard/release/3.27.0
Browse files Browse the repository at this point in the history
Release 3.27.0
  • Loading branch information
MarekSuchanek authored Sep 5, 2023
2 parents 20d4072 + 0b4f281 commit 788fce0
Show file tree
Hide file tree
Showing 51 changed files with 618 additions and 167 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]


## [3.27.0]

Released for version consistency with other DSW tools.

## [3.26.1]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -132,3 +136,4 @@ Released for version consistency with other DSW tools.
[3.25.0]: /../../tree/v3.25.0
[3.26.0]: /../../tree/v3.26.0
[3.26.1]: /../../tree/v3.26.1
[3.27.0]: /../../tree/v3.27.0
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 = "3.26.1"
version = "3.27.0"
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==3.26.1",
"dsw-database==3.27.0",
]

[project.urls]
Expand Down
4 changes: 2 additions & 2 deletions packages/dsw-command-queue/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
psycopg==3.1.9
psycopg-binary==3.1.9
psycopg==3.1.10
psycopg-binary==3.1.10
PyYAML==6.0.1
tenacity==8.2.2
typing_extensions==4.7.1
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]


## [3.27.0]

Released for version consistency with other DSW tools.

## [3.26.1]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -140,3 +144,4 @@ Released for version consistency with other DSW tools.
[3.25.0]: /../../tree/v3.25.0
[3.26.0]: /../../tree/v3.26.0
[3.26.1]: /../../tree/v3.26.1
[3.27.0]: /../../tree/v3.27.0
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 = "3.26.1"
version = "3.27.0"
description = 'Library for DSW config manipulation'
readme = 'README.md'
keywords = ['dsw', 'config', 'yaml', 'parser']
Expand Down
4 changes: 2 additions & 2 deletions packages/dsw-config/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
certifi==2023.7.22
PyYAML==6.0.1
sentry-sdk==1.28.1
urllib3==1.26.16
sentry-sdk==1.29.2
urllib3==2.0.4
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]


## [3.27.0]

Released for version consistency with other DSW tools.

## [3.26.1]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -180,3 +184,4 @@ Released for version consistency with other DSW tools.
[3.25.0]: /../../tree/v3.25.0
[3.26.0]: /../../tree/v3.26.0
[3.26.1]: /../../tree/v3.26.1
[3.27.0]: /../../tree/v3.27.0
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,4 +6,4 @@
DEFAULT_PLACEHOLDER = '<<|APP-ID|>>'
NULL_UUID = '00000000-0000-0000-0000-000000000000'
PROG_NAME = 'dsw-data-seeder'
VERSION = '3.26.1'
VERSION = '3.27.0'
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 = "3.26.1"
version = "3.27.0"
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==3.26.1",
"dsw-config==3.26.1",
"dsw-database==3.26.1",
"dsw-storage==3.26.1",
"dsw-command-queue==3.27.0",
"dsw-config==3.27.0",
"dsw-database==3.27.0",
"dsw-storage==3.27.0",
]

[project.urls]
Expand Down
10 changes: 5 additions & 5 deletions packages/dsw-data-seeder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
certifi==2023.7.22
click==8.1.6
click==8.1.7
minio==7.1.15
python-dateutil==2.8.2
psycopg==3.1.9
psycopg-binary==3.1.9
psycopg==3.1.10
psycopg-binary==3.1.10
PyYAML==6.0.1
sentry-sdk==1.28.1
sentry-sdk==1.29.2
six==1.16.0
tenacity==8.2.2
typing_extensions==4.7.1
tzdata==2023.3
urllib3==1.26.16
urllib3==2.0.4
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]


## [3.27.0]

Released for version consistency with other DSW tools.

## [3.26.1]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -147,3 +151,4 @@ Released for version consistency with other DSW tools.
[3.25.1]: /../../tree/v3.25.1
[3.26.0]: /../../tree/v3.26.0
[3.26.1]: /../../tree/v3.26.1
[3.27.0]: /../../tree/v3.27.0
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 = "3.26.1"
version = "3.27.0"
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==3.26.1",
"dsw-config==3.27.0",
]

[project.urls]
Expand Down
4 changes: 2 additions & 2 deletions packages/dsw-database/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
psycopg==3.1.9
psycopg-binary==3.1.9
psycopg==3.1.10
psycopg-binary==3.1.10
PyYAML==6.0.1
tenacity==8.2.2
typing_extensions==4.7.1
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]


## [3.27.0]

Released for version consistency with other DSW tools.

## [3.26.1]

Released for version consistency with other DSW tools.
Expand Down Expand Up @@ -171,3 +175,4 @@ Released for version consistency with other DSW tools.
[3.25.0]: /../../tree/v3.25.0
[3.26.0]: /../../tree/v3.26.0
[3.26.1]: /../../tree/v3.26.1
[3.27.0]: /../../tree/v3.27.0
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 = '3.26.1'
VERSION = '3.27.0'


class DocumentState:
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 = "3.26.1"
version = "3.27.0"
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==3.26.1",
"dsw-config==3.26.1",
"dsw-database==3.26.1",
"dsw-storage==3.26.1",
"dsw-command-queue==3.27.0",
"dsw-config==3.27.0",
"dsw-database==3.27.0",
"dsw-storage==3.27.0",
]

[project.urls]
Expand Down
16 changes: 8 additions & 8 deletions packages/dsw-document-worker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ Brotli==1.0.9
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
click==8.1.6
click==8.1.7
cssselect2==0.7.0
fonttools==4.41.1
fonttools==4.42.0
html5lib==1.1
idna==3.4
isodate==0.6.1
Expand All @@ -15,27 +15,27 @@ mdx-breakless-lists==1.0.1
minio==7.1.15
pathvalidate==3.1.0
pdfrw==0.4
Pillow==9.5.0
psycopg==3.1.9
psycopg-binary==3.1.9
Pillow==10.0.0
psycopg==3.1.10
psycopg-binary==3.1.10
pycparser==2.21
pydyf==0.7.0
pyparsing==3.1.1
pyphen==0.14.0
python-dateutil==2.8.2
python-slugify==8.0.1
PyYAML==6.0.1
rdflib==6.3.2
rdflib==7.0.0
rdflib-jsonld==0.6.2
requests==2.31.0
sentry-sdk==1.28.1
sentry-sdk==1.29.2
six==1.16.0
tenacity==8.2.2
text-unidecode==1.3
tinycss2==1.2.1
typing_extensions==4.7.1
tzdata==2023.3
urllib3==1.26.16
urllib3==2.0.4
weasyprint==59.0
webencodings==0.5.1
XlsxWriter==3.1.2
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]


## [3.27.0]

### Added

- Notification emails about API keys

## [3.26.1]

### Fixed
Expand Down Expand Up @@ -155,3 +161,4 @@ Released for version consistency with other DSW tools.
[3.25.0]: /../../tree/v3.25.0
[3.26.0]: /../../tree/v3.26.0
[3.26.1]: /../../tree/v3.26.1
[3.27.0]: /../../tree/v3.27.0
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,4 +5,4 @@
DEFAULT_ENCODING = 'utf-8'
NULL_UUID = '00000000-0000-0000-0000-000000000000'
PROG_NAME = 'dsw-mailer'
VERSION = '3.26.1'
VERSION = '3.27.0'
18 changes: 17 additions & 1 deletion packages/dsw-mailer/dsw/mailer/templates.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import datetime
import dateutil.parser
import jinja2
import json
import logging
import pathlib

from typing import Optional
from typing import Optional, Union

from .config import MailerConfig, MailConfig
from .consts import DEFAULT_ENCODING
Expand Down Expand Up @@ -68,8 +70,14 @@ def __init__(self, cfg: MailerConfig, workdir: pathlib.Path):
extensions=['jinja2.ext.do'],
)
self.templates = dict() # type: dict[str, MailTemplate]
self._set_filters()
self._load_templates()

def _set_filters(self):
self.j2_env.filters.update({
'datetime_format': datetime_format,
})

def _load_jinja2(self, file_path: pathlib.Path) -> Optional[jinja2.Template]:
if file_path.exists() and file_path.is_file():
return self.j2_env.get_template(
Expand Down Expand Up @@ -153,3 +161,11 @@ def render(self, rq: MessageRequest, cfg: MailConfig) -> MailMessage:
mail_name=used_cfg.name,
mail_from=used_cfg.email,
)


def datetime_format(iso_timestamp: Union[None, datetime.datetime, str], fmt: str):
if iso_timestamp is None:
return ''
if not isinstance(iso_timestamp, datetime.datetime):
iso_timestamp = dateutil.parser.isoparse(iso_timestamp)
return iso_timestamp.strftime(fmt)
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 = "3.26.1"
version = "3.27.0"
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==3.26.1",
"dsw-config==3.26.1",
"dsw-database==3.26.1",
"dsw-command-queue==3.27.0",
"dsw-config==3.27.0",
"dsw-database==3.27.0",
]

[project.urls]
Expand Down
12 changes: 6 additions & 6 deletions packages/dsw-mailer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
certifi==2023.7.22
click==8.1.6
click==8.1.7
dkimpy==1.1.5
dnspython==2.4.1
dnspython==2.4.2
Jinja2==3.1.2
MarkupSafe==2.1.3
pathvalidate==3.1.0
psycopg==3.1.9
psycopg-binary==3.1.9
psycopg==3.1.10
psycopg-binary==3.1.10
python-dateutil==2.8.2
PyYAML==6.0.1
sentry-sdk==1.28.1
sentry-sdk==1.29.2
six==1.16.0
tenacity==8.2.2
typing_extensions==4.7.1
tzdata==2023.3
urllib3==1.26.16
urllib3==2.0.4
Loading

0 comments on commit 788fce0

Please sign in to comment.