Plugins¶
Plugins allow one to add Python-based functionality to NOMAD without a custom NOMAD image or release. Plugins can be installed at NOMAD start-up time. Therefore, a NOMAD installation or Oasis can be configured with a different custom set of plugins or disable unnecessary plugins.
Note
You might also want to read the how-to guide on plugins
Plugin entry point reference¶
This is a list of the available plugin entry point configuration models.
AppEntryPoint¶
Base model for app plugin entry points.
name | type | |
---|---|---|
id | str | None |
Unique identifier corresponding to the entry point name. Automatically set to the plugin entry point name in pyproject.toml. |
entry_point_type | str |
Determines the entry point type. default: app |
name | str | None |
Name of the plugin entry point. |
description | str | None |
A human readable description of the plugin entry point. |
plugin_package | str | None |
The plugin package from which this entry points comes from. |
app | App |
The app configuration. default: PydanticUndefined |
ExampleUploadEntryPoint¶
Base model for example upload plugin entry points.
name | type | |
---|---|---|
id | str | None |
Unique identifier corresponding to the entry point name. Automatically set to the plugin entry point name in pyproject.toml. |
entry_point_type | str |
Determines the entry point type. default: example_upload |
name | str | None |
Name of the plugin entry point. |
description | str | None |
Longer description of the example upload. default: PydanticUndefined |
plugin_package | str | None |
The plugin package from which this entry points comes from. |
category | str | None |
Category for the example upload. default: PydanticUndefined |
title | str | None |
Title of the example upload. default: PydanticUndefined |
resources | None | list[UploadResource | str] | UploadResource | str |
List of data resources for this example upload. |
path | str | None |
deprecated |
url | str | None |
deprecated |
from_examples_directory | bool |
Whether this example upload should be read from the "examples" directory. default: False |
NormalizerEntryPoint¶
Base model for normalizer plugin entry points.
name | type | |
---|---|---|
id | str | None |
Unique identifier corresponding to the entry point name. Automatically set to the plugin entry point name in pyproject.toml. |
entry_point_type | str |
Determines the entry point type. default: normalizer |
name | str | None |
Name of the plugin entry point. |
description | str | None |
A human readable description of the plugin entry point. |
plugin_package | str | None |
The plugin package from which this entry points comes from. |
level | int |
Integer that determines the execution order of this normalizer. Normalizers are run in order from lowest level to highest level. default: 0 |
ParserEntryPoint¶
Base model for parser plugin entry points.
name | type | |
---|---|---|
id | str | None |
Unique identifier corresponding to the entry point name. Automatically set to the plugin entry point name in pyproject.toml. |
entry_point_type | str |
Determines the entry point type. default: parser |
name | str | None |
Name of the plugin entry point. |
description | str | None |
A human readable description of the plugin entry point. |
plugin_package | str | None |
The plugin package from which this entry points comes from. |
level | int |
Integer that determines the execution order of this parser. Parser with lowest level will attempt to match raw files first. default: 0 |
aliases | list[str] |
List of alternative parser names. default: [] |
mainfile_contents_re | str | None |
A regular expression that is applied the content of a potential mainfile. If this expression is given, the parser is only considered for a file, if the expression matches. |
mainfile_name_re | str |
A regular expression that is applied the name of a potential mainfile. If this expression is given, the parser is only considered for a file, if the expression matches. default: .* |
mainfile_mime_re | str |
A regular expression that is applied the mime type of a potential mainfile. If this expression is given, the parser is only considered for a file, if the expression matches. default: .* |
mainfile_binary_header | bytes | None |
Matches a binary file if the given bytes are included in the file. |
mainfile_binary_header_re | bytes | None |
Matches a binary file if the given binary regular expression bytes matches the file contents. |
mainfile_alternative | bool |
If True, the parser only matches a file, if no other file in the same directory matches a parser. default: False |
mainfile_contents_dict | dict | None |
Is used to match structured data files like JSON or HDF5. |
supported_compressions | list[str] |
Files compressed with the given formats (e.g. xz, gz) are uncompressed and matched like normal files. default: [] |
SchemaPackageEntryPoint¶
Base model for schema package plugin entry points.
name | type | |
---|---|---|
id | str | None |
Unique identifier corresponding to the entry point name. Automatically set to the plugin entry point name in pyproject.toml. |
entry_point_type | str |
Specifies the entry point type. default: schema_package |
name | str | None |
Name of the plugin entry point. |
description | str | None |
A human readable description of the plugin entry point. |
plugin_package | str | None |
The plugin package from which this entry points comes from. |
APIEntryPoint¶
Base model for API plugin entry points.
name | type | |
---|---|---|
id | str | None |
Unique identifier corresponding to the entry point name. Automatically set to the plugin entry point name in pyproject.toml. |
entry_point_type | str |
Specifies the entry point type. default: api |
name | str | None |
Name of the plugin entry point. |
description | str | None |
A human readable description of the plugin entry point. |
plugin_package | str | None |
The plugin package from which this entry points comes from. |
prefix | str |
The prefix for the API. The URL for the API will be the base URL of the NOMAD installation followed by this prefix. The prefix must not collide with any other API prefixes. There is no default, this field must be set. |
Default plugin entry points¶
This is a list of the plugin entry points that are activated by default:
example_upload: example_uploads/1_basic_examples/1_theory, example_uploads/1_basic_examples/2_eln, example_uploads/1_basic_examples/3_tables, example_uploads/2_tutorials/1_rdm_tutorial, example_uploads/2_tutorials/2_cow_tutorial
app: apps/1_all/1_entries, apps/2_theory/1_calculations, apps/2_theory/2_materials, apps/3_experiment/1_eln, apps/3_experiment/2_eels