Skip to content

Set __id__ attribute in the workflow component constructor - #396

Merged
MFA-X-AI merged 7 commits into
masterfrom
paul/optional_ids
May 5, 2025
Merged

MFA-X-AI merged 7 commits into
masterfrom
paul/optional_ids

Conversation

@treo

@treo treo commented Apr 25, 2025

Copy link
Copy Markdown
Member

Description

This should make this change compatible with base.py versions that haven't been updated to support an id parameter in the Component constructor.

The compiler generates code that sets the id values directly anyway, so this should improve compatibility with old versions without breaking any functionality.

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

1. Backwards compatibility Test

  1. Put a 1.16.x version of the base.py in the xai_components directory
  2. Compile a workflow and run it
  3. Before Fix: Error about id not being a parameter; After Fix: It executes as expected.

Tested on? Specify Version.

  • Windows
  • Linux
  • Mac
  • Others (State here -> xxx )

@github-actions

Copy link
Copy Markdown

Binder 👈 Launch a binder notebook on branch XpressAI/xircuits/paul/optional_ids

This should make this change compatible with base.py versions that haven't been updated to support an id parameter in the Component constructor.

The compiler generates code that sets the __id__ values directly anyway, so this should improve compatibility with old versions without breaking any functionality.
@MFA-X-AI
MFA-X-AI force-pushed the paul/optional_ids branch from 66137db to b65f028 Compare April 29, 2025 12:28
@MFA-X-AI
MFA-X-AI merged commit 5b821f1 into master May 5, 2025
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.

2 participants