A web application hosted at https://module-library.jasp-stats.org/ that allows you to search/filter all the available JASP modules and install them.
The web application is designed to be opened from inside JASP desktop application, but it can also be used as a standalone web application.
The JASP desktop application tells the web application which version/architecture it is and which modules are installed by using a Qt WebChannel.
In a standalone web application you can tell the web application which version/architecture it is and which modules are installed by using search parameters (?key=val) in the URL.
- v: the version of the JASP desktop application for example
0.95.0-release.0 - a: the architecture of the JASP desktop application for example
Windows_x86-64 - i: installed modules. A JSON object with the module id (repository name) as keys and their versions as values. The object has to be URL encoded. For example,
{"jaspEquivalenceTTests":"0.95.0-release.0","jaspTTests":"0.94.0-release.0"}becomes%7B%22EjaspEquivalenceTTests%22%3A%220.95.0-release.0%22%2C%22T-Tests%22%3A%220.94.0-release.0%22%7D. - u: List of modules that can be uninstalled. As a JSON array, it has to be URL encoded. For example,
["jaspTTests","jaspRegression"]becomes%5B%22jaspTTests%22%2C%22jaspRegression%22%5D. - p: show pre-releases initially. Use
trueto show pre-releases and usefalseto hide them initially. - c: URL for the list of modules aka index.json.
When not set uses
index.json(public/index.jsonin local development or on deployed site useshttps://jasp-stats-modules.github.io/modules-app/index.json). If URL is not a relative path aka other server then make sure correct CORS headers are returned on server that hosts index.json. - t: Theme. Use
darkfor dark theme,lightfor light theme, andsystemto match system theme (default). - l: Language. Use
enfor English (default). For example usenlfor Dutch. - f: Font name. Use the name of a font installed on your system. For example use
SansSerif. Besides OS fonts alsoFreeSans,Fira CodeandFira Code Retinafonts are available. - s: Search term to filter modules. For example
?s=testwill show modules that mention "test" in their name, description, maintainer or id. See info panel in app for more search term examples.
A full URL could look like https://jasp-stats-modules.github.io/modules-app/?a=Windows_x86-64&v=0.95.0-release.0&i=%5B%22jaspTTests%22%2C%22jaspRegression%22%5D&p=0.
The list of modules that the web application knows about can be updated by running the GitHub workflow at https://github.com/jasp-stats-modules/modules-app/actions/workflows/deploy.yml . Use the "Run workflow" button to trigger the workflow manually.
To get a list of available JASP modules, it does the following with the help of the src/scrape.ts script:
- Fetches the git submodules of HEAD of main branch of the https://github.com/jasp-stats-modules/modules-registry repository.
- the directory in which a submodule is located is called the channel
- to see translations of channel names, ensure there is a corresponding entry in src/App.content.tsx
- For each submodule parses
- the English title and description from
inst/Description.qmlfile - translations of title and description from
po/QML-<lang>.pofiles, where<lang>is the language code (for example,nlfor Dutch) - homepage URL from the
Websitefield inDESCRIPTIONfile; if missing/invalid or pointing tojasp-stats.org, it falls back to the GitHub parent repository URL (or submodule repository URL if parent is unavailable) - icon from the
iconfield ininst/Description.qml, resolved frominst/icons; icons are optimized and then embedded as data URLs
- the English title and description from
- For each submodule fetches its releases
- Fetches data for the latest 20 releases, for each repository using GitHub GraphQL API
- Filter the first 20 release assets per release ending with
.JASPModuleextension - Looks in release description for the JASP version range the module is compatible with. The version range is specified in front matter header as for example:
--- jasp: '>=0.95.0-release.0' ---
- Split releases into latest release for each JASP version range and latest pre release.
- If the latest release does not have assets for all platforms it tries to find an older release with the missing assets.
- If no releases are found in first 20 releases with all assets, then it pages to next page of releases and repeats the process until a covering release is found or there are no more releases.
- Saves data in
public/index.jsonfor the web application to use
If you want to scrape modules from an additional branch (e.g., beta) you can trigger the deploy workflow manually and specify the branch and output catalog file path.
You can then view that catalog with https://module-library.jasp-stats.org/?c=<catalog path without public/>.
To run this application locally, follow these steps:
# Install dependencies
pnpm install
export GITHUB_TOKEN=<your personal fine grained access token, only access to public repositories is needed and no other permissions>
# Scrape a list of JASP module and their release assets from HEAD of main branch of https://github.com/jasp-stats-modules/modules-registry/ and save as public/index.json
pnpm scrape
# Optionally: To scrape modules HEAD of beta branch to beta.json
# pnpm run scrape beta public/beta.json
# Start the development server
pnpm start Application will be running at http://localhost:3000 (unless stated otherwise).
Contributions are welcome! Please read the contributing guidelines for more information and developer instructions.
