|
1 | | -# Validate NVDA add-on metadata ## |
| 1 | +# Validate NVDA add-on metadata |
2 | 2 |
|
3 | 3 | This is a "GitHub Action" repository. |
4 | 4 | The Action aims to validate the metadata of add-ons submitted to |
5 | 5 | [NVDA's add-on store](https://github.com/nvaccess/addon-datastore). |
6 | 6 |
|
7 | | -- Check that the added metadata: |
8 | | - - Conforms with the |
| 7 | +* Check that the added metadata: |
| 8 | + * Conforms with the |
9 | 9 | [addonVersion_schema.json file](https://github.com/nvaccess/addon-datastore-validation/blob/main/_validate/addonVersion_schema.json). |
10 | | - - File has the correct path and name: `addon1/majorVersion.minorVersion.patch.json` |
11 | | - - Download URL is valid: |
12 | | - - Must start with "https://" and end with".nvda-addon" |
13 | | - - The `*.nvda-addon` file can be downloaded |
14 | | - - The Sha256 of the downloaded `*.nvda-addon` file matches. |
15 | | -- Check data matches the addon's manifest file. |
16 | | - - The manifest exists in the downloaded `*.nvda-addon` file and can be loaded by the `AddonManifest` class. |
17 | | - - The submission addonName matches the manifest summary field |
18 | | - - The submission description matches the manifest description field |
19 | | - - The homepage URL matches the manifest URL field |
20 | | - - The addon versions match |
21 | | - - The last tested & minimum required versions are valid NVDA API versions. |
| 10 | + * File has the correct path and name: `addon1/majorVersion.minorVersion.patch.json` |
| 11 | + * Download URL is valid: |
| 12 | + * Must start with "https://" and end with".nvda-addon" |
| 13 | + * The `*.nvda-addon` file can be downloaded |
| 14 | + * The Sha256 of the downloaded `*.nvda-addon` file matches. |
| 15 | +* Check data matches the addon's manifest file. |
| 16 | + * The manifest exists in the downloaded `*.nvda-addon` file and can be loaded by the `AddonManifest` class. |
| 17 | + * The submission addonName matches the manifest summary field |
| 18 | + * The submission description matches the manifest description field |
| 19 | + * The homepage URL matches the manifest URL field |
| 20 | + * The addon versions match |
| 21 | + * The last tested & minimum required versions are valid NVDA API versions. |
22 | 22 |
|
23 | 23 | If all is valid, "Congratulations: manifest, metadata and file path are valid" is printed. |
24 | 24 |
|
25 | | -## Dependencies ## |
| 25 | +## Dependencies |
26 | 26 |
|
27 | 27 | * [Python](https://www.python.org/). |
28 | | - - Tested with: 3.11, 32 bit |
| 28 | +* Tested with: 3.13, 64 bit |
| 29 | + |
| 30 | +## Local Usage |
29 | 31 |
|
30 | | -## Local Usage ## |
31 | 32 | To try validating an addon submission on your own machine. |
32 | 33 |
|
33 | 34 | From cmd.exe: |
34 | 35 |
|
35 | 36 | 1. Clone this repo: `git clone https://github.com/nvaccess/addon-datastore-validation.git` |
36 | 37 | 1. From the repo folder, run: `runvalidate <pathToAddonMetadataFile.json> <pathToFileWithAPIVersions.json>` |
37 | 38 |
|
38 | | -## Run unit tests: |
| 39 | +## Run unit tests |
| 40 | + |
39 | 41 | To test the scripts used in this action, you can run the unit tests. |
40 | 42 |
|
41 | 43 | 1. Install [tox](https://pypi.org/project/tox): `pip install tox` |
42 | 44 | 1. `tox` |
43 | 45 |
|
44 | | -## Python linting: |
| 46 | +## Python linting |
| 47 | + |
45 | 48 | To keep a consistent style within the Python files of this Action, linting is used: |
| 49 | + |
46 | 50 | 1. Use cmd.exe |
47 | 51 | 1. `cd` to the repo folder |
48 | 52 | 1. `runlint` |
49 | 53 |
|
50 | 54 | ## Calculate a hash (sha256) |
51 | 55 |
|
52 | 56 | To get the sha256 of a file: |
| 57 | + |
53 | 58 | 1. Use cmd.exe |
54 | 59 | 1. `runsha <path\to\filename>` |
0 commit comments