This is a "GitHub Action" repository. The Action aims to validate the metadata of add-ons submitted to NVDA's add-on store.
- Check that the added metadata:
- Conforms with the addonVersion_schema.json file.
- File has the correct path and name:
addon1/majorVersion.minorVersion.patch.json
- Download URL is valid:
- Must start with "https://" and end with".nvda-addon"
- The
*.nvda-addon
file can be downloaded
- The Sha256 of the downloaded
*.nvda-addon
file matches.
- Check data matches the addon's manifest file.
- The manifest exists in the downloaded
*.nvda-addon
file and can be loaded by theAddonManifest
class. - The submission addonName matches the manifest summary field
- The submission description matches the manifest description field
- The homepage URL matches the manifest URL field
- The addon versions match
- The last tested & minimum required versions are valid NVDA API versions.
- The manifest exists in the downloaded
If all is valid, "Congratulations: manifest, metadata and file path are valid" is printed.
- Python.
- Tested with: 3.8, 32 bit
To try validating an addon submission on your own machine.
From cmd.exe:
- Clone this repo:
git clone https://github.com/nvaccess/addon-datastore-validation.git
- From the repo folder, run:
runvalidate <pathToAddonMetadataFile.json> <pathToFileWithAPIVersions.json>
To test the scripts used in this action, you can run the unit tests.
- Install tox:
pip install tox
tox
To keep a consistent style within the Python files of this Action, linting is used:
- Use cmd.exe
cd
to the repo folderrunlint
To get the sha256 of a file:
- Use cmd.exe
runsha <path\to\filename>