Skip to content

🐛 Fix relative path resolution in xircuits run command - #387

Merged
MFA-X-AI merged 1 commit into
masterfrom
fahreza/fix-runner
Mar 7, 2025
Merged

MFA-X-AI merged 1 commit into
masterfrom
fahreza/fix-runner

Conversation

@MFA-X-AI

@MFA-X-AI MFA-X-AI commented Mar 5, 2025 •

Copy link
Copy Markdown
Member

Description

This pull request addresses an issue with relative path resolution in the run command. Previously, if the run command was executed from a subdirectory, the relative paths could resolve incorrectly after changing the working directory to the Xircuits base directory. This PR captures the original working directory before switching directories, ensuring that relative file paths (for source and output files) remain accurate.

References

N/A

Pull Request Type

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

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

The changes were tested by running the workflow commands from different subdirectories. The relative paths were resolved correctly, ensuring that the run command executed the appropriate files.

1. Test A

  1. Create a workflow that uses a workflow component in a subdir (e.g., xai_components/xai_controlflow) within your Xircuits project.
  2. Open a terminal in the subdirectory and run the command:
    xircuits run workflow.xircuits
  3. Verify that the workflow is compiled into a Python file and executed correctly.

Tested on:

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

@github-actions

github-actions Bot commented Mar 5, 2025

Copy link
Copy Markdown

Binder 👈 Launch a binder notebook on branch XpressAI/xircuits/fahreza/fix-runner

@MFA-X-AI
MFA-X-AI merged commit 21a43ce into master Mar 7, 2025
@MFA-X-AI
MFA-X-AI deleted the fahreza/fix-runner branch March 7, 2025 08:51
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.

1 participant