Fix: Enable concore run execution from outside repository root#215
Open
Titas-Ghosh wants to merge 1 commit intoControlCore-Project:devfrom
Open
Fix: Enable concore run execution from outside repository root#215Titas-Ghosh wants to merge 1 commit intoControlCore-Project:devfrom
Titas-Ghosh wants to merge 1 commit intoControlCore-Project:devfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @pradeeban ,
I hope you're doing well! I'm submitting this PR to fix a critical issue where
concore runfails when executed outside the repository root. This blocks the standard user workflow (creating and running projects in separate directories).This PR fixes the path resolution logic so the CLI works correctly from any location, as documented in the README.
Fixes #214
Why this change?
concore runis documented as a CLI workflow step, but it only worked if you executed it from the repo root.In real usage (
concore init,cd my-project,concore run workflow.graphml), the command fails because:mkconcore.pyis referenced by filename only (not resolvable from a project dir)mkconcore.pylooks for concore assets (concore.py,concore.hpp, etc.) relative to CWDThis breaks the Quick Start and makes the CLI unusable when installed normally.
What was the problem?
mkconcore.pynot found outside repo rootconcore.py/concore.hpp/concore.vnot foundconcore runfailed in the exact flow shown inconcore_cli/README.mdHow I solved it
concore_cli/commands/run.pycwdto mkconcore’s directory to preserve existing relative lookupsconcore runfrom a temp project directory and asserts output is generatedChanges / Implementation
concore_cli/commands/run.py_find_mkconcore_path()search logiccwdcorrectionmkconcore.pySCRIPT_DIR+_resolve_concore_path()to locate assets robustlytests/test_cli.pytest_run_command_from_project_dirHow to Test Locally
Install deps
pip install -r requirements.txt
pip install -r requirements-dev.txt
Run tests
python -m pytest -v tests/test_cli.py
or full suite
python -m pytest -v
Evidence
python -m pytest -v tests/test_cli.py(10 tests passed)PR Checklist
python -m pytest -v tests/test_cli.py)Note to Maintainers
I’m happy to adjust the approach if you prefer a different path‑resolution strategy or packaging layout. Please share any feedback on structure or style and I’ll iterate quickly.