You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flatten views structure: reduce space complexity by 2 dimensions (#8258)
Part of #7585Closes#5903
Must be merged in coordination with Switch views repo docker-addonstore#36
Structure change
The current add-on views structure is too wide. It has storage complexity of O(numAddonFiles * numLanguages * numNVDAAPIVersions * numChannels). This should just be O(numAddonFiles).
This PR reduces the structure to O(numAddonFiles * numLanguages).
The current file structure for add-on views is:
views/en/2019.1.0/UIANotificationSwitch/stable.json
Generated from files committed to this branch as:
addons/AbsoluteYoutube/2026.2.0.json
File paths in the current views structure now serve as symlinks which point to files like addons/UIANotificationSwitch/2026.1/en.json which is generated from the translations in addons/AbsoluteYoutube/2026.2.0.json
Improvements
Size
The new views size is 264 MB, the old views size was 13GB.
Checked with: (Get-ChildItem . -Recurse -Force -File | Measure-Object Length -Sum).Sum).
Transform step speed
The old transform step took about 1.5-2h.
The new transform step takes about 10-15min.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Add-on Store
2
2
3
-
The addon-datastore repository is a data pipeline of submitting, validating and transforming add-on data to views.
4
-
These views are hosted on the NV Access server and are available in the NVDA Add-on Store.
3
+
The addon-datastore repository is a data pipeline for submittingand validating add-on data.
4
+
Transformed add-on store data is produced with add-on files and symlinked views for hosting on the NV Access server.
5
5
6
6
Please note: the NVDA project including the Add-on Store has a [Citizen and Contributor Code of Conduct](https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md).
7
7
NV Access expects that all contributors and other community members will read and abide by the rules set out in this document while participating in the project or contributing add-ons.
Copy file name to clipboardExpand all lines: docs/design/designOverview.md
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,27 +63,34 @@ Aims:
63
63
- While this is technically not necessary, it provides a good separation from implementation.
64
64
If we wished to change our storage mechanism, we would not be breaking old versions of NVDA.
65
65
66
-
67
66
## API data generation details
68
67
69
-
Triggered by a new commit to the `master` branch, [a GitHub workflow](../../.github/workflows/transformDataToViews.yml), [addon-datastore-transform](https://github.com/nvaccess/addon-datastore-transform), transforms the data into the required views.
68
+
Triggered by a new commit to the `master` branch, [a GitHub workflow](../../.github/workflows/transformDataToViews.yml), and the [transform](../../transform/) module, transforms the data into add-on files and projected views.
70
69
71
70
For each NVDA API version and channel, the add-on metadata with the highest version number is written.
72
71
73
-
These views are then committed by the GitHub Action to the [views branch](https://github.com/nvaccess/addon-datastore/tree/views).
72
+
This transformed data is then committed by the GitHub Action to the [addonstore-views](https://github.com/nvaccess/addonstore-views) main branch.
74
73
75
74
### Data views
76
-
The following views will only be available on the [views branch](https://github.com/nvaccess/addon-datastore/tree/views) and located in a `views` folder.
77
-
Required transformations of the data:
78
-
-`/NVDA API Version/addon-1-ID/stable.json`
79
-
-`/NVDA API Version/addon-1-ID/beta.json`
80
-
-`/NVDA API Version/addon-2-ID/stable.json`
75
+
76
+
The generated data is stored in two top-level folders:
77
+
78
+
-`addons`: add-on data files by add-on version and language.
79
+
-`views`: compatibility and latest projections as relative symlinks into `addons`.
80
+
81
+
The following projected views are available in the `views` folder.
82
+
83
+
The views folder is expected to have the following structure:
This hash will change whenever new add-on data is available.
121
-
The hash should match the latest commit hash of the [views branch](https://github.com/nvaccess/addon-datastore/commits/views).
129
+
For testing purposes, the hash should match the latest commit hash of the transformed [addonstore-views](https://github.com/nvaccess/addonstore-views) branch.
122
130
123
131
-<https://addonStore.nvaccess.org/cacheHash.json>
124
132
- Example return value: `"5fcf12f"`
125
133
126
-
### Legacy
127
-
This endpoint mirrors the legacy [get.php, from the addonFiles repository](https://github.com/nvaccess/addonFiles/blob/master/get.php).
128
-
129
134
#### `addonslist` end-point
130
135
131
136
The `addonslist` parameter generates a list of list of add-ons using the same logic as the [latest end-point](#get-latest) for all channels.
Copy file name to clipboardExpand all lines: transform/README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,13 @@
1
1
# Transforming data to views
2
2
3
-
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).
3
+
This module transforms add-on metadata into an output data layout with add-on files and views.
4
+
The output is designed to be published from a single branch.
4
5
5
6
For each NVDA version that needs to be supported by the add-on store, an entry must be added to [`nvdaAPIVersions.json`](./nvdaAPIVersions.json).
6
7
This includes patch versions.
7
8
9
+
This module should be run from linux, as symlinks are created for the server component.
10
+
8
11
## Overview
9
12
10
13
For each version of NVDA, the meta-data of the most recent (the highest version number) of each add-on is automatically
The system differentiates patch releases from major releases to cater to the (very unlikely) event of requireing a breaking change or introduction to the NVDA add-on API.
34
+
The system differentiates patch releases from major releases to cater to the (very unlikely) event of requiring a breaking change or introduction to the NVDA add-on API.
16
35
17
36
## Output file data
18
-
Each addon file is the addon data taken from input that is the latest compatible version, with the given requirements `(NVDA API Version, addon-ID, stable|beta|dev)`.
19
-
The transformed data file content will be the same as the input.
20
-
The contents for each addon file includes all the technical details required for NVDA to download, verify file integrity, and install.
37
+
38
+
Add-on files in `/addons` contain transformed add-on metadata by add-on version and language.
39
+
Views in `/views` are relative symlinks to files in `/addons`.
40
+
41
+
For each required view `(language, NVDA API Version, addon-ID, channel)`, the view symlink points at a single file:
42
+
43
+
- Prefer exact language translation
44
+
- Otherwise prefer language without locale (`pt_BR` -> `pt`)
45
+
- Otherwise fallback to `en`
46
+
47
+
Each transformed add-on file includes all technical details required for NVDA to download, verify file integrity, and install.
21
48
It also contains the information necessary for a store entry.
22
-
Later, translated versions will become available.
23
49
24
50
## Output notes
51
+
25
52
This structure simplifies the processing on the hosting (e.g. NV Access) server.
26
-
To fetch the latest add-ons for `<NVDA API Version X>`, the server can concatenate the appropriate JSON files that match a glob: `/<NVDA API Version X>/*/stable.json`.
27
-
Similarly, to fetch the latest version of an add-on with `<Addon-ID>` for `<NVDA API Version X>`. The server can return the data at `/<NVDA API Version X>/<addon-ID>/stable.json`.
53
+
To fetch the latest add-ons for `<NVDA API Version X>`, the server can concatenate the appropriate JSON files that match a glob: `/views/<lang>/<NVDA API Version X>/*/stable.json`.
54
+
Similarly, to fetch the latest version of an add-on with `<Addon-ID>` for `<NVDA API Version X>`, the server can return the data at `/views/<lang>/<NVDA API Version X>/<addon-ID>/stable.json`.
28
55
Using the NV Access server as the endpoint for this is important in case the implementation has to change or be migrated away from GitHub for some reason.
0 commit comments