Mark Payne 2acc1038c9
NIFI-12616 Added Processor Documentation Support for Python
- Added some Use Case docs for Python processors and updated Runtime Manifests to include Python based processors as well as Use Case/MultiProcessorUseCase documentation elements. Refactored/cleaned up some of the Python code and added unit tests.

- Added python-unit-tests profile and enabled on Ubuntu and macOS GitHub workflows

This closes #8253

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2024-01-18 19:12:05 -06:00

122 lines
5.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>nifi-py4j-bundle</artifactId>
<groupId>org.apache.nifi</groupId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nifi-python-framework</artifactId>
<properties>
<py4j.version>0.10.9.7</py4j.version>
<py4j.url>https://files.pythonhosted.org/packages/10/30/a58b32568f1623aaad7db22aa9eafc4c6c194b429ff35bdc55ca2726da47/py4j-${py4j.version}-py2.py3-none-any.whl</py4j.url>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.7.1</version>
<executions>
<execution>
<id>download-py4j</id>
<goals>
<goal>wget</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<url>${py4j.url}</url>
<outputFileName>py4j-${py4j.version}.zip</outputFileName>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}/py4j-${py4j.version}</outputDirectory>
<sha256>85defdfd2b2376eb3abf5ca6474b51ab7e0de341c75a02f46dc9b5976f5a5c1b</sha256>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<includeEmptyDirs>true</includeEmptyDirs>
<outputDirectory>${project.build.outputDirectory}/framework</outputDirectory>
<resources>
<resource>
<directory>src/main/python/framework</directory>
<includes>
<include>**/</include>
</includes>
</resource>
<resource>
<directory>${project.build.directory}/py4j-${py4j.version}</directory>
<includes>
<include>py4j/*.py</include>
</includes>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>python-unit-tests</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>python-test</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>python3</executable>
<environmentVariables>
<PYTHONPATH>src/main/python/framework:../nifi-python-extension-api/src/main/python/src</PYTHONPATH>
</environmentVariables>
<arguments>
<argument>-m</argument>
<argument>unittest</argument>
<argument>discover</argument>
<argument>-s</argument>
<argument>src/test/python/framework</argument>
<argument>-p</argument>
<argument>Test*.py</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>