From e484f9f9873a827f3c7f1844e8f073618bfffa1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Such=C3=A1nek?= Date: Wed, 2 Dec 2026 21:16:44 +0100 Subject: [PATCH] fix: Split the changelogs by release and check them before one --- CONTRIBUTING.md | 5 ++- packages/dsw-command-queue/CHANGELOG.md | 15 ++++++- packages/dsw-config/CHANGELOG.md | 21 ++++++++-- packages/dsw-data-seeder/CHANGELOG.md | 18 ++++++-- packages/dsw-database/CHANGELOG.md | 35 ++++++++++++---- packages/dsw-document-worker/CHANGELOG.md | 38 ++++++++++++----- packages/dsw-mailer/CHANGELOG.md | 21 ++++++++-- packages/dsw-models/CHANGELOG.md | 51 +++++++++++++++-------- packages/dsw-storage/CHANGELOG.md | 20 +++++++-- packages/dsw-tdk/CHANGELOG.md | 45 +++++++++++++------- packages/dsw-templating/CHANGELOG.md | 41 ++++++++++++------ scripts/changelog.py | 6 ++- scripts/check-release.py | 28 ++++++++++++- 13 files changed, 263 insertions(+), 81 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9fa3fb0..14c42707 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,8 +89,9 @@ The changes must be captured in our [User Guide](https://guide.ds-wizard.org). Releases are cut directly on `main` — there is no release branch to merge back. -* Update `CHANGELOG.md` files for the release. Their `[Unreleased]` link compares the previous release tag against - `main` (`/../../compare/vX.Y.Z...main`), so bump it to the tag being released. +* Before the first RC, run `python3 scripts/changelog.py ` and commit the result. It moves + `[Unreleased]` into a section for the version and bumps the compare link. Entries of fixes made between RCs go into + that section by hand. `scripts/check-release.py` refuses a release whose changelogs are not ready. * Git-tag the commit you are releasing with `vX.Y.Z-rc.1`. There is no version bump to commit — the version is derived from the tag. * Test the RC version (it will not be published via PyPI unless GitHub pre-release is published). diff --git a/packages/dsw-command-queue/CHANGELOG.md b/packages/dsw-command-queue/CHANGELOG.md index 94586081..be684a58 100644 --- a/packages/dsw-command-queue/CHANGELOG.md +++ b/packages/dsw-command-queue/CHANGELOG.md @@ -7,11 +7,21 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [5.1.0] + +Released for version consistency with other Wizard tools. + +## [5.0.0] + ### Changed - Clear `lambda_invoked` of a failed command that will be tried again, so the backend knows to invoke the worker again; a command out of attempts keeps it - Requires a database with the `lambda_invoked` column of `persistent_command` +## [4.35.0] + +Released for version consistency with other Wizard tools. ## [4.34.0] @@ -418,7 +428,7 @@ Released for version consistency with other DSW tools. - Initiated this library from *dsw-data-seeder*, *dsw-document-worker*, and *dsw-mailer* -[Unreleased]: /../../compare/v4.34.0...main +[Unreleased]: /../../compare/v5.1.0...main [3.14.0]: /../../tree/v3.14.0 [3.14.1]: /../../tree/v3.14.1 [3.15.0]: /../../tree/v3.15.0 @@ -511,3 +521,6 @@ Released for version consistency with other DSW tools. [4.32.0]: /../../tree/v4.32.0 [4.33.0]: /../../tree/v4.33.0 [4.34.0]: /../../tree/v4.34.0 +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/packages/dsw-config/CHANGELOG.md b/packages/dsw-config/CHANGELOG.md index 381effef..8ad70d84 100644 --- a/packages/dsw-config/CHANGELOG.md +++ b/packages/dsw-config/CHANGELOG.md @@ -7,10 +7,16 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [5.1.0] + +Released for version consistency with other Wizard tools. + +## [5.0.0] + ### Added -- `SentryReporter.set_command` / `reset_command` tag events with the persistent command being processed the way the backend does: `function`, `tenantUuid` and `traceUuid` tags, the creator as the user, the command UUID as the trace ID, and `uuid`, `attempts` and `maxAttempts` extras -- `read_config` loads the configuration YAML from AWS AppConfig when `AWS_APP_CONFIG` is set (environment `Default`, profile derived from the file name, overridable by `AWS_APP_CONFIG_ENVIRONMENT` / `AWS_APP_CONFIG_PROFILE`), and from the local file otherwise; a warm Lambda reuses its session and re-polls only after the poll interval +- `SentryReporter.set_command` / `reset_command` tag events with the persistent command being processed the way the backend does: `function`, `tenantUuid` and `traceUuid` tags, the creator as the user, the command UUID as the trace ID, and `uuid`, `attempts` and `maxAttempts` extras ### Changed @@ -18,6 +24,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - `SentryReporter.initialize` takes `component` (the `component` tag) instead of `prog_name` - Multi-tenant mode is read from `multiTenancy.enabled` (`MULTI_TENANCY_ENABLED`), the backend's new name for the section; `cloud.enabled` (`CLOUD_ENABLED`) is still read when `multiTenancy.enabled` is not set +## [4.35.0] + +### Added + +- `read_config` loads the configuration YAML from AWS AppConfig when `AWS_APP_CONFIG` is set (environment `Default`, profile derived from the file name, overridable by `AWS_APP_CONFIG_ENVIRONMENT` / `AWS_APP_CONFIG_PROFILE`), and from the local file otherwise; a warm Lambda reuses its session and re-polls only after the poll interval + ## [4.34.0] ### Added @@ -425,7 +437,7 @@ Released for version consistency with other DSW tools. - Initiated this library from *dsw-data-seeder*, *dsw-document-worker*, and *dsw-mailer* -[Unreleased]: /../../compare/v4.34.0...main +[Unreleased]: /../../compare/v5.1.0...main [3.14.0]: /../../tree/v3.14.0 [3.14.1]: /../../tree/v3.14.1 [3.15.0]: /../../tree/v3.15.0 @@ -518,3 +530,6 @@ Released for version consistency with other DSW tools. [4.32.0]: /../../tree/v4.32.0 [4.33.0]: /../../tree/v4.33.0 [4.34.0]: /../../tree/v4.34.0 +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/packages/dsw-data-seeder/CHANGELOG.md b/packages/dsw-data-seeder/CHANGELOG.md index b5a8014e..3d4a1b2b 100644 --- a/packages/dsw-data-seeder/CHANGELOG.md +++ b/packages/dsw-data-seeder/CHANGELOG.md @@ -7,14 +7,23 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Added -- Lambda handler reads its configuration from AWS AppConfig when `AWS_APP_CONFIG` is set (see `dsw-config`) +## [5.1.0] + +Released for version consistency with other Wizard tools. + +## [5.0.0] ### Changed - Sentry events carry the same tags as the backend's: `component` is the persistent command component (`data_seeder`), and a command sets `function`, `tenantUuid`, `traceUuid` (the command UUID, the `traceId` of the logs), the user who created it, and its trace; the tenant is the one being seeded, `recipe_name` is `recipeName` and `command_uuid` / `tenant_uuid` are gone +## [4.35.0] + +### Added + +- Lambda handler reads its configuration from AWS AppConfig when `AWS_APP_CONFIG` is set (see `dsw-config`) + ## [4.34.0] ### Fixed @@ -475,7 +484,7 @@ Released for version consistency with other DSW tools. - Initiated DSW Data Seeder project -[Unreleased]: /../../compare/v4.34.0...main +[Unreleased]: /../../compare/v5.1.0...main [3.10.0]: https://github.com/ds-wizard/data-seeder/tree/v3.10.0 [3.11.0]: https://github.com/ds-wizard/data-seeder/tree/v3.11.0 [3.12.0]: https://github.com/ds-wizard/data-seeder/tree/v3.12.0 @@ -574,3 +583,6 @@ Released for version consistency with other DSW tools. [4.32.0]: /../../tree/v4.32.0 [4.33.0]: /../../tree/v4.33.0 [4.34.0]: /../../tree/v4.34.0 +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/packages/dsw-database/CHANGELOG.md b/packages/dsw-database/CHANGELOG.md index b319a3b7..7df32452 100644 --- a/packages/dsw-database/CHANGELOG.md +++ b/packages/dsw-database/CHANGELOG.md @@ -7,15 +7,20 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [5.1.0] + +Released for version consistency with other Wizard tools. + +## [5.0.0] + ### Added -- `language` and `pot_file_ready` fields of `document_template` and a method to update the POT file flag - `DBMailTemplateLocale` (`mail_template_locale`) with `get_mail_template_locale` and `get_enabled_mail_template_locales` (Wizard 5.0 mail translations) ### Changed -- Read the `project` table column `knowledge_model_package_uuid` (renamed in the backend) - Wizard 5.0 schema: `document` drops `project_replies_hash` and gains `context_hash`, `knowledge_model_editor_uuid` and `workspace_uuid`; `document_template` has the single `id` (instead of `organization_id` + `template_id`, `coordinates` is `:`), the @@ -26,12 +31,6 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). `enabled`, `default_locale`, `official`, timestamps); `organization_id`, `locale_id`, `version` and the `id` property are gone -### Removed - -- `fetch_tenant_limits` and `DBTenantLimits`: the document worker takes the storage limit from the command body instead of `tenant_limit_bundle` -- `get_default_locale`: mails no longer fall back to the default UI locale, but to the default - mail template locale - ### Fixed - Every query attempt runs in its own savepoint: a failed query no longer leaves the transaction @@ -50,6 +49,21 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). `submission` table: `to_dict` (`extras.submissions`) failed on a submission without `created_at`, and missing references became the string `'None'` +### Removed + +- `fetch_tenant_limits` and `DBTenantLimits`: the document worker takes the storage limit from the command body instead of `tenant_limit_bundle` +- `get_default_locale`: mails no longer fall back to the default UI locale, but to the default + mail template locale + +## [4.35.0] + +### Added + +- `language` and `pot_file_ready` fields of `document_template` and a method to update the POT file flag + +### Changed + +- Read the `project` table column `knowledge_model_package_uuid` (renamed in the backend) ## [4.34.0] @@ -471,7 +485,7 @@ Released for version consistency with other DSW tools. - Initiated this library from *dsw-data-seeder*, *dsw-document-worker*, and *dsw-mailer* -[Unreleased]: /../../compare/v4.34.0...main +[Unreleased]: /../../compare/v5.1.0...main [3.14.0]: /../../tree/v3.14.0 [3.14.1]: /../../tree/v3.14.1 [3.15.0]: /../../tree/v3.15.0 @@ -565,3 +579,6 @@ Released for version consistency with other DSW tools. [4.32.0]: /../../tree/v4.32.0 [4.33.0]: /../../tree/v4.33.0 [4.34.0]: /../../tree/v4.34.0 +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/packages/dsw-document-worker/CHANGELOG.md b/packages/dsw-document-worker/CHANGELOG.md index bf2a752f..ad192d05 100644 --- a/packages/dsw-document-worker/CHANGELOG.md +++ b/packages/dsw-document-worker/CHANGELOG.md @@ -7,18 +7,18 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Added -- Document template locales: a `.po` file attached to a document template version is applied at render time, so language is a parameter of document generation instead of a property of the format -- Generation of the POT file with translatable strings (new `generatePotFile` command function), stored in S3 and flagged by `document_template.pot_file_ready` -- `document.language` and `document.locale` in the document context -- Translations are available to all steps via `Step.before_render` and the `gettext` / `ngettext` / `pgettext` helpers (see [Translations](../dsw-templating/support/Translations.md)) -- Lambda handler reads its configuration from AWS AppConfig when `AWS_APP_CONFIG` is set (see `dsw-config`) -- `docx-landscape.lua` Pandoc filter (a `landscape` div, or `\landscape` / `\portrait` paragraphs, switch DOCX page orientation) +## [5.1.0] + +### Fixed + +- A Pandoc conversion that exceeds `externals.pandoc.timeout` (`PANDOC_TIMEOUT`) is stopped together with the filters it started, and the document fails with "Exceeded the time limit of N seconds"; before, the worker waited for Pandoc to finish and the timeout had no effect. The error message keeps only the last 64 KiB of Pandoc's stderr + +## [5.0.0] ### Changed -- Sentry events carry the same tags as the backend's: `component` is the persistent command component (`document_worker`), and a command sets `function`, `tenantUuid`, `traceUuid` (the command UUID, the `traceId` of the logs), the user who created it, and its trace; the job tags are camelCase (`documentUuid`, `templateUuid`, `formatUuid`) and `command_uuid` / `tenant_uuid` are gone +- Sentry events carry the same tags as the backend's: `component` is the persistent command component (`document_worker`), and a command sets `function`, `tenantUuid`, `traceUuid` (the command UUID, the `traceId` of the logs), the user who created it, and its trace; the job tags are camelCase (`documentUuid`, `templateUuid`, `formatUuid`) and `command_uuid` / `tenant_uuid` are gone - Persistent command component (and its notification channel) renamed `doc_worker` → `document_worker`, to match the backend; commands still stored as `doc_worker` are no longer picked up - Update to DT metamodel 19.0 (WEP 24): only document contexts of major version 19 are accepted; any other (e.g. of a document queued before the upgrade) fails the document with "Unsupported document context metamodel version X, expected 19.x. Regenerate the document." (`missing` when there is none) and is not reported to Sentry - `extras.questionnaire`, the deprecated alias of `extras.project`, is removed; for a KM editor preview (no project) `extras.project` is `null` and `extras.submissions` empty @@ -27,6 +27,21 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - The tenant storage limit comes only from `limits.storage` of the `generateDocument` command body, as resolved by the backend; the key is removed before rendering, so it is not part of the document context, and without it (or with `null`) there is no storage limit. The worker no longer reads `tenant_limit_bundle` - The maximum size of a generated document is no longer experimental and is limited by default: `documents.maxSize` (`DOCUMENTS_MAX_SIZE`) replaces `experimental.maxDocumentSize` (`EXPERIMENTAL_MAX_DOCUMENT_SIZE`) and defaults to 5 MB (`5000000` bytes); set it to `null` (or a blank variable) for no limit - `generatePotFile` reads the single template `id` and `version` from the command body (Wizard 5.0) and stores `document-templates//_.pot`, the name the backend reads; a body queued before 5.0 (`organizationId` + `templateId`) is read as the joined id the 5.0 migration gave the template + +## [4.35.0] + +### Added + +- Document template locales: a `.po` file attached to a document template version is applied at render time, so language is a parameter of document generation instead of a property of the format +- Generation of the POT file with translatable strings (new `generatePotFile` command function), stored in S3 and flagged by `document_template.pot_file_ready` +- `document.language` and `document.locale` in the document context +- Translations are available to all steps via `Step.before_render` and the `gettext` / `ngettext` / `pgettext` helpers (see [Translations](../dsw-templating/support/Translations.md)) +- Lambda handler reads its configuration from AWS AppConfig when `AWS_APP_CONFIG` is set (see `dsw-config`) +- `docx-landscape.lua` Pandoc filter (a `landscape` div, or `\landscape` / `\portrait` paragraphs, switch DOCX page orientation) + +### Changed + +- Update to DT metamodel 18.3 - The `jinja2.ext.i18n` extension is always enabled for Jinja-powered steps - `extras.project` (and the deprecated `extras.questionnaire`) provide `knowledge_model_package_uuid` instead of `knowledge_package_uuid` - The template-facing document context object model (`ctx|to_context_obj`) comes from `dsw-models` (`dsw.models.document_context.graph`) instead of a copy inside the worker; the object model, its attributes and its Markdown rendering are unchanged @@ -38,14 +53,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Documents no longer fail when a report metric has no measure (`measure` is `null` when nothing answered contributes to the metric); `ReportMetric.measure` is `None` then - The `policy.urlize.extra_schemes` step option is applied to the `urlize.extra_schemes` Jinja policy instead of overwriting `truncate.leeway` -- A Pandoc conversion that exceeds `externals.pandoc.timeout` (`PANDOC_TIMEOUT`) is stopped together with the filters it started, and the document fails with "Exceeded the time limit of N seconds"; before, the worker waited for Pandoc to finish and the timeout had no effect. The error message keeps only the last 64 KiB of Pandoc's stderr ### Removed - The `policy.ext.i18n.trimmed` step option; `{% trans %}` blocks are now always trimmed, since the trimming decides the `msgid` and the POT file is per document template while the option was per format. Use `{% trans notrimmed %}` where the whitespace matters. - The experimental `i18n-dir`, `i18n-domain` and `i18n-lang` step options; they are now ignored and a template still using them renders untranslated. Use document template locales instead. - ## [4.34.0] ### Added @@ -618,7 +631,7 @@ Released for version consistency with other DSW tools. - Moved from [ds-wizard/document-worker](https://github.com/ds-wizard/document-worker) to the monorepo -[Unreleased]: /../../compare/v4.34.0...main +[Unreleased]: /../../compare/v5.1.0...main [3.14.0]: /../../tree/v3.14.0 [3.14.1]: /../../tree/v3.14.1 [3.15.0]: /../../tree/v3.15.0 @@ -711,3 +724,6 @@ Released for version consistency with other DSW tools. [4.32.0]: /../../tree/v4.32.0 [4.33.0]: /../../tree/v4.33.0 [4.34.0]: /../../tree/v4.34.0 +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/packages/dsw-mailer/CHANGELOG.md b/packages/dsw-mailer/CHANGELOG.md index 97fef26c..93df54ff 100644 --- a/packages/dsw-mailer/CHANGELOG.md +++ b/packages/dsw-mailer/CHANGELOG.md @@ -7,16 +7,22 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [5.1.0] + +Released for version consistency with other Wizard tools. + +## [5.0.0] + ### Added - The registry's `resetPassword` template, with a link to `/forgotten-password//` -- Lambda handler reads its configuration from AWS AppConfig when `AWS_APP_CONFIG` is set (see `dsw-config`) - Tests - The default mail POT (Wizard 5.0): `dsw-mailer make-pot` builds one `mail.pot` of all the templates into `templates/locale/mail.pot` (the image has it), and the mailer keeps it current in S3 at `mail-templates/mail.pot`, with its version as object metadata, at startup and with `dsw-mailer sync-default-pot [--force]` or the Lambda event `{"syncDefaultPot": {...}}`; it never downgrades it unless forced and never blocks mail; `mail.syncDefaultPot` (`MAIL_SYNC_DEFAULT_POT`) turns it off ### Changed -- Sentry events carry the same tags as the backend's: `component` is the persistent command component (`mailer`), and a command sets `function`, `tenantUuid`, `traceUuid` (the command UUID, the `traceId` of the logs), the user who created it, and its trace; `command_uuid` / `tenant_uuid` are gone +- Sentry events carry the same tags as the backend's: `component` is the persistent command component (`mailer`), and a command sets `function`, `tenantUuid`, `traceUuid` (the command UUID, the `traceId` of the logs), the user who created it, and its trace; `command_uuid` / `tenant_uuid` are gone - Mails are translated with the tenant's mail template locales (Wizard 5.0): one mail is sent per recipient, in the mail template locale whose code matches the recipient's UI locale (exact code, then the base language), otherwise the tenant's default one, otherwise `en`, otherwise built-in English; disabled locales are skipped and a recipient who is not a user gets the default - A command with `sendAsOne` sends a single mail to all its recipients in English; a command without the field, queued before the upgrade, is sent per recipient - The compiled `mail.mo` of a mail template locale is stored back to S3 next to its `mail.po` and cached locally until the locale's `updated_at` changes, instead of compiling the PO for every mail @@ -33,6 +39,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - The three POT files (`default`, `wizard` and `registry`, built with `pybabel` and `make-header.sh`): `make pot` builds the one `mail.pot` - The illustrations color (`style.illustrations_color` in templates, `illustrationsColor` and `styleIllustrationsColor` in the input, the `DEFAULT_ILLUSTRATIONS_COLOR` variable): Wizard 5.0 removed it +## [4.35.0] + +### Added + +- Lambda handler reads its configuration from AWS AppConfig when `AWS_APP_CONFIG` is set (see `dsw-config`) + ## [4.34.0] ### Fixed @@ -497,7 +509,7 @@ Released for version consistency with other DSW tools. - Moved from [ds-wizard/mailer](https://github.com/ds-wizard/mailer) to the monorepo -[Unreleased]: /../../compare/v4.34.0...main +[Unreleased]: /../../compare/v5.1.0...main [3.14.0]: /../../tree/v3.14.0 [3.14.1]: /../../tree/v3.14.1 [3.15.0]: /../../tree/v3.15.0 @@ -590,3 +602,6 @@ Released for version consistency with other DSW tools. [4.32.0]: /../../tree/v4.32.0 [4.33.0]: /../../tree/v4.33.0 [4.34.0]: /../../tree/v4.34.0 +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/packages/dsw-models/CHANGELOG.md b/packages/dsw-models/CHANGELOG.md index 21e3f8b9..8ee80d3a 100644 --- a/packages/dsw-models/CHANGELOG.md +++ b/packages/dsw-models/CHANGELOG.md @@ -7,24 +7,15 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -The package was rewritten; its previous, experimental API is not kept. + +## [5.1.0] + +Released for version consistency with other Wizard tools. + +## [5.0.0] ### Added -- Wire models aligned with the server: knowledge model (flat, events, bundles), `template.json` - (local and packaged), project events, changes, replies, versions, files and reports, and the - document context -- Strict or lenient handling of unknown keys (`dsw.models.strictness`) -- Knowledge model graph with resolved references, reverse lookups and visitors -- Nested knowledge model for authoring (`tree`) with conversions to and from the flat model -- Knowledge model compiler, package chains, diff, decompile and squash -- Knowledge model builder and semantic validation -- Project content compilation, event squashing, reply walking, indications and metrics -- Migrations of knowledge model bundles (metamodel 1–20) and best-effort `template.json` upgrades -- Document context object model for templates, with Markdown helpers in the `rendering` extra -- JSON Schema generation (`dsw.models.schemas`) -- Example scripts (`examples/`): validating, building and diffing knowledge models, generating schemas -- `language` field of `DocumentTemplateMetadata` - Single `id` of Wizard 5.0 for knowledge model bundles: packages are `id` + `version` with split `*PackageId` / `*PackageVersion` links, and pre-5.0 bundles are still read (`dsw.models.coordinate`) @@ -40,7 +31,6 @@ The package was rewritten; its previous, experimental API is not kept. ### Changed -- Supports Python 3.12 and newer - Document context metamodel 19.0 (WEP 24), `DOCUMENT_TEMPLATE_METAMODEL_VERSION` is `19.0`: - wire model: new `hash`, `workspace`, `knowledgeModelEditor` and `questionnaire` (replies, labels, phase, versions, files, report and language moved there from `project`); `project` @@ -63,6 +53,30 @@ The package was rewritten; its previous, experimental API is not kept. `format`; `config.app_title_short` and `config.illustrations_color` are removed - `check_metamodel_version` requires major version 19 +## [4.35.0] + +The package was rewritten; its previous, experimental API is not kept. + +### Added + +- Wire models aligned with the server: knowledge model (flat, events, bundles), `template.json` + (local and packaged), project events, changes, replies, versions, files and reports, and the + document context +- Strict or lenient handling of unknown keys (`dsw.models.strictness`) +- Knowledge model graph with resolved references, reverse lookups and visitors +- Nested knowledge model for authoring (`tree`) with conversions to and from the flat model +- Knowledge model compiler, package chains, diff, decompile and squash +- Knowledge model builder and semantic validation +- Project content compilation, event squashing, reply walking, indications and metrics +- Migrations of knowledge model bundles (metamodel 1–20) and best-effort `template.json` upgrades +- Document context object model for templates, with Markdown helpers in the `rendering` extra +- JSON Schema generation (`dsw.models.schemas`) +- Example scripts (`examples/`): validating, building and diffing knowledge models, generating schemas +- `language` field of `DocumentTemplateMetadata` + +### Changed + +- Supports Python 3.12 and newer ## [4.34.0] @@ -389,7 +403,7 @@ Released for version consistency with other DSW tools. - Initial version of `dsw-models` package -[Unreleased]: /../../compare/v4.34.0...main +[Unreleased]: /../../compare/v5.1.0...main [3.20.0]: /../../tree/v3.20.0 [3.20.1]: /../../tree/v3.20.1 [3.20.2]: /../../tree/v3.20.2 @@ -470,3 +484,6 @@ Released for version consistency with other DSW tools. [4.32.0]: /../../tree/v4.32.0 [4.33.0]: /../../tree/v4.33.0 [4.34.0]: /../../tree/v4.34.0 +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/packages/dsw-storage/CHANGELOG.md b/packages/dsw-storage/CHANGELOG.md index cf829ccc..6854243e 100644 --- a/packages/dsw-storage/CHANGELOG.md +++ b/packages/dsw-storage/CHANGELOG.md @@ -7,17 +7,28 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [5.1.0] + +Released for version consistency with other Wizard tools. + +## [5.0.0] + ### Added -- Methods for downloading and storing document template locales and for storing the document template POT file - Methods for downloading and storing mail template locales (`mail-template-locales//`) - `head_instance_object` and `store_instance_object` for instance-level objects, which are never prefixed with the tenant (e.g. the default mail POT `mail-templates/mail.pot`); `head_instance_object` returns an `ObjectInfo` with the user metadata and the ETag - ### Removed - `download_locale`: Wizard 5.0 has no `locales//mail.po`; mail translations are mail template locales +## [4.35.0] + +### Added + +- Methods for downloading and storing document template locales and for storing the document template POT file + ## [4.34.0] Released for version consistency with other DSW tools. @@ -398,7 +409,7 @@ Released for version consistency with other DSW tools. - Initiated this library from *dsw-data-seeder* and *dsw-document-worker* -[Unreleased]: /../../compare/v4.34.0...main +[Unreleased]: /../../compare/v5.1.0...main [3.14.0]: /../../tree/v3.14.0 [3.14.1]: /../../tree/v3.14.1 [3.15.0]: /../../tree/v3.15.0 @@ -491,3 +502,6 @@ Released for version consistency with other DSW tools. [4.32.0]: /../../tree/v4.32.0 [4.33.0]: /../../tree/v4.33.0 [4.34.0]: /../../tree/v4.34.0 +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/packages/dsw-tdk/CHANGELOG.md b/packages/dsw-tdk/CHANGELOG.md index 50a2dc83..3b90f06e 100644 --- a/packages/dsw-tdk/CHANGELOG.md +++ b/packages/dsw-tdk/CHANGELOG.md @@ -7,12 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] + +## [5.1.0] + +Released for version consistency with other Wizard tools. + +## [5.0.0] + ### Added -- New `pot` command creating a POT file with translatable strings of the template project -- New `render` command rendering a document from the local template project and a document context (JSON file), optionally with a PO file and project files, without any Wizard instance; rendering is done by `dsw-templating`, the same engine as the document worker uses, and only the files selected by `_tdk.files` are available to it, as on the server; the context gets the document worker's defaults (`config` service information and branding fallbacks, missing `extras`), which can be overridden with `-D NAME=VALUE` or the worker's `DOCUMENT_CONTEXT_*` environment variables; `--secret` / `--allow-requests` provide the `secrets` / `requests` globals and `--pandoc-filters` / `--pandoc-templates` the directories of the worker's Pandoc filters and templates -- `all` extra (`pip install 'dsw-tdk[all]'`) with the optional dependencies of rendering steps (PDF, Excel, RDF, HTTP) -- `language` field in `template.json` (prompted by `dsw-tdk new`, defaults to `en`) - `put --workspace UUID` (or `DSW_WORKSPACE`) creates a new draft in a workspace; by default it is created for the whole organization - New `get-context` command downloading the document context of a project (as of an event) or a knowledge model editor; it fails when the server's document context metamodel is not the TDK's - New `validate-context` command checking document contexts (`--fix-hash` rewrites a wrong hash) @@ -23,25 +26,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Update to DT metamodel 18.3 -- Metamodel version handling is shared with `dsw-models` (now a dependency) -- The `pot` command extracts messages with `dsw-templating` (now a dependency), the same code as the document worker, instead of a copy of it -- The `template.json` written into a package is built and validated as the shared `DocumentTemplateBundle` from `dsw-models`, so the package shape has one definition; a template that does not match it is reported as a warning and still packaged, as before - Works with the Wizard 5.0 API: the API URL is the instance address followed by `/api` (the client address is derived by dropping it), new drafts are created with the scope a multi-workspace instance requires, and the editor link printed by `put` is the workspace page `/w//document-template-editors/` (printed only when the workspace is unambiguous) - Templates are identified by a single `id` and `version` (Wizard 5.0): `template.json` has `id` instead of `organizationId` + `templateId`, `allowedPackages` patterns have `id` instead of `orgId` + `kmId`, and commands take references `:` (e.g. `dsw-tdk get dsw.questionnaire-report:2.17.0`); a pre-5.0 `template.json` is still read and is rewritten in the new shape (`.`), `dsw-tdk new` no longer asks for an organization ID, and `put` no longer reads the organization ID of the instance - `render` requires a complete document context of metamodel 19.0 (rejecting a partial one with the file, JSON path and problem), warns when its hash does not match, and fills `document` itself as the document worker does (template and format being rendered, a preview for `document: null`); `-l/--language` now sets `document.language` - The default `list` format prints the reference `{template.coordinates}` (`:`); `{template.id}` is now the id alone -### Fixed - -- `options` of `allowedPackages` in `template.json` are no longer dropped when the TDK rewrites it -- `metamodelVersion` `"18"` is accepted as `18.0`, as the server does - ### Removed - `render` options `-D defaultAppTitleShort` and `-D defaultIllustrationsColor` (and their `DOCUMENT_CONTEXT_*` variables): Wizard 5.0 removed those context keys - `render` no longer fills `extras.questionnaire`, which the document worker no longer provides +## [4.35.0] + +### Added + +- New `pot` command creating a POT file with translatable strings of the template project +- New `render` command rendering a document from the local template project and a document context (JSON file), optionally with a PO file and project files, without any Wizard instance; rendering is done by `dsw-templating`, the same engine as the document worker uses, and only the files selected by `_tdk.files` are available to it, as on the server; the context gets the document worker's defaults (`config` service information and branding fallbacks, missing `extras`), which can be overridden with `-D NAME=VALUE` or the worker's `DOCUMENT_CONTEXT_*` environment variables; `--secret` / `--allow-requests` provide the `secrets` / `requests` globals and `--pandoc-filters` / `--pandoc-templates` the directories of the worker's Pandoc filters and templates +- `all` extra (`pip install 'dsw-tdk[all]'`) with the optional dependencies of rendering steps (PDF, Excel, RDF, HTTP) +- `language` field in `template.json` (prompted by `dsw-tdk new`, defaults to `en`) + +### Changed + +- Update to DT metamodel 18.3 +- Metamodel version handling is shared with `dsw-models` (now a dependency) +- The `pot` command extracts messages with `dsw-templating` (now a dependency), the same code as the document worker, instead of a copy of it +- The `template.json` written into a package is built and validated as the shared `DocumentTemplateBundle` from `dsw-models`, so the package shape has one definition; a template that does not match it is reported as a warning and still packaged, as before + +### Fixed + +- `options` of `allowedPackages` in `template.json` are no longer dropped when the TDK rewrites it +- `metamodelVersion` `"18"` is accepted as `18.0`, as the server does ## [4.34.0] @@ -663,7 +677,7 @@ Initial DSW Template Development Kit (versioned as part of the [DSW platform](ht - `verify` for checking template metadata - `package` for creating an importable ZIP package from local project -[Unreleased]: /../../compare/v4.34.0...main +[Unreleased]: /../../compare/v5.1.0...main [2.8.0]: https://github.com/ds-wizard/dsw-tdk/tree/v2.8.0 [2.8.1]: https://github.com/ds-wizard/dsw-tdk/tree/v2.8.1 [2.9.0]: https://github.com/ds-wizard/dsw-tdk/tree/v2.9.0 @@ -781,3 +795,6 @@ Initial DSW Template Development Kit (versioned as part of the [DSW platform](ht [4.32.0]: /../../tree/v4.32.0 [4.33.0]: /../../tree/v4.33.0 [4.34.0]: /../../tree/v4.34.0 +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/packages/dsw-templating/CHANGELOG.md b/packages/dsw-templating/CHANGELOG.md index 77b7ee2b..3bc6a4b9 100644 --- a/packages/dsw-templating/CHANGELOG.md +++ b/packages/dsw-templating/CHANGELOG.md @@ -7,22 +7,17 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [5.1.0] + +Released for version consistency with other Wizard tools. + +## [5.0.0] + ### Added -- Rendering engine of document templates extracted from `dsw-document-worker`: formats, steps, - Jinja filters and tests, document context helpers, conversions (Pandoc, WeasyPrint, RDFLib, - Excel), URL policy, HTTP requests from templates and POT file extraction -- `Template` built from a template directory and its format metadata (`Template.from_directory` - reads `template.json`), rendered with explicit `RenderSettings`, `RenderContext` and - `ProjectFileResolver` instead of the worker's configuration and services -- Optional extras `pdf`, `rdf`, `excel`, `docx`, `http` and `all`; a step whose extra is missing - fails with `MissingExtraError` when it is used -- Pandoc filters shipped as package data (`settings.bundled_pandoc_filters`) - `ctx|to_context_obj` serves document context metamodel 19.0 (see `support/DocumentContext.md`, which has a migration table from 18.x) - `enrich_context_config` no longer adds `appTitleShort` and `illustrationsColor`, which Wizard 5.0 removed from the document context; `ContextDefaults` loses `default_app_title_short` and `default_illustrations_color` -- `enrich_context_config` and `ContextDefaults`: the service information and branding fallbacks the document worker adds to `ctx.config` -- Plugins use the `dsw-templating` pluggy project and the `dsw_templating_plugins` entry point -- The `pandoc-docx-pagebreakpy` Pandoc filter is a command of this package (`docx` extra) instead of a separate addon installed only in the document worker image - `extract_replies` version `2` (`{'version': '2'}`): every annotated question is present also when unanswered or under an unselected answer, `json.value` is converted only for `true`, `false` and plain integers, number questions give numbers, and every object has `_value`; list items @@ -37,3 +32,25 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and neither the caller's dictionary nor `DEFAULT_CONFIG` is modified - `include_reply_objects` no longer fails on list and multi-choice questions; the reply is on each item and each choice object instead + +## [4.35.0] + +### Added + +- Rendering engine of document templates extracted from `dsw-document-worker`: formats, steps, + Jinja filters and tests, document context helpers, conversions (Pandoc, WeasyPrint, RDFLib, + Excel), URL policy, HTTP requests from templates and POT file extraction +- `Template` built from a template directory and its format metadata (`Template.from_directory` + reads `template.json`), rendered with explicit `RenderSettings`, `RenderContext` and + `ProjectFileResolver` instead of the worker's configuration and services +- Optional extras `pdf`, `rdf`, `excel`, `docx`, `http` and `all`; a step whose extra is missing + fails with `MissingExtraError` when it is used +- Pandoc filters shipped as package data (`settings.bundled_pandoc_filters`) +- `enrich_context_config` and `ContextDefaults`: the service information and branding fallbacks the document worker adds to `ctx.config` +- Plugins use the `dsw-templating` pluggy project and the `dsw_templating_plugins` entry point +- The `pandoc-docx-pagebreakpy` Pandoc filter is a command of this package (`docx` extra) instead of a separate addon installed only in the document worker image + +[Unreleased]: /../../compare/v5.1.0...main +[4.35.0]: /../../tree/v4.35.0 +[5.0.0]: /../../tree/v5.0.0 +[5.1.0]: /../../tree/v5.1.0 diff --git a/scripts/changelog.py b/scripts/changelog.py index 752df390..28eebd06 100644 --- a/scripts/changelog.py +++ b/scripts/changelog.py @@ -3,7 +3,7 @@ ROOT = pathlib.Path(__file__).parent.parent PKGS = ROOT / 'packages' -INFO = 'Released for version consistency with other DSW tools.' +INFO = 'Released for version consistency with other Wizard tools.' if __name__ == '__main__': @@ -24,6 +24,10 @@ f'\n\n## [{prev_version}]\n', f'\n## [{prev_version}]\n' ) + changelog = changelog.replace( + f'/compare/v{prev_version}...main', + f'/compare/v{next_version}...main' + ) changelog = changelog.replace( f'[{prev_version}]: /../../tree/v{prev_version}\n', f'[{prev_version}]: /../../tree/v{prev_version}\n' diff --git a/scripts/check-release.py b/scripts/check-release.py index cc0a4f29..846b420b 100644 --- a/scripts/check-release.py +++ b/scripts/check-release.py @@ -10,9 +10,12 @@ checkout (``actions/checkout`` defaults to ``fetch-depth: 1``) is exactly such a checkout. So before anything is uploaded to PyPI, assert that: -1. the tag is a valid PEP 440 version once ``v`` is stripped, and +1. the tag is a valid PEP 440 version once ``v`` is stripped, 2. the tag actually points at HEAD in this checkout, so the version the build - backend derives is the version being released. + backend derives is the version being released, and +3. every package changelog has a section for the version and nothing left under + ``[Unreleased]``. A release candidate needs the section of its final version + already, because the final tag goes on the same commit. Tags are written as ``v`` and normalised per PEP 440, so the tag ``v4.33.0-rc.1`` corresponds to the package version ``4.33.0rc1``. @@ -20,6 +23,7 @@ Usage: check-release.py """ import pathlib +import re import subprocess import sys @@ -49,6 +53,19 @@ def git(*args: str) -> str | None: return result.stdout.strip() +def changelog_problems(version: str) -> list[str]: + problems = [] + for path in sorted(ROOT.glob('packages/*/CHANGELOG.md')): + name = path.relative_to(ROOT) + text = path.read_text(encoding='utf-8') + if f'\n## [{version}]\n' not in text: + problems.append(f'{name} has no section [{version}]') + # Anything but whitespace between [Unreleased] and the next section + if not re.search(r'^## \[Unreleased\]\s+## \[', text, re.MULTILINE): + problems.append(f'{name} has no empty section [Unreleased]') + return problems + + def main() -> int: if len(sys.argv) != 2: print('Usage: check-release.py ') @@ -95,6 +112,13 @@ def main() -> int: return 1 print(f' OK git describe --exact-match: {described}') + problems = changelog_problems(expected.base_version) + if problems: + for problem in problems: + print(f'::error::{problem}') + return 1 + print(f' OK changelogs are ready for {expected.base_version}') + print(f'Release tag "{tag}" ({expected}) is safe to build and publish') return 0