Skip to content

Conversation

@nvdaes
Copy link
Contributor

@nvdaes nvdaes commented Oct 13, 2025

This pull request adds support for a new changelog field to the add-on manifest and submission JSON schema, enabling tracking and validation of changes between add-on versions. The changes ensure that both the manifest and all related processing, validation, and test code can handle the new changelog field, including its translation in localized manifests.

Schema and Manifest Updates:

  • Added a changelog field to the AddonManifest class in _validate/addonManifest.py, and updated the manifest parsing logic to support reading and translating this field. [1] [2]
  • Updated the JSON schema in _validate/addonVersion_schema.json to define the changelog field for both the base and translations, including examples and descriptions. [1] [2]
  • Updated test data and example manifests to include the new changelog field. [1] [2]

Data Model and Processing:

  • Updated the AddonData dataclass and related processing functions in _validate/createJson.py to include changelog and its translations, handling None values properly. [1] [2] [3]
  • Updated regeneration logic in _validate/regenerateTranslations.py to process the changelog field for both the main manifest and translations.

Validation Logic:

  • Added a new validation function checkChangelogMatches in _validate/validate.py to ensure the submission changelog matches the manifest, and integrated it into the submission validation pipeline. [1] [2]

Tests:

  • Added unit tests to verify validation of the changelog field, and updated existing tests and test data to include the new field and its expected values. [1] [2]

These changes collectively introduce the changelog field into the add-on manifest and submission workflow, ensuring proper handling, validation, and testing throughout the codebase.

@seanbudd
Copy link
Member

seanbudd commented Nov 5, 2025

Ah - the idea is those are stripped too

@nvdaes
Copy link
Contributor Author

nvdaes commented Nov 5, 2025

@seanbudd

Ah - the idea is those are stripped too

Yes, I plan to do it, probably this weekend or before.

@nvdaes
Copy link
Contributor Author

nvdaes commented Nov 9, 2025

Test with an add-on including a changelog not translated: pass. The generated json file includes translated summary and description, and the changelog, but the changelog is not included in translations:

https://github.com/nvdaes/addon-datastore/actions/runs/19206166951/job/54901672327

@nvdaes
Copy link
Contributor Author

nvdaes commented Nov 9, 2025

Test submitting an add-on with a translated changelog: pass. The generated json file contains the changelog and the translated changelog for es:

https://github.com/nvdaes/addon-datastore/actions/runs/19206387890/job/54902181767

@nvdaes
Copy link
Contributor Author

nvdaes commented Nov 9, 2025

Test submitting an add-on without a changelog (and without translations): Pass. The generated json file contains a line with the following contents, which doesn't produce errors:

"translations": []

https://github.com/nvdaes/addon-datastore/actions/runs/19206656030/job/54902812136#step:15:40

@nvdaes
Copy link
Contributor Author

nvdaes commented Nov 9, 2025

@seanbudd, I think this is ready for review and perhaps merging.

@seanbudd seanbudd self-requested a review November 11, 2025 02:48
Comment on lines +27 to +31
changelog = manifest.get("changelog") # type: ignore[reportUnknownMemberType]
if changelog == "None":
# The config default is None
# which is parsed by configobj as a string not a NoneType
changelog = None
Copy link
Member

@seanbudd seanbudd Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this code can be removed as per https://github.com/nvaccess/addon-datastore-validation/pull/52/files#r2512900158

Suggested change
changelog = manifest.get("changelog") # type: ignore[reportUnknownMemberType]
if changelog == "None":
# The config default is None
# which is parsed by configobj as a string not a NoneType
changelog = None

@seanbudd seanbudd marked this pull request as draft November 11, 2025 05:30
@seanbudd
Copy link
Member

This looks good to me, just need the copilot suggestions implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants