Conversation
…ch directory Like exec_file, a relative path is now taken from tb_path rather than from the working directory of the simulator, so verification components can import their models without runner_cfg. Fixes VUnit#7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
import_module_from_filenow resolves a relative path against the testbench directory (tb_path) through the samep_file_pathhelper asexec_file, instead of passing it to Python relative to the simulator's working directory. Absolute paths, thesessionparameter andimport_run_scriptare unchanged. A relative path needstest_runner_setupto have run.Fixes #7
python_pkg.vhd.in: forward-declaresp_file_pathin the package body and uses it inimport_module_from_file;python_pkg.vhdregenerated.docs/user_guide.rst: documents the path base and the runner-setup requirement.release_notes/0.2.0.md: flags the change for callers relying on working-directory-relative imports.Testing
New tests in
tb_python_pkg_bridge: a relative import from a procedure withoutrunner_cfg(also checks that the simulator cwd differs from the testbench directory), and an absolute import. The relative test failed before the fix withFileNotFoundErroron<cwd>/models/filters.py.tests/run.py: 108/108 on NVC and on GHDLexamples/embedded_python/run.py --without-attributes .optional_deps --without-attributes .expected_failure: 17/17 on NVC and on GHDLpytest tests/test_python_bridge.py: 85 passed🤖 Generated with Claude Code