Skip to main content

Qualia-Plugin-Template

Copyright 2023 © Pierre-Emmanuel Novac penovac@unice.fr Université Côte d'Azur, LEAT. All rights reserved.

Template plugin for Qualia.

How to create a plugin from the template

Install Qualia

Install Qualia with the developer setup using PDM by following the Installation guide.

Install Qualia-Plugin-Template

Move into the base Qualia folder, then clone the Qualia-Plugin-Template repository:

git clone ssh://git@naixtech.unice.fr:2204/qualia/qualia-plugin-template.git

If 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.git

Then install it:

pdm add -e ./qualia-plugin-template --dev

Create a new Git repository for your plugin

In the Gitlab web interface of the Qualia group, create a new repository by clicking the New project button. Select Create blank project.

Set Qualia-Plugin-<name> as the project name, with <name> replaced by the name of your plugin.

Select the appropriate visibility level

Uncheck Initialize repository with a README.

Finally, click Create project.

Generate a plugin project from the template

Move 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 the qualia-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, see Repository structure.

Push the new plugin to the git repository

Move into the newly created plugin's folder:

cd qualia-plugin-<name>

Then push the new content to the repository:

git push -u origin master

Edit the plugin dependencies

Edit the pyproject.toml file 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>']

Edit README.md

Edit the README.md file 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 dependencies

Move into the base Qualia folder, then install your plugin:

Then install it:

pdm add -e ./qualia-plugin-<name>[<group1>,<group2>] --dev

with <name> the name of your plugin and <group1>, <group2> optional dependency groups.

Edit documentation builder configuration

If the documentation of the plugin needs to cross-reference external Python modules, add the link to the documentation in the InterSphinx mapping of the docs/conf.py file. 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 module

Add any source file for your module under one of Qualia's package in the src/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, see Python package structure. For more information about how the plugin's packages are loaded, see Plugin architecture.

Provide example configuration files

Add example configuration files in the conf/ 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 file

Provide documentation

Add any API documentation as docstrings in your source files.

Add any high-level documentation pages in the docs/ directory and reference them in the documentation homepage file docs/index.rst.

For more information about writing documentation, see: Writing documentation.

Provide tests for your plugin modules

Add any automatic testing modules that use the PyTest framework in the tests/ directory.

For more information about tests, see: Tests

Metadata

Release files for qualia-plugin-template 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qualia-plugin-template 2.3.0
File Size Uploaded Provenance Actions
qualia_plugin_template-2.3.0.tar.gz 27.7 kB Without provenance Details for qualia_plugin_template-2.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qualia-plugin-template 2.3.0
File Interpreter ABI Platform Actions
qualia_plugin_template-2.3.0-py3-none-any.whl Python 3 none any Details for qualia_plugin_template-2.3.0-py3-none-any.whl

Total release size: 64.0 kB

Release files / qualia_plugin_template-2.3.0.tar.gz

Download URL qualia_plugin_template-2.3.0.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6d7283de4065a5a02674afaf54fc5676f9a6aa492082f253f153e42ef58d02ae
BLAKE2b-256 checksum
How to use checksums
175769709d73f828a44f02a84f11aa70d847acade17dc33fea98fafdc383733f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.16.1 CPython/3.12.4 Linux/6.9.8-arch1-1

Release files / qualia_plugin_template-2.3.0-py3-none-any.whl

Download URL qualia_plugin_template-2.3.0-py3-none-any.whl
Size 36.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3a10b114ea8cf7bb7aee209d3cbc2006beb733f5392661f4baef1e99488cd18
BLAKE2b-256 checksum
How to use checksums
ab2d3bf588c0d29d0df48a6062581cac9f6540b6473a99ed0faca73d60d92de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.16.1 CPython/3.12.4 Linux/6.9.8-arch1-1

Security for qualia-plugin-template 2.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page