Skip to content
Public template

About

This repo has the required folder structure and some configuration files for a JASP module.

Topics

Resources

Stars

1 star

Watchers

7 watching

Forks

Repository files navigation

jaspModuleTemplate

This template repository contains example functionality, which makes it an excellent starting point for developing a new JASP module. It contains the necessary files and structure, plus a numbers of examples to get started and to understand JASP's internals.

How to use this repository

  1. Fork this template repository to your own GitHub account
  2. Clone it to your machine
  3. Open JASP and add it as a development module

For newcomers

It is very illuminating to take a look at our examples and at the files that generate them.

For instance, the image below shows the different menus for the "Using the interface" analysis, together with the files that generate them:

For contributors

Feel free to reuse and adapt to your needs. Feel also free to remove the ones you don't need.

R wrappers

With hasWrappers: true in inst/Description.qml, every analysis can also be run from R, e.g. jaspModuleTemplate::addOne(my_number = 41). The analysis code itself is the function <func>Internal (e.g. addOneInternal in R/addOne.R); R/<func>Wrapper.R and man/<func>.Rd are generated from the QML form, with one argument per option. Export both names in NAMESPACE.

Do not edit the generated files: the workflow .github/workflows/update-wrappers.yml regenerates them on every push to master that changes a form or inst/Description.qml, and commits them. To regenerate them locally, run Rscript update-wrappers/updateWrappers.R <path to the module> from a checkout of jasp-actions, with jaspSyntax and roxygen2 installed.

Contributing back new module to JASP

Once you have developed your module, you can contribute it back to JASP by creating a pull request. The JASP team will review your module and provide feedback. Once your module is accepted, a new repo is created in the JASP organization and your module is added to the JASP module repository.

Reference

Tutorial: Development of a JASP module

About

This repo has the required folder structure and some configuration files for a JASP module.

Topics

Resources

Stars

1 star

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages