Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix relative path resolution in xircuits run command #387

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

MFA-X-AI
Copy link
Member

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

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 )

Sorry, something went wrong.

Copy link

github-actions bot commented Mar 5, 2025

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
9 checks passed
@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.

None yet

1 participant