You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by mc...@apache.org on 2021/02/02 19:53:10 UTC

[incubator-hop-docs] branch asf-site updated: How to add samples to for the plugins

This is an automated email from the ASF dual-hosted git repository.

mcasters pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-hop-docs.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new cb83f1d  How to add samples to for the plugins
     new 1e88089  Merge pull request #41 from mattcasters/asf-site
cb83f1d is described below

commit cb83f1db498f26c6f93bd51dc25fc64948241a8f
Author: Matt Casters <ma...@gmail.com>
AuthorDate: Tue Feb 2 12:40:55 2021 +0100

    How to add samples to for the plugins
---
 hop-dev-manual/modules/ROOT/nav.adoc               |  1 +
 hop-dev-manual/modules/ROOT/pages/index.adoc       |  1 +
 .../modules/ROOT/pages/plugin-samples.adoc         | 41 ++++++++++++++++++++++
 3 files changed, 43 insertions(+)

diff --git a/hop-dev-manual/modules/ROOT/nav.adoc b/hop-dev-manual/modules/ROOT/nav.adoc
index 77f94c9..cd90eec 100644
--- a/hop-dev-manual/modules/ROOT/nav.adoc
+++ b/hop-dev-manual/modules/ROOT/nav.adoc
@@ -5,6 +5,7 @@
 * xref:integration-testing.adoc[Integration testing]
 * xref:internationalisation.adoc[Internationalisation (i18n)]
 * xref:plugin-development.adoc[Plugins Development]
+* xref:plugin-samples.adoc[Plugins Samples]
 ** xref:start-your-own-plugin.adoc[Creating your own plugin]
 * xref:apache-release/index.adoc[Apache Release Process]
 ** xref:apache-release/creating-a-release.adoc[Creating a Release]
diff --git a/hop-dev-manual/modules/ROOT/pages/index.adoc b/hop-dev-manual/modules/ROOT/pages/index.adoc
index 21ec4b2..d20a9cd 100644
--- a/hop-dev-manual/modules/ROOT/pages/index.adoc
+++ b/hop-dev-manual/modules/ROOT/pages/index.adoc
@@ -6,5 +6,6 @@
 * xref:setup-dev-environment.adoc[Setting up your development environment]
 * xref:integration-testing.adoc[Integration Testing]
 * xref:plugin-development.adoc[Plugin Development]
+* xref:plugin-samples.adoc[Plugin Samples]
 * xref:start-your-own-plugin.adoc[Creating your own plugin]
 * xref:internationalisation.adoc[Internationalisation (i18n)]
diff --git a/hop-dev-manual/modules/ROOT/pages/plugin-samples.adoc b/hop-dev-manual/modules/ROOT/pages/plugin-samples.adoc
new file mode 100644
index 0000000..dd879fc
--- /dev/null
+++ b/hop-dev-manual/modules/ROOT/pages/plugin-samples.adoc
@@ -0,0 +1,41 @@
+[[PluginSamples-PluginSamples]]
+= Plugin samples
+
+== Introduction
+
+This document will explain how a developer can add samples to the plugins in the source code so that they will end up in the ```samples``` project in the Hop client distribution assembly.
+
+== The Samples project
+
+The ```samples``` project in the Hop distribution is located in the config/projects/samples folder.
+Its parent is the ```default``` project.  This means that it's not needed to add any metadata objects (like run configurations) to the ```samples``` projects that are already present in the ```default``` project.
+
+== Plugin samples
+
+If a plugin places a ```samples/``` folder under the ```src/main/``` folder its content will be picked up and copied over the ```samples``` project folder.
+The content will end up exactly in the same folder structure.
+A few examples:
+
+
+|===
+|Source |Target
+
+|```plugins/transforms/addsequence/src/main/samples/transforms/Add Sequence - Add a unique ID.hpl```
+|```config/projects/samples/transforms/Add Sequence - Add a unique ID.hpl```
+
+|```plugins/engines/beam/src/main/samples/metadata/pipeline-run-configuration/Direct.json```
+|```config/projects/samples/metadata/pipeline-run-configuration/Direct.json```
+
+|===
+
+As you can see it's easy to add extra metadata simply by putting it in the ```metadata/``` folder under your samples/ folder in the plugin.  The same goes for test data ```datasets``` and so on.
+
+== Standard project content
+
+If you have metadata objects, sample input files data sets or files that you might want to make available for all plugins, please add them to the following place in the source code:
+
+[source]
+assemblies/static/src/main/resources/config/projects/samples
+
+
+