Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 2.91 KB

README.md

File metadata and controls

61 lines (43 loc) · 2.91 KB

KNIME® Python

Jenkins Quality Gate Status

This repository is maintained by the KNIME Team Rakete.

The KNIME Python Integration closes the gap between KNIME Analytics Platform and Python. It provides nodes to write and execute Python scripts and functionality to make use of Python in other parts of KNIME Analytics Platform.

The legacy Python integrations can be found at knime-python-legacy.

Content

This repository contains the source code for the KNIME Python Integration. The code is organized as follows:

  • org.knime.ext.py4j: OSGi Wrapper for py4j
  • org.knime.python3.py4j.dependencies: Additional dependencies of the OSGi Wrapper for py4j to make classes visible to the classloader of the py4j wrapper plugin
  • org.knime.python3: Core functionality for running Python code from KNIME AP
  • org.knime.python3.arrow: Functionality for transferring Arrow tables between KNIME AP and Python
  • org.knime.python3.arrow.types: Python implementation of special types
  • org.knime.python3.nodes: Framework for writing KNIME AP nodes in Python
  • org.knime.python3.scripting: Useful functionality for providing Python scripting in KNIME AP
  • org.knime.python3.scripting.nodes: Implementation of Python scripting nodes for KNIME AP
  • org.knime.python3.views: Library for creating node views in Python

Tests

Test the unit tests locally:

  1. Pip install pytest
  2. pytest

Test the unit tests locally and see the coverage:

  1. Pip install coverage
  2. coverage run -m pytest
  3. coverage report # to get a report
  4. coverage html # to transform report to an html site for better view

Additionally, you can enhance VS Code to see the coverage:

  1. Install the VS Code extension Coverage Gutters
  2. coverage xml (after you did coverage run -m pytest and coverage report; this transforms the report to xml, which is read by VS Code)
  3. Left bottom: click watch to see the coverage generally indicated

You can also test within VS Code:

  1. Setup a testing framework (e.g. pytest) by using the Testing icon at the left sidebar
  2. Regularly execute tests from there

Development Notes

Use the Ruff Formatter for Python files.

$ ruff format .

You can find instructions on how to work with our code or develop extensions for KNIME Analytics Platform in the knime-sdk-setup repository on BitBucket or GitHub.

Join the Community