Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvaccess/addon-datastore-transform
Transforms data so it can be accessed in nvaccess/addonDataViews
https://github.com/nvaccess/addon-datastore-transform
Last synced: about 2 months ago
JSON representation
Transforms data so it can be accessed in nvaccess/addonDataViews
- Host: GitHub
- URL: https://github.com/nvaccess/addon-datastore-transform
- Owner: nvaccess
- License: gpl-2.0
- Created: 2021-08-18T05:39:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-09T07:14:11.000Z (4 months ago)
- Last Synced: 2024-09-09T08:40:23.862Z (4 months ago)
- Language: Python
- Size: 88.9 KB
- Stars: 1
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# addon-datastore-transform
This repository primarily exists to transform data from [nvaccess/addon-datastore:master](https://github.com/nvaccess/addon-datastore) to views located at [nvaccess/addon-datastore:views](https://github.com/nvaccess/addon-datastore/tree/views).For each NVDA version that needs to be supported by the add-on store, an entry must be added to [`nvdaAPIVersions.json`](https://github.com/nvaccess/addon-datastore-transform/blob/main/nvdaAPIVersions.json).
This includes patch versions.## 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`.## Setup
```sh
pip install -r requirements.txt
```## Usage
```
python -m src.transform {nvdaAPIVersionsPath} {inputPath} {outputPath} [logLevel]
```### nvdaAPIVersionsPath
A path to the nvdaAPIVersions, see the schema: [`src\validate\nvdaAPIVersions.schema.json`](https://github.com/nvaccess/addon-datastore-transform/blob/main/src/validate/nvdaAPIVersions.schema.json) and current values [`nvdaAPIVersions.json`](https://github.com/nvaccess/addon-datastore-transform/blob/main/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](https://github.com/nvaccess/addon-datastore/blob/master/README.md#layout).#### Input file data
The expected input schema for each file can be found at [nvaccess/addon-datastore-validation](https://github.com/nvaccess/addon-datastore-validation/blob/main/_validate/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](./docs/output.md) describes how the data is structured and what it is used for.## Run linting and tests
[Tox](https://tox.readthedocs.io/) configures the environment, runs the tests and linting.```sh
tox
```## Validating data files
Data files can be validated using the following script:
```sh
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](https://github.com/nvaccess/addon-datastore-transform/blob/main/nvdaAPIVersions.json).
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`](https://github.com/nvaccess/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:
```sh
python -m src.validate src/validate/nvdaAPIVersions.schema.json nvdaAPIVersions.json
```