Skip to content

Latest commit

 

History

History
77 lines (49 loc) · 2.9 KB

File metadata and controls

77 lines (49 loc) · 2.9 KB

Transforming data to views

This repository transforms add-on metadata into an output data layout with add-on files and views. The output is designed to be published from a single branch.

For each NVDA version that needs to be supported by the add-on store, an entry must be added to nvdaAPIVersions.json. This includes patch versions.

This module should be run from linux, as symlinks are created for the server component.

Overview

For each version of NVDA, the meta-data of the most recent (the highest version number) of each add-on is automatically added, based on the data in addon-datastore.

Usage

python -m src.transform {nvdaAPIVersionsPath} {inputPath} {outputPath} [logLevel]

nvdaAPIVersionsPath

A path to the nvdaAPIVersions, see the schema: nvdaAPIVersions.schema.json and current values nvdaAPIVersions.json. This is an array of NVDA API Versions, and what API Version they are backwards compatible to. This allows us to list which versions an addon is compatible for.

inputPath

Expects a directory.

Input file structure

As this repo consumes data from nvaccess/addon-datastore, see nvaccess/addon-datastore README layout.

Input file data

The expected input schema for each file can be found at addonVersion_schema.json.

outputPath

Expects a path to a non-existent directory. Will create the path to that directory.

Writes the output data to this directory. Output documentation describes how the data is structured and what it is used for.

Run linting and tests

Tox configures the environment, runs the tests and linting.

tox

Validating data files

Data files can be validated using the following script:

python -m src.validate {pathToSchema} {pathToDataFile}

Supported NVDA versions

The transformation creates a projection of the add-on metadata for each NVDA Add-on API Version. Patch releases of NVDA also need to be added. Older versions of NVDA won't have the add-on store built in, but projections for these older versions of the NVDA add-on API can be be browsed or rehosted elsewhere, to be used for earlier NVDA versions.

For all NVDA versions older than NVDA 2019.3, the NVDA API version is 0.0.0. The next API version introduced was 2019.3 in the NVDA commit 899528849792e79b97d67de179f7473cee06b849.

nvdaAPIVersions.json serves as source of truth for NVDA API versions supported by the views transformation.

To validate this file, run the following:

python -m src.validate src/validate/nvdaAPIVersions.schema.json nvdaAPIVersions.json