-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* NEW: API docs for plugins * META: Add note on docstring source locations
- Loading branch information
Showing
15 changed files
with
454 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(Citations-api-docs)= | ||
# Citations | ||
QIIME 2 can automatically track citations as a user performs an analysis. | ||
This is done via <project:#CitationRecord> and lists of them | ||
(<inv:python:py:class:#list> and <project:#Citations>). | ||
|
||
|
||
```{eval-rst} | ||
.. autoclass:: qiime2.plugin.Citations | ||
:members: | ||
:special-members: __iter__ | ||
.. autoclass:: qiime2.plugin.CitationRecord | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Pipeline Context Object | ||
The context object is available to pipelines as a required first argument ``ctx``. | ||
Plugins may use these methods to invoke other registered actions or create artifacts. | ||
|
||
|
||
```{eval-rst} | ||
.. automethod:: qiime2.sdk.Context.get_action | ||
.. automethod:: qiime2.sdk.Context.make_artifact | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(Formats-api-docs)= | ||
# Formats | ||
|
||
```{eval-rst} | ||
.. autoclass:: qiime2.plugin.TextFileFormat | ||
.. autoclass:: qiime2.plugin.BinaryFileFormat | ||
.. autoclass:: qiime2.plugin.DirectoryFormat | ||
.. autofunction:: qiime2.plugin.SingleFileDirectoryFormat | ||
.. autoclass:: qiime2.plugin.ValidationError | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
(plugin-developer-api)= | ||
# Plugin Development API | ||
This section details the public API for plugin development. | ||
Broadly speaking, everything that is necessary to build a QIIME 2 plugin is | ||
available in `qiime2.plugin` or `qiime2.metadata`. | ||
|
||
## Individual Topics | ||
```{tableofcontents} | ||
``` | ||
|
||
## Plugin API List | ||
|
||
```{eval-rst} | ||
.. rubric:: Plugin Object | ||
.. autosummary:: | ||
:nosignatures: | ||
qiime2.plugin.Plugin | ||
.. rubric:: Registration | ||
.. currentmodule:: qiime2.plugin | ||
.. autosummary:: | ||
:nosignatures: | ||
plugin.PluginMethods.register_function | ||
plugin.PluginVisualizers.register_function | ||
plugin.PluginPipelines.register_function | ||
Plugin.register_validator | ||
Plugin.register_transformer | ||
Plugin.register_formats | ||
Plugin.register_views | ||
Plugin.register_semantic_types | ||
Plugin.register_semantic_type_to_format | ||
Plugin.register_artifact_class | ||
.. currentmodule:: None | ||
.. rubric:: Formats | ||
.. autosummary:: | ||
:nosignatures: | ||
qiime2.plugin.TextFileFormat | ||
qiime2.plugin.BinaryFileFormat | ||
qiime2.plugin.DirectoryFormat | ||
qiime2.plugin.SingleFileDirectoryFormat | ||
qiime2.plugin.ValidationError | ||
.. rubric:: Types | ||
.. autosummary:: | ||
:nosignatures: | ||
qiime2.plugin.SemanticType | ||
qiime2.plugin.Properties | ||
qiime2.plugin.Visualization | ||
qiime2.plugin.Bool | ||
qiime2.plugin.Str | ||
qiime2.plugin.Int | ||
qiime2.plugin.Float | ||
qiime2.plugin.Threads | ||
qiime2.plugin.Jobs | ||
qiime2.plugin.Choices | ||
qiime2.plugin.Range | ||
qiime2.plugin.Start | ||
qiime2.plugin.End | ||
qiime2.plugin.Metadata | ||
qiime2.plugin.MetadataColumn | ||
qiime2.plugin.Categorical | ||
qiime2.plugin.Numeric | ||
qiime2.plugin.Set | ||
qiime2.plugin.List | ||
qiime2.plugin.Collection | ||
qiime2.plugin.TypeMap | ||
qiime2.plugin.TypeMatch | ||
.. rubric:: Citations | ||
.. autosummary:: | ||
:nosignatures: | ||
qiime2.plugin.Citations | ||
qiime2.plugin.CitationRecord | ||
.. rubric:: Testing | ||
.. autosummary:: | ||
:nosignatures: | ||
qiime2.plugin.testing.TestPluginBase | ||
qiime2.plugin.testing.assert_no_nans_in_tables | ||
.. rubric:: Utilities | ||
.. autosummary:: | ||
:nosignatures: | ||
qiime2.util.duplicate | ||
qiime2.util.redirected_stdio | ||
qiime2.plugin.util.transform | ||
qiime2.plugin.util.get_available_cores | ||
``` | ||
|
||
## Additional Objects | ||
These objects are not part of the `qiime2.plugin` module, but are commonly used | ||
by plugins (and users). | ||
|
||
```{eval-rst} | ||
.. rubric:: Metadata | ||
.. autosummary:: | ||
:nosignatures: | ||
qiime2.Metadata | ||
qiime2.MetadataColumn | ||
qiime2.NumericMetadataColumn | ||
qiime2.CategoricalMetadataColumn | ||
.. rubric:: Pipeline Context Object (ctx) | ||
.. currentmodule:: qiime2.sdk | ||
.. autosummary:: | ||
Context.get_action | ||
Context.make_artifact | ||
.. currentmodule:: qiime2.sdk.usage | ||
.. rubric:: Usage Examples | ||
.. autosummary:: | ||
:nosignatures: | ||
Usage.init_artifact | ||
Usage.init_artifact_from_url | ||
Usage.init_artifact_collection | ||
Usage.init_metadata | ||
Usage.init_metadata_from_url | ||
Usage.init_format | ||
Usage.import_from_format | ||
Usage.construct_artifact_collection | ||
Usage.get_artifact_collection_member | ||
Usage.get_metadata_column | ||
Usage.view_as_metadata | ||
Usage.merge_metadata | ||
Usage.comment | ||
Usage.help | ||
Usage.peek | ||
Usage.action | ||
Usage.UsageAction | ||
Usage.UsageInputs | ||
Usage.UsageOutputNames | ||
UsageOutputs | ||
UsageVariable | ||
UsageVariable.assert_has_line_matching | ||
UsageVariable.assert_output_type | ||
.. currentmodule:: None | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(Plugin-api-docs)= | ||
# Plugin & Registration | ||
```{eval-rst} | ||
.. autoclass:: qiime2.plugin.Plugin | ||
:members: | ||
``` | ||
|
||
## Action registration | ||
The following classes exist only on an instantiated <project:#Plugin> object and are generally accessed via | ||
``plugin.methods``, ``plugin.visualizers``, and ``plugin.pipelines``. At this time, ``register_function`` is the only | ||
interesting method for a plugin developer. Otherwise these objects are essentially dictionaries to makes generating interfaces convenient. | ||
|
||
```{eval-rst} | ||
.. autoclass:: qiime2.plugin.plugin.PluginMethods | ||
:members: register_function | ||
.. autoclass:: qiime2.plugin.plugin.PluginVisualizers | ||
:members: register_function | ||
.. autoclass:: qiime2.plugin.plugin.PluginPipelines | ||
:members: register_function | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(Testing-api-docs)= | ||
# Testing | ||
|
||
```{eval-rst} | ||
.. autoclass:: qiime2.plugin.testing.TestPluginBase | ||
:members: | ||
.. autofunction:: qiime2.plugin.testing.assert_no_nans_in_tables | ||
``` |
Oops, something went wrong.