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

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 5a68530769b59968b5878faa3704cf1de3b90f51
Author: Ferenc Gerlits <[email protected]>
AuthorDate: Thu Jul 25 09:22:58 2024 +0000

    MINIFICPP-2432 Move the python processors to the examples directory
    
    Closes #1845
    
    Signed-off-by: Marton Szasz <[email protected]>
---
 extensions/python/PYTHON.md                        |  8 +++--
 .../google/SentimentAnalyzer.py                    |  0
 .../h2o/ConvertDsToCsv.py                          |  0
 .../h2o/h2o3/mojo/ExecuteH2oMojoScoring.py         |  0
 msi/WixWin.wsi.in                                  | 35 +++++++++++-----------
 5 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/extensions/python/PYTHON.md b/extensions/python/PYTHON.md
index ea3cfb87e..7d8849504 100644
--- a/extensions/python/PYTHON.md
+++ b/extensions/python/PYTHON.md
@@ -141,9 +141,10 @@ to the reference class name.
     nifi.python.processor.dir=XXXX
 
 
-## Processors
-The python directory (extensions/pythonprocessors) contains implementations 
that will be available for flows if the required dependencies
-exist.
+## Sample processors
+The examples directory (pythonprocessor-examples in the source, or 
minifi-python-examples in the MiNiFi installation)
+contains sample python processors. Copy them to the minifi-python directory to 
make them available for flows. You may
+need to install the required dependencies, either on the system or in the 
virtual environment.
 
 ### Sentiment Analysis
 
@@ -151,6 +152,7 @@ The SentimentAnalysis processor will perform a Vader 
Sentiment Analysis. This re
     pip install nltk
     pip install VaderSentiment
 
+
 ## Using NiFi Python Processors
 
 MiNiFi C++ supports the use of NiFi Python processors, that are inherited from 
the FlowFileTransform base class. To use these processors, copy the Python 
processor module to the nifi_python_processors subdirectory of the python 
directory. By default, the python directory is ${minifi_root}/minifi-python. To 
see how to write NiFi Python processors, please refer to the Python Developer 
Guide under the [Apache NiFi 
documentation](https://nifi.apache.org/documentation/v2/).
diff --git a/extensions/python/pythonprocessors/google/SentimentAnalyzer.py 
b/extensions/python/pythonprocessor-examples/google/SentimentAnalyzer.py
similarity index 100%
rename from extensions/python/pythonprocessors/google/SentimentAnalyzer.py
rename to extensions/python/pythonprocessor-examples/google/SentimentAnalyzer.py
diff --git a/extensions/python/pythonprocessors/h2o/ConvertDsToCsv.py 
b/extensions/python/pythonprocessor-examples/h2o/ConvertDsToCsv.py
similarity index 100%
rename from extensions/python/pythonprocessors/h2o/ConvertDsToCsv.py
rename to extensions/python/pythonprocessor-examples/h2o/ConvertDsToCsv.py
diff --git 
a/extensions/python/pythonprocessors/h2o/h2o3/mojo/ExecuteH2oMojoScoring.py 
b/extensions/python/pythonprocessor-examples/h2o/h2o3/mojo/ExecuteH2oMojoScoring.py
similarity index 100%
rename from 
extensions/python/pythonprocessors/h2o/h2o3/mojo/ExecuteH2oMojoScoring.py
rename to 
extensions/python/pythonprocessor-examples/h2o/h2o3/mojo/ExecuteH2oMojoScoring.py
diff --git a/msi/WixWin.wsi.in b/msi/WixWin.wsi.in
index 0c0c38015..85733f1e5 100644
--- a/msi/WixWin.wsi.in
+++ b/msi/WixWin.wsi.in
@@ -393,23 +393,6 @@ ${WIX_EXTRA_COMPONENTS}
 
 <?ifdef INCLUDE_PYTHON_PROCESSORS?>
             <Directory Id="INSTALLPYTHONDIR" Name="minifi-python">
-              <Directory Id="INSTALLGOOGLEDIR" Name="google">
-                <Component Id="PythonProcessorGoogleFiles" 
Guid="90b898a9-76fb-4888-a4aa-adcd22097863">
-                  <File Id="Google_SentimentAnalyzer" 
Name="SentimentAnalyzer.py" KeyPath="yes" 
Source="pythonprocessors\google\SentimentAnalyzer.py"/>
-                </Component>
-              </Directory>
-              <Directory Id="INSTALLH2ODIR" Name="h2o">
-                <Component Id="PythonProcessorH2oFiles" 
Guid="b290aeb3-c67a-4cd1-a0a4-1ba049a2e44e">
-                  <File Id="H2o_ConvertDsToCsv" Name="ConvertDsToCsv.py" 
KeyPath="yes" Source="pythonprocessors\h2o\ConvertDsToCsv.py"/>
-                </Component>
-                <Directory Id="INSTALLH2O3DIR" Name="h2o3">
-                  <Directory Id="INSTALLMOJODIR" Name="mojo">
-                    <Component Id="PythonProcessorMojoFiles" 
Guid="d2b803da-1cd1-4925-802b-19f3e09fc0f7">
-                      <File Id="H2o_ExecuteH2oMojoScoring" 
Name="ExecuteH2oMojoScoring.py" KeyPath="yes" 
Source="pythonprocessors\h2o\h2o3\mojo\ExecuteH2oMojoScoring.py"/>
-                    </Component>
-                  </Directory>
-                </Directory>
-              </Directory>
               <Directory Id="INSTALLNIFIAPIDIR" Name="nifiapi">
                 <Component Id="PythonProcessorNifiApiFiles" 
Guid="a9cb7b7b-e66d-4e32-9115-eab4aa980124">
                   <File Id="NifiApi_flowfiletransform" 
Name="flowfiletransform.py" KeyPath="no" 
Source="pythonprocessors\nifiapi\flowfiletransform.py"/>
@@ -440,10 +423,28 @@ ${WIX_EXTRA_COMPONENTS}
                 <File Id="Examples_RemoveFlowFile" Name="RemoveFlowFile.py" 
KeyPath="no" Source="pythonprocessor-examples\RemoveFlowFile.py"/>
                 <File Id="Examples_SentimentAnalysis" 
Name="SentimentAnalysis.py" KeyPath="no" 
Source="pythonprocessor-examples\SentimentAnalysis.py"/>
               </Component>
+              <Directory Id="INSTALLGOOGLEDIR" Name="google">
+                <Component Id="PythonProcessorGoogleFiles" 
Guid="90b898a9-76fb-4888-a4aa-adcd22097863">
+                  <File Id="Google_SentimentAnalyzer" 
Name="SentimentAnalyzer.py" KeyPath="yes" 
Source="pythonprocessor-examples\google\SentimentAnalyzer.py"/>
+                </Component>
+              </Directory>
+              <Directory Id="INSTALLH2ODIR" Name="h2o">
+                <Component Id="PythonProcessorH2oFiles" 
Guid="b290aeb3-c67a-4cd1-a0a4-1ba049a2e44e">
+                  <File Id="H2o_ConvertDsToCsv" Name="ConvertDsToCsv.py" 
KeyPath="yes" Source="pythonprocessor-examples\h2o\ConvertDsToCsv.py"/>
+                </Component>
+                <Directory Id="INSTALLH2O3DIR" Name="h2o3">
+                  <Directory Id="INSTALLMOJODIR" Name="mojo">
+                    <Component Id="PythonProcessorMojoFiles" 
Guid="d2b803da-1cd1-4925-802b-19f3e09fc0f7">
+                      <File Id="H2o_ExecuteH2oMojoScoring" 
Name="ExecuteH2oMojoScoring.py" KeyPath="yes" 
Source="pythonprocessor-examples\h2o\h2o3\mojo\ExecuteH2oMojoScoring.py"/>
+                    </Component>
+                  </Directory>
+                </Directory>
+              </Directory>
             </Directory>
 <?endif?>
 
           </Directory>
+
     </DirectoryRef>
   </Fragment>
 

Reply via email to