Skip to content

Optimize executable discovery and fix MATLAB versioning#416

Open
samarkanov wants to merge 1 commit intoopen-research:masterfrom
samarkanov:refactor-executable-discovery
Open

Optimize executable discovery and fix MATLAB versioning#416
samarkanov wants to merge 1 commit intoopen-research:masterfrom
samarkanov:refactor-executable-discovery

Conversation

@samarkanov
Copy link
Copy Markdown
Contributor

This PR refactors the executable discovery logic to support custom paths, see the issue #415

Changes:

  • Introduced can_handle(path, script_file) class method to the Executable base class to allow identifying the correct subclass before instantiation.
  • Refactored get_executable() to use a discovery-first approach: iterate through registered types and call can_handle() to find the most specific subclass
  • Updated MatlabExecutable._get_version() to use self.path.
  • Fixed RExecutable.executable_names to be a consistent tuple ('Rscript',)
  • Added os.remove("test_file.yml") to the tearDown() method in test/unittests/test_parameters.py

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