diff --git a/.github/workflows/lambda.yml b/.github/workflows/lambda.yml index a514a097..ce20b5c8 100644 --- a/.github/workflows/lambda.yml +++ b/.github/workflows/lambda.yml @@ -5,7 +5,7 @@ on: jobs: package: - name: Lambda Package + name: Lambda ZIP Package runs-on: ubuntu-latest strategy: @@ -46,3 +46,125 @@ jobs: with: name: ${{ matrix.package }}-lambda.zip path: packages/dsw-${{ matrix.package }}/${{ matrix.package }}-lambda.zip + + docker: + name: Lambda Docker Image + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + package: + - dsw-document-worker + + env: + PUBLIC_IMAGE_PREFIX: 'datastewardshipwizard' + DOCKER_META_CONTEXT: '.' + DOCKER_META_FILE: './packages/${{ matrix.package }}/lambda.Dockerfile' + DOCKER_META_PLATFORMS: 'linux/amd64' + DOCKER_META_SUFFIX_LAMBDA: '-lambda' + + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Get Docker image name + id: docker-image-name + run: | + cd packages/${{ matrix.package }} + NAME=$(make docker-image-name) + echo "NAME=$NAME" >> $GITHUB_OUTPUT + + - name: Create build info + run: | + bash scripts/build-info.sh + + # TEST DOCKER IMAGE BUILD + - name: Docker meta [test] + id: meta-test + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.PUBLIC_IMAGE_PREFIX }}/${{ steps.docker-image-name.outputs.NAME }} + tags: | + type=sha + flavor: | + suffix=${{ env.DOCKER_META_SUFFIX_LAMBDA }} + + - name: Docker build [test] + uses: docker/build-push-action@v5 + with: + context: ${{ env.DOCKER_META_CONTEXT }} + file: ${{ env.DOCKER_META_FILE }} + platforms: ${{ env.DOCKER_META_PLATFORMS }} + push: false + tags: ${{ steps.meta-test.outputs.tags }} + labels: ${{ steps.meta-test.outputs.labels }} + + # PREPARE + - name: Docker login [docker.io] + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + + # DEVELOPMENT IMAGES + - name: Docker meta [dev] + id: meta-dev + if: github.event_name != 'pull_request' + uses: docker/metadata-action@v5 + with: + images: | + ${{ secrets.DOCKER_HUB_USERNAME }}/${{ steps.docker-image-name.outputs.NAME }} + tags: | + type=ref,event=branch + flavor: | + suffix=${{ env.DOCKER_META_SUFFIX_LAMBDA }} + + - name: Docker build+push [dev] + uses: docker/build-push-action@v5 + if: github.event_name != 'pull_request' && steps.meta-dev.outputs.tags != '' + with: + context: ${{ env.DOCKER_META_CONTEXT }} + file: ${{ env.DOCKER_META_FILE }} + platforms: ${{ env.DOCKER_META_PLATFORMS }} + push: true + tags: ${{ steps.meta-dev.outputs.tags }} + labels: ${{ steps.meta-dev.outputs.labels }} + + # PUBLIC IMAGES + - name: Docker meta [public] + id: meta-public + if: github.event_name != 'pull_request' + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.PUBLIC_IMAGE_PREFIX }}/${{ steps.docker-image-name.outputs.NAME }} + tags: | + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} + flavor: | + suffix=${{ env.DOCKER_META_SUFFIX_LAMBDA }} + + - name: Docker build+push [public] + uses: docker/build-push-action@v5 + if: github.event_name != 'pull_request' && steps.meta-public.outputs.tags != '' + with: + context: ${{ env.DOCKER_META_CONTEXT }} + file: ${{ env.DOCKER_META_FILE }} + platforms: ${{ env.DOCKER_META_PLATFORMS }} + push: true + tags: ${{ steps.meta-public.outputs.tags }} + labels: ${{ steps.meta-public.outputs.labels }} diff --git a/packages/dsw-command-queue/CHANGELOG.md b/packages/dsw-command-queue/CHANGELOG.md index 6c243cf0..18466b51 100644 --- a/packages/dsw-command-queue/CHANGELOG.md +++ b/packages/dsw-command-queue/CHANGELOG.md @@ -8,6 +8,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.6.0] + +### Fixed + +- Fixed the issue with timezone while retrieving commands + ## [4.5.0] Released for version consistency with other DSW tools. @@ -199,3 +205,4 @@ Released for version consistency with other DSW tools. [4.4.0]: /../../tree/v4.4.0 [4.4.1]: /../../tree/v4.4.1 [4.5.0]: /../../tree/v4.5.0 +[4.6.0]: /../../tree/v4.6.0 diff --git a/packages/dsw-command-queue/dsw/command_queue/command_queue.py b/packages/dsw-command-queue/dsw/command_queue/command_queue.py index e3f50c10..2743eb76 100644 --- a/packages/dsw-command-queue/dsw/command_queue/command_queue.py +++ b/packages/dsw-command-queue/dsw/command_queue/command_queue.py @@ -129,7 +129,7 @@ def fetch_and_process(self) -> bool: cursor = self.db.conn_query.new_cursor(use_dict=True) cursor.execute( query=self.queries.query_get_command(), - params={'now': datetime.datetime.utcnow()}, + params={'now': datetime.datetime.now(tz=datetime.UTC)}, ) result = cursor.fetchall() if len(result) != 1: @@ -148,7 +148,7 @@ def fetch_and_process(self) -> bool: self.db.execute_query( query=self.queries.query_command_done(), attempts=command.attempts + 1, - updated_at=datetime.datetime.utcnow(), + updated_at=datetime.datetime.now(tz=datetime.UTC), uuid=command.uuid, ) except Exception as e: @@ -159,7 +159,7 @@ def fetch_and_process(self) -> bool: query=self.queries.query_command_error(), attempts=command.attempts + 1, error_message=msg, - updated_at=datetime.datetime.utcnow(), + updated_at=datetime.datetime.now(tz=datetime.UTC), uuid=command.uuid, ) diff --git a/packages/dsw-command-queue/dsw/command_queue/query.py b/packages/dsw-command-queue/dsw/command_queue/query.py index 0cbf057a..25c61eab 100644 --- a/packages/dsw-command-queue/dsw/command_queue/query.py +++ b/packages/dsw-command-queue/dsw/command_queue/query.py @@ -22,7 +22,7 @@ def query_get_command(self, exp=2, interval='1 min') -> str: AND attempts < max_attempts AND state != '{CommandState.DONE}' AND state != '{CommandState.IGNORE}' - AND updated_at < (%(now)s - ({exp} ^ attempts - 1) * INTERVAL '{interval}') + AND (updated_at AT TIME ZONE 'UTC') < (%(now)s - ({exp} ^ attempts - 1) * INTERVAL '{interval}') ORDER BY attempts ASC, updated_at DESC LIMIT 1 FOR UPDATE SKIP LOCKED; """ diff --git a/packages/dsw-command-queue/pyproject.toml b/packages/dsw-command-queue/pyproject.toml index 9cfe3397..6c71e78c 100644 --- a/packages/dsw-command-queue/pyproject.toml +++ b/packages/dsw-command-queue/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'dsw-command-queue' -version = "4.5.0" +version = "4.6.0" description = 'Library for working with command queue and persistent commands' readme = 'README.md' keywords = ['dsw', 'subscriber', 'publisher', 'database', 'queue', 'processing'] @@ -25,7 +25,7 @@ classifiers = [ requires-python = '>=3.10, <4' dependencies = [ # DSW - "dsw-database==4.5.0", + "dsw-database==4.6.0", ] [project.urls] diff --git a/packages/dsw-command-queue/requirements.txt b/packages/dsw-command-queue/requirements.txt index 43d0e3cf..09f26251 100644 --- a/packages/dsw-command-queue/requirements.txt +++ b/packages/dsw-command-queue/requirements.txt @@ -1,6 +1,6 @@ -psycopg==3.1.17 -psycopg-binary==3.1.17 +psycopg==3.1.18 +psycopg-binary==3.1.18 PyYAML==6.0.1 tenacity==8.2.3 -typing_extensions==4.9.0 -tzdata==2023.4 +typing_extensions==4.11.0 +tzdata==2024.1 diff --git a/packages/dsw-config/CHANGELOG.md b/packages/dsw-config/CHANGELOG.md index 2162247b..78a645a8 100644 --- a/packages/dsw-config/CHANGELOG.md +++ b/packages/dsw-config/CHANGELOG.md @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.6.0] + +Released for version consistency with other DSW tools. + ## [4.5.0] Released for version consistency with other DSW tools. @@ -207,3 +211,4 @@ Released for version consistency with other DSW tools. [4.4.0]: /../../tree/v4.4.0 [4.4.1]: /../../tree/v4.4.1 [4.5.0]: /../../tree/v4.5.0 +[4.6.0]: /../../tree/v4.6.0 diff --git a/packages/dsw-config/pyproject.toml b/packages/dsw-config/pyproject.toml index d8b07a11..490c1f39 100644 --- a/packages/dsw-config/pyproject.toml +++ b/packages/dsw-config/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'dsw-config' -version = "4.5.0" +version = "4.6.0" description = 'Library for DSW config manipulation' readme = 'README.md' keywords = ['dsw', 'config', 'yaml', 'parser'] diff --git a/packages/dsw-config/requirements.txt b/packages/dsw-config/requirements.txt index 1a561e25..31c082e0 100644 --- a/packages/dsw-config/requirements.txt +++ b/packages/dsw-config/requirements.txt @@ -1,4 +1,4 @@ -certifi==2023.11.17 +certifi==2024.2.2 PyYAML==6.0.1 -sentry-sdk==1.39.2 -urllib3==2.1.0 +sentry-sdk==1.45.0 +urllib3==2.2.1 diff --git a/packages/dsw-data-seeder/CHANGELOG.md b/packages/dsw-data-seeder/CHANGELOG.md index e51b8121..5efb1bf3 100644 --- a/packages/dsw-data-seeder/CHANGELOG.md +++ b/packages/dsw-data-seeder/CHANGELOG.md @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.6.0] + +Released for version consistency with other DSW tools. + ## [4.5.0] Released for version consistency with other DSW tools. @@ -257,3 +261,4 @@ Released for version consistency with other DSW tools. [4.4.0]: /../../tree/v4.4.0 [4.4.1]: /../../tree/v4.4.1 [4.5.0]: /../../tree/v4.5.0 +[4.6.0]: /../../tree/v4.6.0 diff --git a/packages/dsw-data-seeder/Dockerfile b/packages/dsw-data-seeder/Dockerfile index e16984a8..8b6ef1db 100644 --- a/packages/dsw-data-seeder/Dockerfile +++ b/packages/dsw-data-seeder/Dockerfile @@ -1,4 +1,4 @@ -FROM datastewardshipwizard/python-base:4.4.0-3.11-basic as builder +FROM datastewardshipwizard/python-base:4.6.0-3.11-basic as builder WORKDIR /app @@ -15,7 +15,7 @@ RUN python -m pip wheel --no-cache-dir --wheel-dir=/app/wheels -r /app/packages/ && python -m pip wheel --no-cache-dir --no-deps --wheel-dir=/app/wheels /app/packages/dsw-data-seeder -FROM datastewardshipwizard/python-base:4.4.0-3.11-basic +FROM datastewardshipwizard/python-base:4.6.0-3.11-basic ENV APPLICATION_CONFIG_PATH /app/config/application.yml ENV WORKDIR_PATH /home/user/data diff --git a/packages/dsw-data-seeder/dsw/data_seeder/consts.py b/packages/dsw-data-seeder/dsw/data_seeder/consts.py index 2a778875..6144e020 100644 --- a/packages/dsw-data-seeder/dsw/data_seeder/consts.py +++ b/packages/dsw-data-seeder/dsw/data_seeder/consts.py @@ -6,7 +6,7 @@ DEFAULT_PLACEHOLDER = '<<|TENANT-ID|>>' NULL_UUID = '00000000-0000-0000-0000-000000000000' PROG_NAME = 'dsw-data-seeder' -VERSION = '4.5.0' +VERSION = '4.6.0' VAR_APP_CONFIG_PATH = 'APPLICATION_CONFIG_PATH' VAR_WORKDIR_PATH = 'WORKDIR_PATH' diff --git a/packages/dsw-data-seeder/pyproject.toml b/packages/dsw-data-seeder/pyproject.toml index e8e6e737..f6f58a09 100644 --- a/packages/dsw-data-seeder/pyproject.toml +++ b/packages/dsw-data-seeder/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'dsw-data-seeder' -version = "4.5.0" +version = "4.6.0" description = 'Worker for seeding DSW data' readme = 'README.md' keywords = ['data', 'database', 'seed', 'storage'] @@ -29,10 +29,10 @@ dependencies = [ 'sentry-sdk', 'tenacity', # DSW - "dsw-command-queue==4.5.0", - "dsw-config==4.5.0", - "dsw-database==4.5.0", - "dsw-storage==4.5.0", + "dsw-command-queue==4.6.0", + "dsw-config==4.6.0", + "dsw-database==4.6.0", + "dsw-storage==4.6.0", ] [project.urls] diff --git a/packages/dsw-data-seeder/requirements.txt b/packages/dsw-data-seeder/requirements.txt index 27f3237b..d4dd5d84 100644 --- a/packages/dsw-data-seeder/requirements.txt +++ b/packages/dsw-data-seeder/requirements.txt @@ -1,12 +1,12 @@ -certifi==2023.11.17 +certifi==2024.2.2 click==8.1.7 -minio==7.2.3 -psycopg==3.1.17 -psycopg-binary==3.1.17 -python-dateutil==2.8.2 +minio==7.2.7 +psycopg==3.1.18 +psycopg-binary==3.1.18 +python-dateutil==2.9.0 PyYAML==6.0.1 -sentry-sdk==1.39.2 +sentry-sdk==1.45.0 six==1.16.0 tenacity==8.2.3 -typing_extensions==4.9.0 -urllib3==2.1.0 +typing_extensions==4.11.0 +urllib3==2.2.1 diff --git a/packages/dsw-database/CHANGELOG.md b/packages/dsw-database/CHANGELOG.md index 6be7f41c..11ca6876 100644 --- a/packages/dsw-database/CHANGELOG.md +++ b/packages/dsw-database/CHANGELOG.md @@ -8,6 +8,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.6.0] + +### Fixed + +- Use UTC timezone consistently + ## [4.5.0] Released for version consistency with other DSW tools. @@ -216,3 +222,4 @@ Released for version consistency with other DSW tools. [4.4.0]: /../../tree/v4.4.0 [4.4.1]: /../../tree/v4.4.1 [4.5.0]: /../../tree/v4.5.0 +[4.6.0]: /../../tree/v4.6.0 diff --git a/packages/dsw-database/dsw/database/database.py b/packages/dsw-database/dsw/database/database.py index d44a86a8..2d31a96c 100644 --- a/packages/dsw-database/dsw/database/database.py +++ b/packages/dsw-database/dsw/database/database.py @@ -409,7 +409,7 @@ def update_component_info(self, name: str, version: str, built_at: datetime.date with self.conn_query.new_cursor(use_dict=True) as cursor: if not self._check_table_exists(table_name='component'): return None - ts_now = datetime.datetime.utcnow() + ts_now = datetime.datetime.now(tz=datetime.UTC) try: cursor.execute( query=self.UPDATE_COMPONENT_INFO, diff --git a/packages/dsw-database/pyproject.toml b/packages/dsw-database/pyproject.toml index 0cdcac10..55edc4de 100644 --- a/packages/dsw-database/pyproject.toml +++ b/packages/dsw-database/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'dsw-database' -version = "4.5.0" +version = "4.6.0" description = 'Library for managing DSW database' readme = 'README.md' keywords = ['dsw', 'database'] @@ -26,7 +26,7 @@ dependencies = [ 'psycopg[binary]', 'tenacity', # DSW - "dsw-config==4.5.0", + "dsw-config==4.6.0", ] [project.urls] diff --git a/packages/dsw-database/requirements.txt b/packages/dsw-database/requirements.txt index 43d0e3cf..09f26251 100644 --- a/packages/dsw-database/requirements.txt +++ b/packages/dsw-database/requirements.txt @@ -1,6 +1,6 @@ -psycopg==3.1.17 -psycopg-binary==3.1.17 +psycopg==3.1.18 +psycopg-binary==3.1.18 PyYAML==6.0.1 tenacity==8.2.3 -typing_extensions==4.9.0 -tzdata==2023.4 +typing_extensions==4.11.0 +tzdata==2024.1 diff --git a/packages/dsw-document-worker/CHANGELOG.md b/packages/dsw-document-worker/CHANGELOG.md index 842abc28..ca0cde3e 100644 --- a/packages/dsw-document-worker/CHANGELOG.md +++ b/packages/dsw-document-worker/CHANGELOG.md @@ -8,6 +8,17 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.6.0] + +### Added + +- Support lambda deployment + +### Fixed + +- Markdown filter in Jinja uses training backslashes for newlines +- Use UTC timezone consistently + ## [4.5.0] Released for version consistency with other DSW tools. @@ -262,3 +273,4 @@ Released for version consistency with other DSW tools. [4.4.0]: /../../tree/v4.4.0 [4.4.1]: /../../tree/v4.4.1 [4.5.0]: /../../tree/v4.5.0 +[4.6.0]: /../../tree/v4.6.0 diff --git a/packages/dsw-document-worker/Dockerfile b/packages/dsw-document-worker/Dockerfile index 6f3916ca..d434844c 100644 --- a/packages/dsw-document-worker/Dockerfile +++ b/packages/dsw-document-worker/Dockerfile @@ -1,4 +1,4 @@ -FROM datastewardshipwizard/python-base:4.4.0-3.11-docworker as builder +FROM datastewardshipwizard/python-base:4.6.0-3.11-docworker as builder ARG TARGETARCH @@ -17,7 +17,7 @@ RUN python -m pip wheel --wheel-dir=/app/wheels -r /app/packages/dsw-document-wo && python -m pip wheel --no-deps --wheel-dir=/app/wheels /app/packages/dsw-document-worker/addons/* \ && python -m pip wheel --no-deps --wheel-dir=/app/wheels /app/packages/dsw-document-worker -FROM datastewardshipwizard/python-base:4.4.0-3.11-docworker +FROM datastewardshipwizard/python-base:4.6.0-3.11-docworker ENV APPLICATION_CONFIG_PATH /app/config/application.yml ENV WORKDIR_PATH /tmp/docworker diff --git a/packages/dsw-document-worker/addons/pandoc-docx-pagebreak-py/setup.py b/packages/dsw-document-worker/addons/pandoc-docx-pagebreak-py/setup.py index ff7db0c3..c24bf82b 100644 --- a/packages/dsw-document-worker/addons/pandoc-docx-pagebreak-py/setup.py +++ b/packages/dsw-document-worker/addons/pandoc-docx-pagebreak-py/setup.py @@ -20,7 +20,7 @@ keywords="pandoc filter docx", py_modules=["docx_pagebreak"], install_requires=[ - "panflute==2.3.0", + "panflute==2.3.1", ], entry_points={ "console_scripts": [ diff --git a/packages/dsw-document-worker/dsw/document_worker/__init__.py b/packages/dsw-document-worker/dsw/document_worker/__init__.py index cfabb236..bd70a37f 100644 --- a/packages/dsw-document-worker/dsw/document_worker/__init__.py +++ b/packages/dsw-document-worker/dsw/document_worker/__init__.py @@ -1,3 +1,4 @@ from .cli import main +from .handlers import lambda_handler -__all__ = ['main'] +__all__ = ['main', 'lambda_handler'] diff --git a/packages/dsw-document-worker/dsw/document_worker/consts.py b/packages/dsw-document-worker/dsw/document_worker/consts.py index 8037c9e4..ae2717d6 100644 --- a/packages/dsw-document-worker/dsw/document_worker/consts.py +++ b/packages/dsw-document-worker/dsw/document_worker/consts.py @@ -6,7 +6,7 @@ EXIT_SUCCESS = 0 NULL_UUID = '00000000-0000-0000-0000-000000000000' PROG_NAME = 'docworker' -VERSION = '4.5.0' +VERSION = '4.6.0' VAR_APP_CONFIG_PATH = 'APPLICATION_CONFIG_PATH' VAR_WORKDIR_PATH = 'WORKDIR_PATH' diff --git a/packages/dsw-document-worker/dsw/document_worker/handlers.py b/packages/dsw-document-worker/dsw/document_worker/handlers.py new file mode 100644 index 00000000..be7f439b --- /dev/null +++ b/packages/dsw-document-worker/dsw/document_worker/handlers.py @@ -0,0 +1,15 @@ +import os +import pathlib + +from .cli import load_config_str +from .consts import VAR_APP_CONFIG_PATH, VAR_WORKDIR_PATH +from .worker import DocumentWorker + + +def lambda_handler(event, context): + config_path = pathlib.Path(os.getenv(VAR_APP_CONFIG_PATH, '/var/task/application.yml')) + workdir_path = pathlib.Path(os.getenv(VAR_WORKDIR_PATH, '/var/task/templates')) + + config = load_config_str(config_path.read_text()) + doc_worker = DocumentWorker(config, workdir_path) + doc_worker.run_once() diff --git a/packages/dsw-document-worker/dsw/document_worker/templates/filters.py b/packages/dsw-document-worker/dsw/document_worker/templates/filters.py index 097c4b7b..1f53547d 100644 --- a/packages/dsw-document-worker/dsw/document_worker/templates/filters.py +++ b/packages/dsw-document-worker/dsw/document_worker/templates/filters.py @@ -4,6 +4,7 @@ import logging import markupsafe import markdown +import re from typing import Any, Union, Optional @@ -14,6 +15,42 @@ LOG = logging.getLogger(__name__) +class DSWMarkdownExt(markdown.extensions.Extension): + def extendMarkdown(self, md): + md.preprocessors.register(DSWMarkdownProcessor(md), 'dsw_markdown', 27) + md.registerExtension(self) + + +class DSWMarkdownProcessor(markdown.preprocessors.Preprocessor): + + def __init__(self, md): + super().__init__(md) + self.LI_RE = re.compile(r'^[ ]*((\d+\.)|[*+-])[ ]+.*') + + def run(self, lines): + prev_li = False + new_lines = [] + + for line in lines: + # Add line break before the first list item + if self.LI_RE.match(line): + if not prev_li: + new_lines.append('') + prev_li = True + elif line == '': + prev_li = False + + # Replace trailing un-escaped backslash with (supported) two spaces + _line = line.rstrip('\\') + if line[-1:] == '\\' and (len(line) - len(_line)) % 2 == 1: + new_lines.append(f'{line[:-1]} ') + continue + + new_lines.append(line) + + return new_lines + + class _JinjaEnv: def __init__(self): @@ -81,7 +118,7 @@ def xmarkdown(md_text: str): return markupsafe.Markup(markdown.markdown( text=md_text, extensions=[ - 'mdx_breakless_lists', + DSWMarkdownExt(), ] )) diff --git a/packages/dsw-document-worker/dsw/document_worker/templates/steps/conversion.py b/packages/dsw-document-worker/dsw/document_worker/templates/steps/conversion.py index 532d8fb7..183b900e 100644 --- a/packages/dsw-document-worker/dsw/document_worker/templates/steps/conversion.py +++ b/packages/dsw-document-worker/dsw/document_worker/templates/steps/conversion.py @@ -11,16 +11,27 @@ class WeasyPrintStep(Step): OUTPUT_FORMAT = FileFormats.PDF def __init__(self, template, options: dict): + import weasyprint super().__init__(template, options) - # Render options - self.wp_presentational_hints = options.get('render.presentational_hints', 'false').lower() == 'true' - self.wp_optimize_size = tuple(options.get('render.optimize_size', 'fonts').split(',')) - self.wp_forms = options.get('render.forms', 'false').lower() == 'true' # PDF options + self.wp_options = weasyprint.DEFAULT_OPTIONS + self.wp_update_options(options) self.wp_zoom = float(options.get('pdf.zoom', '1')) - self.wp_variant = options.get('pdf.variant', None) - self.wp_version = options.get('pdf.version', None) - self.wp_custom_metadata = options.get('pdf.custom_metadata', 'false').lower() == 'true' + + def wp_update_options(self, options: dict): + optimize_size = tuple(options.get('render.optimize_size', 'fonts').split(',')) + self.wp_options.update({ + 'pdf_identifier': options.get('pdf.identifier', 'false').lower() == 'true', + 'pdf_variant': options.get('pdf.variant', None), + 'pdf_version': options.get('pdf.version', None), + 'pdf_forms': options.get('render.forms', 'false').lower() == 'true', + 'uncompressed_pdf': options.get('pdf.uncompressed', 'false').lower() == 'true', + 'custom_metadata': options.get('pdf.custom_metadata', 'false').lower() == 'true', + 'presentational_hints': options.get('render.presentational_hints', 'false').lower() == 'true', + 'optimize_images': 'images' in optimize_size, + 'jpeg_quality': int(options.get('render.jpeg_quality', '95')), + 'dpi': int(options.get('render.dpi', '96')), + }) def execute_first(self, context: dict) -> DocumentFile: return self.raise_exc(f'Step "{self.NAME}" cannot be first') @@ -36,18 +47,11 @@ def execute_follow(self, document: DocumentFile, context: dict) -> DocumentFile: media_type='print', base_url=file_uri.as_uri(), ) - data = wp_html.render( - stylesheets=[], # not used now (should be in CSS) - presentational_hints=self.wp_presentational_hints, - optimize_size=self.wp_optimize_size, + data = wp_html.write_pdf( + zoom=self.wp_zoom, font_config=None, # not used now (should be in CSS) counter_style=None, # not used now (should be in CSS) - forms=self.wp_forms, - ).write_pdf( - zoom=self.wp_zoom, - variant=self.wp_variant, - version=self.wp_version, - custom_metadata=self.wp_custom_metadata, + options=self.options, ) return DocumentFile( file_format=self.OUTPUT_FORMAT, diff --git a/packages/dsw-document-worker/dsw/document_worker/templates/steps/excel.py b/packages/dsw-document-worker/dsw/document_worker/templates/steps/excel.py index e3905ac2..1f9032af 100644 --- a/packages/dsw-document-worker/dsw/document_worker/templates/steps/excel.py +++ b/packages/dsw-document-worker/dsw/document_worker/templates/steps/excel.py @@ -56,7 +56,7 @@ def _cell_writer_datetime(worksheet: Worksheet, pos_args, item, cell_format): try: value = dateutil.parser.parse(item['value']) except Exception: - value = datetime.datetime.utcnow() + value = datetime.datetime.now(tz=datetime.UTC) worksheet.write_datetime( *pos_args, date=value, diff --git a/packages/dsw-document-worker/dsw/document_worker/templates/templates.py b/packages/dsw-document-worker/dsw/document_worker/templates/templates.py index 427ac847..32054333 100644 --- a/packages/dsw-document-worker/dsw/document_worker/templates/templates.py +++ b/packages/dsw-document-worker/dsw/document_worker/templates/templates.py @@ -61,7 +61,7 @@ def __init__(self, tenant_uuid: str, template_dir: pathlib.Path, db_template: TemplateComposite): self.tenant_uuid = tenant_uuid self.template_dir = template_dir - self.last_used = datetime.datetime.utcnow() + self.last_used = datetime.datetime.now(tz=datetime.UTC) self.db_template = db_template self.template_id = self.db_template.template.id self.formats = dict() # type: dict[str, Format] @@ -216,7 +216,7 @@ def __getitem__(self, format_uuid: str) -> Format: return self.formats[format_uuid] def render(self, format_uuid: str, context: dict) -> DocumentFile: - self.last_used = datetime.datetime.utcnow() + self.last_used = datetime.datetime.now(tz=datetime.UTC) return self[format_uuid].execute(context) @@ -293,7 +293,7 @@ def _clear_template(self, tenant_uuid: str, template_id: str): def cleanup(self): # TODO: configurable - threshold = datetime.datetime.utcnow() - datetime.timedelta(days=7) + threshold = datetime.datetime.now(tz=datetime.UTC) - datetime.timedelta(days=7) for tenant_uuid, templates in self._templates.items(): for template_id, template in templates.items(): if template.last_used < threshold: diff --git a/packages/dsw-document-worker/dsw/document_worker/worker.py b/packages/dsw-document-worker/dsw/document_worker/worker.py index 8a6f6b41..79d615b2 100644 --- a/packages/dsw-document-worker/dsw/document_worker/worker.py +++ b/packages/dsw-document-worker/dsw/document_worker/worker.py @@ -103,7 +103,7 @@ def get_document(self): job_id=self.doc_uuid, message='Document record not found in database', ) - self.doc.retrieved_at = datetime.datetime.now() + self.doc.retrieved_at = datetime.datetime.now(tz=datetime.UTC) LOG.info(f'Job "{self.doc_uuid}" details received') # verify state state = self.doc.state @@ -215,7 +215,7 @@ def finalize(self): doc = self.safe_doc final_file = self.safe_final_file file_name = DocumentNameGiver.name_document(doc, final_file) - doc.finished_at = datetime.datetime.now() + doc.finished_at = datetime.datetime.now(tz=datetime.UTC) doc.file_name = file_name doc.content_type = final_file.content_type doc.file_size = final_file.byte_size @@ -340,11 +340,11 @@ def _update_component_info(): built_at=built_at, ) - def run(self): + def _run_preparation(self) -> CommandQueue: Context.get().app.db.connect() # prepare self._update_component_info() - # work in queue + # init queue LOG.info('Preparing command queue') queue = CommandQueue( worker=self, @@ -353,8 +353,18 @@ def run(self): component=CMD_COMPONENT, timeout=Context.get().app.cfg.db.queue_timout, ) + return queue + + def run(self): + LOG.info('Starting document worker (loop)') + queue = self._run_preparation() queue.run() + def run_once(self): + LOG.info('Starting document worker (once)') + queue = self._run_preparation() + queue.run_once() + def work(self, cmd: PersistentCommand): Context.get().update_trace_id(cmd.uuid) Context.get().update_document_id(cmd.body['uuid']) diff --git a/packages/dsw-document-worker/lambda.Dockerfile b/packages/dsw-document-worker/lambda.Dockerfile new file mode 100644 index 00000000..e01a0e8d --- /dev/null +++ b/packages/dsw-document-worker/lambda.Dockerfile @@ -0,0 +1,45 @@ +FROM datastewardshipwizard/python-base:4.6.0-3.11-docworker-lambda as builder + +COPY . /app + +# Install Python dependencies +RUN python -m pip wheel --wheel-dir=/app/wheels -r /app/packages/dsw-document-worker/requirements.txt \ + && python -m pip wheel --no-deps --wheel-dir=/app/wheels /app/packages/dsw-command-queue \ + && python -m pip wheel --no-deps --wheel-dir=/app/wheels /app/packages/dsw-config \ + && python -m pip wheel --no-deps --wheel-dir=/app/wheels /app/packages/dsw-database \ + && python -m pip wheel --no-deps --wheel-dir=/app/wheels /app/packages/dsw-storage \ + && python -m pip wheel --no-deps --wheel-dir=/app/wheels /app/packages/dsw-document-worker/addons/* \ + && python -m pip wheel --no-deps --wheel-dir=/app/wheels /app/packages/dsw-document-worker + +FROM datastewardshipwizard/python-base:4.6.0-3.11-docworker-lambda + +ARG LAMBDA_TASK_ROOT + +ENV APPLICATION_CONFIG_PATH=${LAMBDA_TASK_ROOT}/application.yml \ + WORKDIR_PATH=/tmp/docworker \ + EXPERIMENTAL_PDF_WATERMARK=${LAMBDA_TASK_ROOT}/data/watermark.pdf + +# Add fonts +COPY packages/dsw-document-worker/resources/fonts /usr/share/fonts/truetype/custom +RUN fc-cache + +## Add Pandoc filters +COPY packages/dsw-document-worker/resources/pandoc/filters /pandoc/filters + +WORKDIR ${LAMBDA_TASK_ROOT} + +# Prepare dirs +RUN mkdir /tmp/docworker +COPY packages/dsw-document-worker/data ./data + +# Copy Python dependencies +COPY --from=builder /app/wheels /tmp/wheels +RUN python -m pip install --no-cache --no-index /tmp/wheels/* \ + && rm -rf /tmp/wheels + +# Copy the Lambda handler +COPY packages/dsw-document-worker/resources/lambda_handler.py ${LAMBDA_TASK_ROOT} + +# Pass the name of the function handler as an argument to the runtime +ENTRYPOINT [ "python", "-m", "awslambdaric" ] +CMD [ "lambda_handler.handler" ] diff --git a/packages/dsw-document-worker/pyproject.toml b/packages/dsw-document-worker/pyproject.toml index 085d4b17..9ae0063c 100644 --- a/packages/dsw-document-worker/pyproject.toml +++ b/packages/dsw-document-worker/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'dsw-document-worker' -version = "4.5.0" +version = "4.6.0" description = 'Worker for assembling and transforming documents' readme = 'README.md' keywords = ['documents', 'generation', 'jinja2', 'pandoc', 'worker'] @@ -27,7 +27,6 @@ dependencies = [ 'Jinja2', 'Markdown', 'MarkupSafe', - 'mdx-breakless-lists', 'pathvalidate', 'pdfrw', 'python-dateutil', @@ -40,10 +39,10 @@ dependencies = [ 'weasyprint', 'XlsxWriter', # DSW - "dsw-command-queue==4.5.0", - "dsw-config==4.5.0", - "dsw-database==4.5.0", - "dsw-storage==4.5.0", + "dsw-command-queue==4.6.0", + "dsw-config==4.6.0", + "dsw-database==4.6.0", + "dsw-storage==4.6.0", ] [project.urls] diff --git a/packages/dsw-document-worker/requirements.txt b/packages/dsw-document-worker/requirements.txt index fa92dc05..dd7808b2 100644 --- a/packages/dsw-document-worker/requirements.txt +++ b/packages/dsw-document-worker/requirements.txt @@ -1,42 +1,41 @@ Brotli==1.1.0 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 cssselect2==0.7.0 -fonttools==4.47.2 +fonttools==4.51.0 html5lib==1.1 -idna==3.6 +idna==3.7 isodate==0.6.1 -Jinja2==3.1.3 -Markdown==3.5.2 -MarkupSafe==2.1.4 -mdx-breakless-lists==1.0.1 -minio==7.2.3 -panflute==2.3.0 +Jinja2==3.1.4 +Markdown==3.6 +MarkupSafe==2.1.5 +minio==7.2.7 +panflute==2.3.1 pathvalidate==3.2.0 pdfrw==0.4 -Pillow==10.2.0 -psycopg==3.1.17 -psycopg-binary==3.1.17 -pycparser==2.21 -pydyf==0.8.0 -pyparsing==3.1.1 -pyphen==0.14.0 -python-dateutil==2.8.2 -python-slugify==8.0.2 +Pillow==10.3.0 +psycopg==3.1.18 +psycopg-binary==3.1.18 +pycparser==2.22 +pydyf==0.10.0 +pyparsing==3.1.2 +pyphen==0.15.0 +python-dateutil==2.9.0 +python-slugify==8.0.4 PyYAML==6.0.1 rdflib==7.0.0 rdflib-jsonld==0.6.2 requests==2.31.0 -sentry-sdk==1.39.2 +sentry-sdk==1.45.0 six==1.16.0 tenacity==8.2.3 text-unidecode==1.3 tinycss2==1.2.1 -typing_extensions==4.9.0 -urllib3==2.1.0 +typing_extensions==4.11.0 +urllib3==2.2.1 weasyprint==60.2 webencodings==0.5.1 -XlsxWriter==3.1.9 +XlsxWriter==3.2.0 zopfli==0.2.3 diff --git a/packages/dsw-document-worker/resources/lambda_handler.py b/packages/dsw-document-worker/resources/lambda_handler.py new file mode 100644 index 00000000..e4b9a79e --- /dev/null +++ b/packages/dsw-document-worker/resources/lambda_handler.py @@ -0,0 +1,14 @@ +print('Loading lambda_handler') + + +def handler(event, context): + try: + print('LAMBDA> Starting handler') + + print('LAMBDA> Importing lambda_handler from dsw.document_worker') + from dsw.document_worker import lambda_handler + + print('LAMBDA> Calling lambda_handler') + lambda_handler(event, context) + except Exception as e: + print('LAMBDA> An error occurred: ' + str(e)) diff --git a/packages/dsw-mailer/CHANGELOG.md b/packages/dsw-mailer/CHANGELOG.md index 22ccc33e..2c24af01 100644 --- a/packages/dsw-mailer/CHANGELOG.md +++ b/packages/dsw-mailer/CHANGELOG.md @@ -8,6 +8,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.6.0] + +### Fixed + +- Use UTC timezone consistently + ## [4.5.0] Released for version consistency with other DSW tools. @@ -229,3 +235,4 @@ Released for version consistency with other DSW tools. [4.4.0]: /../../tree/v4.4.0 [4.4.1]: /../../tree/v4.4.1 [4.5.0]: /../../tree/v4.5.0 +[4.6.0]: /../../tree/v4.6.0 diff --git a/packages/dsw-mailer/Dockerfile b/packages/dsw-mailer/Dockerfile index 149dd423..e3878778 100644 --- a/packages/dsw-mailer/Dockerfile +++ b/packages/dsw-mailer/Dockerfile @@ -1,4 +1,4 @@ -FROM datastewardshipwizard/python-base:4.4.0-3.11-basic as builder +FROM datastewardshipwizard/python-base:4.6.0-3.11-basic as builder WORKDIR /app @@ -10,7 +10,7 @@ RUN python -m pip wheel --no-cache-dir --wheel-dir=/app/wheels -r /app/packages/ && python -m pip wheel --no-cache-dir --no-deps --wheel-dir=/app/wheels /app/packages/dsw-database \ && python -m pip wheel --no-cache-dir --no-deps --wheel-dir=/app/wheels /app/packages/dsw-mailer -FROM datastewardshipwizard/python-base:4.4.0-3.11-basic +FROM datastewardshipwizard/python-base:4.6.0-3.11-basic ENV APPLICATION_CONFIG_PATH /app/config/application.yml ENV WORKDIR_PATH /home/user/templates diff --git a/packages/dsw-mailer/dsw/mailer/consts.py b/packages/dsw-mailer/dsw/mailer/consts.py index 1c6a417b..6bf409ca 100644 --- a/packages/dsw-mailer/dsw/mailer/consts.py +++ b/packages/dsw-mailer/dsw/mailer/consts.py @@ -5,7 +5,7 @@ DEFAULT_ENCODING = 'utf-8' NULL_UUID = '00000000-0000-0000-0000-000000000000' PROG_NAME = 'dsw-mailer' -VERSION = '4.5.0' +VERSION = '4.6.0' VAR_APP_CONFIG_PATH = 'APPLICATION_CONFIG_PATH' VAR_WORKDIR_PATH = 'WORKDIR_PATH' diff --git a/packages/dsw-mailer/dsw/mailer/mailer.py b/packages/dsw-mailer/dsw/mailer/mailer.py index 8ccd8288..1bedd99b 100644 --- a/packages/dsw-mailer/dsw/mailer/mailer.py +++ b/packages/dsw-mailer/dsw/mailer/mailer.py @@ -174,7 +174,7 @@ def hit(self): if self.window == 0: return LOG.debug('Hit for checking rate limit') - now = datetime.datetime.now().timestamp() + now = datetime.datetime.now(tz=datetime.UTC).timestamp() threshold = now - self.window while len(self.hits) > 0 and self.hits[0] < threshold: self.hits.pop() @@ -215,7 +215,7 @@ def _enrich_context(self): 'recipients': self.recipients, 'mode': self.mode, 'template': self.template, - 'now': datetime.datetime.now(), + 'now': datetime.datetime.now(tz=datetime.UTC), } @staticmethod diff --git a/packages/dsw-mailer/dsw/mailer/smtp.py b/packages/dsw-mailer/dsw/mailer/smtp.py index aec28194..a04e7f31 100644 --- a/packages/dsw-mailer/dsw/mailer/smtp.py +++ b/packages/dsw-mailer/dsw/mailer/smtp.py @@ -163,7 +163,7 @@ def add_header(name: str, value: str): add_header('From', formataddr((mail.from_name, mail.from_mail))) add_header('To', ', '.join(mail.recipients)) add_header('Subject', mail.subject) - add_header('Date', format_datetime(dt=datetime.datetime.utcnow())) + add_header('Date', format_datetime(dt=datetime.datetime.now(tz=datetime.UTC))) add_header('Message-ID', make_msgid(idstring=mail.msg_id, domain=mail.msg_domain)) add_header('Language', mail.language) add_header('Importance', mail.importance) diff --git a/packages/dsw-mailer/pyproject.toml b/packages/dsw-mailer/pyproject.toml index b939f521..155833fa 100644 --- a/packages/dsw-mailer/pyproject.toml +++ b/packages/dsw-mailer/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'dsw-mailer' -version = "4.5.0" +version = "4.6.0" description = 'Worker for sending email notifications' readme = 'README.md' keywords = ['email', 'jinja2', 'notification', 'template'] @@ -31,9 +31,9 @@ dependencies = [ 'sentry-sdk', 'tenacity', # DSW - "dsw-command-queue==4.5.0", - "dsw-config==4.5.0", - "dsw-database==4.5.0", + "dsw-command-queue==4.6.0", + "dsw-config==4.6.0", + "dsw-database==4.6.0", ] [project.urls] diff --git a/packages/dsw-mailer/requirements.txt b/packages/dsw-mailer/requirements.txt index 642314a7..a60c89c9 100644 --- a/packages/dsw-mailer/requirements.txt +++ b/packages/dsw-mailer/requirements.txt @@ -1,17 +1,17 @@ -certifi==2023.11.17 +certifi==2024.2.2 click==8.1.7 -dkimpy==1.1.5 -dnspython==2.5.0 -Jinja2==3.1.3 -MarkupSafe==2.1.4 +dkimpy==1.1.6 +dnspython==2.6.1 +Jinja2==3.1.4 +MarkupSafe==2.1.5 pathvalidate==3.2.0 -psycopg==3.1.17 -psycopg-binary==3.1.17 -python-dateutil==2.8.2 +psycopg==3.1.18 +psycopg-binary==3.1.18 +python-dateutil==2.9.0 PyYAML==6.0.1 -sentry-sdk==1.39.2 +sentry-sdk==1.45.0 six==1.16.0 tenacity==8.2.3 -typing_extensions==4.9.0 -tzdata==2023.4 -urllib3==2.1.0 +typing_extensions==4.11.0 +tzdata==2024.1 +urllib3==2.2.1 diff --git a/packages/dsw-models/CHANGELOG.md b/packages/dsw-models/CHANGELOG.md index 9a1a4ad9..7a8ae0e1 100644 --- a/packages/dsw-models/CHANGELOG.md +++ b/packages/dsw-models/CHANGELOG.md @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.6.0] + +Released for version consistency with other DSW tools. + ## [4.5.0] Released for version consistency with other DSW tools. @@ -130,3 +134,4 @@ Released for version consistency with other DSW tools. [4.4.0]: /../../tree/v4.4.0 [4.4.1]: /../../tree/v4.4.1 [4.5.0]: /../../tree/v4.5.0 +[4.6.0]: /../../tree/v4.6.0 diff --git a/packages/dsw-models/pyproject.toml b/packages/dsw-models/pyproject.toml index 64111231..aa6ec036 100644 --- a/packages/dsw-models/pyproject.toml +++ b/packages/dsw-models/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'dsw-models' -version = "4.5.0" +version = "4.6.0" description = 'Library with DSW models and basic IO operations' readme = 'README.md' keywords = ['dsw', 'config', 'yaml', 'parser'] diff --git a/packages/dsw-storage/CHANGELOG.md b/packages/dsw-storage/CHANGELOG.md index b0398a7e..65b0514a 100644 --- a/packages/dsw-storage/CHANGELOG.md +++ b/packages/dsw-storage/CHANGELOG.md @@ -8,6 +8,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.6.0] + +Released for version consistency with other DSW tools. + ## [4.5.0] Released for version consistency with other DSW tools. @@ -197,3 +201,4 @@ Released for version consistency with other DSW tools. [4.4.0]: /../../tree/v4.4.0 [4.4.1]: /../../tree/v4.4.1 [4.5.0]: /../../tree/v4.5.0 +[4.6.0]: /../../tree/v4.6.0 diff --git a/packages/dsw-storage/pyproject.toml b/packages/dsw-storage/pyproject.toml index 15919324..15d167fb 100644 --- a/packages/dsw-storage/pyproject.toml +++ b/packages/dsw-storage/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'dsw-storage' -version = "4.5.0" +version = "4.6.0" description = 'Library for managing DSW S3 storage' readme = 'README.md' keywords = ['dsw', 's3', 'bucket', 'storage'] @@ -26,7 +26,7 @@ dependencies = [ 'minio', 'tenacity', # DSW - "dsw-config==4.5.0", + "dsw-config==4.6.0", ] [project.urls] diff --git a/packages/dsw-storage/requirements.txt b/packages/dsw-storage/requirements.txt index 48042221..a73bcfd8 100644 --- a/packages/dsw-storage/requirements.txt +++ b/packages/dsw-storage/requirements.txt @@ -1,6 +1,6 @@ -certifi==2023.11.17 -minio==7.2.3 +certifi==2024.2.2 +minio==7.2.7 PyYAML==6.0.1 -sentry-sdk==1.39.2 +sentry-sdk==1.45.0 tenacity==8.2.3 -urllib3==2.1.0 +urllib3==2.2.1 diff --git a/packages/dsw-tdk/CHANGELOG.md b/packages/dsw-tdk/CHANGELOG.md index e076d940..de8cb8ba 100644 --- a/packages/dsw-tdk/CHANGELOG.md +++ b/packages/dsw-tdk/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.6.0] + +Released for version consistency with other DSW tools. + ## [4.5.0] Released for version consistency with other DSW tools. @@ -419,3 +423,4 @@ Initial DSW Template Development Kit (versioned as part of the [DSW platform](ht [4.4.0]: /../../tree/v4.4.0 [4.4.1]: /../../tree/v4.4.1 [4.5.0]: /../../tree/v4.5.0 +[4.6.0]: /../../tree/v4.6.0 diff --git a/packages/dsw-tdk/pyproject.toml b/packages/dsw-tdk/pyproject.toml index 08ae3b54..eaa019b7 100644 --- a/packages/dsw-tdk/pyproject.toml +++ b/packages/dsw-tdk/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'dsw-tdk' -version = "4.5.0" +version = "4.6.0" description = 'Data Stewardship Wizard Template Development Toolkit' readme = 'README.md' keywords = ['documents', 'dsw', 'jinja2', 'template', 'toolkit'] diff --git a/packages/dsw-tdk/requirements.test.txt b/packages/dsw-tdk/requirements.test.txt index dbd54d99..d08442ee 100644 --- a/packages/dsw-tdk/requirements.test.txt +++ b/packages/dsw-tdk/requirements.test.txt @@ -1,13 +1,13 @@ -attrs==23.1.0 -idna==3.4 +attrs==23.2.0 +idna==3.7 iniconfig==2.0.0 -multidict==6.0.4 -packaging==23.1 -pluggy==1.3.0 -pytest==7.4.2 -pytest-recording==0.13.0 +multidict==6.0.5 +packaging==24.0 +pluggy==1.5.0 +pytest==8.2.0 +pytest-recording==0.13.1 PyYAML==6.0.1 six==1.16.0 -vcrpy==5.1.0 -wrapt==1.15.0 -yarl==1.9.2 +vcrpy==6.0.1 +wrapt==1.16.0 +yarl==1.9.4 diff --git a/packages/dsw-tdk/requirements.txt b/packages/dsw-tdk/requirements.txt index 2f102042..b66f1701 100644 --- a/packages/dsw-tdk/requirements.txt +++ b/packages/dsw-tdk/requirements.txt @@ -1,6 +1,6 @@ -aiohttp==3.9.2 +aiohttp==3.9.5 aiosignal==1.3.1 -anyio==4.2.0 +anyio==4.3.0 async-timeout==4.0.3 attrs==23.2.0 charset-normalizer==3.3.2 @@ -8,14 +8,14 @@ click==8.1.7 colorama==0.4.6 frozenlist==1.4.1 humanize==4.9.0 -idna==3.6 -Jinja2==3.1.3 -MarkupSafe==2.1.4 -multidict==6.0.4 +idna==3.7 +Jinja2==3.1.4 +MarkupSafe==2.1.5 +multidict==6.0.5 pathspec==0.12.1 python-dotenv==1.0.1 -python-slugify==8.0.2 -sniffio==1.3.0 +python-slugify==8.0.4 +sniffio==1.3.1 text-unidecode==1.3 -watchfiles==0.20.0 +watchfiles==0.21.0 yarl==1.9.4 diff --git a/requirements.txt b/requirements.txt index d6eae96c..9f8ddd32 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,57 +1,57 @@ -aiohttp==3.9.2 +aiohttp==3.9.5 aiosignal==1.3.1 -anyio==4.2.0 +anyio==4.3.0 async-timeout==4.0.3 attrs==23.2.0 Brotli==1.1.0 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 cssselect2==0.7.0 -dkimpy==1.1.5 -dnspython==2.5.0 -fonttools==4.47.2 +dkimpy==1.1.6 +dnspython==2.6.1 +fonttools==4.51.0 frozenlist==1.4.1 html5lib==1.1 humanize==4.9.0 -idna==3.6 +idna==3.7 isodate==0.6.1 -Jinja2==3.1.3 -Markdown==3.5.2 -MarkupSafe==2.1.4 +Jinja2==3.1.4 +Markdown==3.6 +MarkupSafe==2.1.5 mdx-breakless-lists==1.0.1 -minio==7.2.3 -multidict==6.0.4 +minio==7.2.7 +multidict==6.0.5 pathspec==0.12.1 pathvalidate==3.2.0 pdfrw==0.4 -Pillow==10.2.0 -psycopg==3.1.17 -psycopg-binary==3.1.17 -pycparser==2.21 -pydyf==0.8.0 -pyparsing==3.1.1 -pyphen==0.14.0 -python-dateutil==2.8.2 +Pillow==10.3.0 +psycopg==3.1.18 +psycopg-binary==3.1.18 +pycparser==2.22 +pydyf==0.10.0 +pyparsing==3.1.2 +pyphen==0.15.0 +python-dateutil==2.9.0 python-dotenv==1.0.1 -python-slugify==8.0.2 +python-slugify==8.0.4 PyYAML==6.0.1 rdflib==7.0.0 rdflib-jsonld==0.6.2 requests==2.31.0 -sentry-sdk==1.39.2 +sentry-sdk==1.45.0 six==1.16.0 -sniffio==1.3.0 +sniffio==1.3.1 tenacity==8.2.3 text-unidecode==1.3 tinycss2==1.2.1 -typing_extensions==4.9.0 -tzdata==2023.4 -urllib3==2.1.0 +typing_extensions==4.11.0 +tzdata==2024.1 +urllib3==2.2.1 weasyprint==60.2 webencodings==0.5.1 -XlsxWriter==3.1.9 +XlsxWriter==3.2.0 yarl==1.9.4 zopfli==0.2.3