Skip to content

Enh/ap 25245 pixi env creator#47

Merged
HedgehogCode merged 2 commits intomasterfrom
enh/AP-25245-pixi-env-creator
Feb 20, 2026
Merged

Enh/ap 25245 pixi env creator#47
HedgehogCode merged 2 commits intomasterfrom
enh/AP-25245-pixi-env-creator

Conversation

@marc-lehner
Copy link
Contributor

Add support for the new python environment provider node and it's pixi port object to the python scripts

@marc-lehner marc-lehner requested a review from a team as a code owner January 26, 2026 12:38
@marc-lehner marc-lehner requested review from Copilot and knime-ghub-bot and removed request for a team January 26, 2026 12:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for a new Python environment provider node with a Pixi port object, integrating it into the Python scripting nodes ecosystem. The changes enable Python script nodes to receive Python environments through an optional input port instead of only relying on configured preferences.

Changes:

  • Introduced PythonProcessProvider as a replacement interface for the deprecated PythonCommand to support multiple environment sources
  • Added optional Python environment port support to Python Script and Python View nodes
  • Implemented environment port extraction and installation logic with progress reporting

Reviewed changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
org.knime.python3/src/main/java/org/knime/python3/PythonCommand.java Deprecated PythonCommand interface, now extends PythonProcessProvider for backward compatibility
org.knime.python3/src/main/java/org/knime/python3/SimplePythonCommand.java Updated documentation to reference PythonProcessProvider
org.knime.python3/src/main/java/org/knime/python3/QueuedPythonGatewayFactory.java Refactored to use PythonProcessProvider instead of PythonCommand
org.knime.python3/src/main/java/org/knime/python3/PythonGatewayFactory.java Updated gateway description to work with PythonProcessProvider
org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/script/PythonScriptNodeFactory.java Added optional Python environment port to Python Script node
org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/view/PythonViewNodeFactory.java Added optional Python environment port to Python View node
org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/PythonScriptNodeModel.java Implemented environment port extraction and prioritization over configured Python command
org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/PythonScriptingService.java Added environment port handling for interactive sessions
org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/PythonScriptingSession.java Added PythonCommandAdapter to bridge PythonProcessProvider to legacy PythonCommand
org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes/PortsConfigurationUtils.java Added utility methods for environment port detection and installation
org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/PythonIOUtils.java Updated to filter out environment ports from data processing
org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/PythonScriptingInputOutputModelUtils.java Added logic to skip environment ports in input/output model generation

Copilot AI review requested due to automatic review settings January 26, 2026 17:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (2)

org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/script/PythonScriptNodeFactory.java:1

  • The variable pythonEnvClass is declared but never used on line 130 and 139. This appears to be a leftover from development and should be removed to reduce code clutter.
/*

org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/view/PythonViewNodeFactory.java:1

  • The variable pythonEnvClass is declared on line 91 in the view factory but never used. This appears to be a leftover from development and should be removed to reduce code clutter.
/*

@marc-lehner marc-lehner force-pushed the enh/AP-25245-pixi-env-creator branch 2 times, most recently from 5297ab6 to a396f21 Compare February 10, 2026 14:29
Copilot AI review requested due to automatic review settings February 10, 2026 15:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated 13 comments.

Copilot AI review requested due to automatic review settings February 11, 2026 08:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated 9 comments.

@marc-lehner marc-lehner force-pushed the enh/AP-25245-pixi-env-creator branch from 732d9ac to 15d85da Compare February 11, 2026 09:37
Copilot AI review requested due to automatic review settings February 11, 2026 10:39
@marc-lehner marc-lehner force-pushed the enh/AP-25245-pixi-env-creator branch from 15d85da to 3e4affb Compare February 11, 2026 10:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated 3 comments.

@marc-lehner marc-lehner force-pushed the enh/AP-25245-pixi-env-creator branch 2 times, most recently from 68c0942 to d461935 Compare February 11, 2026 15:05
Copilot AI review requested due to automatic review settings February 12, 2026 10:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (1)

org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes/PortsConfigurationUtils.java:1

  • filterEnvironmentPort(...) assumes there is exactly one environment port and allocates inObjects.length - 1. If the config ever contains 0 (unexpected state), or more than 1 environment port (future extensibility), this produces an incorrectly sized array (either missing entries or leaving trailing nulls). A more robust approach is to compute the exact number of non-environment ports first (similar to createInputPorts) and allocate based on that count, or build a list and convert to array.
/*

Copilot AI review requested due to automatic review settings February 12, 2026 11:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 38 out of 38 changed files in this pull request and generated 7 comments.

Copilot AI review requested due to automatic review settings February 12, 2026 16:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/PythonScriptingSession.java:1

  • The extractPythonEnvironmentPort method is called twice in this code block (lines 262 and 266). Store the result in a variable to avoid redundant traversal of the input array.
/*

Copilot AI review requested due to automatic review settings February 13, 2026 14:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/PythonIOUtils.java:117

  • The JavaDoc states that PythonEnvironmentPortObjects are filtered out, but this filtering doesn't actually happen in this method. The filtering must be done by the caller before passing the data array to this method. Update the JavaDoc to clarify that the caller is responsible for filtering out environment ports, or that this method expects only data ports (BufferedDataTable and PickledObjectFileStorePortObject).
    /**
     * Create an array of Python data sources for the given input ports. The input ports can be either a
     * {@link BufferedDataTable}, a {@link PickledObjectFileStorePortObject}, or {@link PythonEnvironmentPortObject}.
     * Note that {@link PythonEnvironmentPortObject}s are filtered out as they are only used for environment
     * configuration and not passed to Python as data.
     *
     * @param data a list of port objects. Only {@link BufferedDataTable}, {@link PickledObjectFileStorePortObject}, and
     *            {@link PythonEnvironmentPortObject} are supported.
     * @param tableConverter a table converter that is used to convert the {@link BufferedDataTable}s to Python sources
     * @param exec for progress reporting and cancellation
     * @return an array of Python data sources
     * @throws IOException if the path to a pickled file could not be created or a {@link BufferedDataTable} couldn't be
     *             written
     * @throws CanceledExecutionException if the execution was canceled
     * @throws IllegalArgumentException if the data contains unsupported port types
     */

Copilot AI review requested due to automatic review settings February 17, 2026 11:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated 8 comments.

@marc-lehner marc-lehner force-pushed the enh/AP-25245-pixi-env-creator branch 2 times, most recently from c10108c to e69d690 Compare February 17, 2026 15:41
Copilot AI review requested due to automatic review settings February 18, 2026 09:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings February 18, 2026 10:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings February 18, 2026 12:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated 6 comments.

Copilot AI review requested due to automatic review settings February 18, 2026 13:06
@HedgehogCode HedgehogCode dismissed chaubold’s stale review February 18, 2026 13:08

Review not up-to-date.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated 5 comments.

@HedgehogCode HedgehogCode force-pushed the enh/AP-25245-pixi-env-creator branch from ddcbd8a to c85c709 Compare February 20, 2026 06:54
marc-lehner and others added 2 commits February 20, 2026 09:29
…eparate plugin

Such that other plugins can implement process providers without
depending on `knime-python`. This is needed for the pixi-based
environment provider nodes.

AP-25245 (Python Environment Provider (Preview - Hidden))

Co-authored-by: Benjamin Wilhelm <benjamin.wilhelm@knime.com>
AP-25245 (Python Environment Provider (Preview - Hidden))

Co-authored-by: Benjamin Wilhelm <benjamin.wilhelm@knime.com>
@HedgehogCode HedgehogCode force-pushed the enh/AP-25245-pixi-env-creator branch from c85c709 to 0fc918e Compare February 20, 2026 08:30
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
26.8% Coverage on New Code (required ≥ 85%)

See analysis details on SonarQube Cloud

@HedgehogCode HedgehogCode merged commit 754b35d into master Feb 20, 2026
2 of 4 checks passed
@HedgehogCode HedgehogCode deleted the enh/AP-25245-pixi-env-creator branch February 20, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants