Package: qualia-plugin-template
Qualia-Plugin-TemplateCopyright 2023 © Pierre-Emmanuel Novacpenovac@unice.frUniversité Côte d'Azur, LEAT. All rights reserved.Template plugin for Qualia.How to create a plugin from the templateInstall QualiaInstall Qualia with the developer setup using PDM by following theInstallation guide.Install Qualia-Plugin-TemplateMove into the base Qualia folder, then clone the Qualia-Plugin-Template repository:git clone ssh://git@naixtech.unice.fr:2204/qualia/qualia-plugin-template.gitIf you do not have an SSH key registered in Gitlab, use the HTTPS URL instead:git clone https://naixtech.unice.fr/gitlab/qualia/qualia-plugin-template.gitThen install it:pdm add -e ./qualia-plugin-template --devCreate a new Git repository for your pluginIn the Gitlab web interface of theQualia group,
create a new repository by clicking theNew projectbutton. SelectCreate blank project.SetQualia-Plugin-<name>as the project name, with<name>replaced by the name of your plugin.Select the appropriate visibility levelUncheckInitialize repository with a README.Finally, clickCreate project.Generate a plugin project from the templateMove into the base Qualia folder, then generate the plugin project:pdm run qualia-create-plugin <name><name>should be replaced by the name of your plugin (without thequalia-plugin-prefix).Then, follow the questions asked to provide the author's name and email address, the homepage and git repository of the plugin.For more information about the structure of the created plugin project,
seeRepository structure.Push the new plugin to the git repositoryMove into the newly created plugin's folder:cd qualia-plugin-<name>Then push the new content to the repository:git push -u origin masterEdit the plugin dependenciesEdit thepyproject.tomlfile to fill the dependencies required by your plugin,
in particular any other required Qualia plugin.
You can choose between mandatory or optional dependencies.
Any item inside angle brackets<>must be replaced by a value of your choice.Mandatory dependencies[project]
dependencies = [
  '<dependency1>',
  '<…>',
  '<dependencyN>',
]Optional dependency groups[project.optional-dependencies]
<group1> = ['<dependency1>', '<…>', '<dependencyN>']
<…>
<groupN> = ['<dependency1>', '<…>', '<dependencyN>']EditREADME.mdEdit theREADME.mdfile to provide the description of your plugin, a short user guide and any information that the user must know about to use your plugin.Install the plugin and its dependenciesMove into the base Qualia folder, then install your plugin:Then install it:pdm add -e ./qualia-plugin-<name>[<group1>,<group2>] --devwith<name>the name of your plugin and<group1>,<group2>optional dependency groups.Edit documentation builder configurationIf the documentation of the plugin needs to cross-reference external Python modules, add the link to the documentation in the InterSphinx mapping of thedocs/conf.pyfile.
Any item inside angle brackets<>must be replaced by a value of your choice.intersphinx_mapping = {
    '<external_module_name>': ('<documentation_url>', None),
}Provide the Python source files of your moduleAdd any source file for your module under one of Qualia's package in thesrc/qualia_plugin_<name>/folder.Dummy modules for the dataset, learningmodel.pytorch, postprocessing and preprocessing are supplied in the template to illustrate adding new modules for these packages.
A learningframework override for PyTorch is provided to illustrate overriding an existing module, and, in this case, import the supplied Dummy learningmodel for use with PyTorch.
These Dummy modules must be removed before publishing you plugin, unnecessary packages should also be removed.For more information about the various Qualia packages, seePython package structure.
For more information about how the plugin's packages are loaded, seePlugin architecture.Provide example configuration filesAdd example configuration files in theconf/directory to demonstrate the usage of your plugin.All configuration files must load the plugin:[bench]
plugins = ['qualia_plugin_<name>']A Dummy configuration is provided in the template to load the provided Dummy modules. The Dummy configuration must be removed before publishing your plugin.For more information about configuration files, see:Configuration fileProvide documentationAdd any API documentation as docstrings in your source files.Add any high-level documentation pages in thedocs/directory and reference them in the documentation homepage filedocs/index.rst.For more information about writing documentation, see:Writing documentation.Provide tests for your plugin modulesAdd any automatic testing modules that use the PyTest framework in thetests/directory.For more information about tests, see:Tests