Skip to content

Support running built-in or external "programs" #857

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

Draft
wants to merge 24 commits into
base: develop
Choose a base branch
from

Conversation

aplowman
Copy link
Contributor

@aplowman aplowman commented Jul 17, 2025

This PR adds some new attributes to Action that define running built-in or external executable "programs" (typically binary files). The immediate motivation for this is running compiled standalone Matlab applications (in particular compiled MTEX scripts).

The Action.program attribute (which corresponds to running a built-in program) is similar to the Action.script attribute, and shares some similar parametrisation. For example script_data_in/out -> program_data_in/out. For external programs, the Action.program_path attribute can be used. In future, I intend to reorganise the script-related code so built-in/external scripts are distinguished in this way as well.

This PR also add three new ElementResources attributes: platform, CPU_arch, and executable_extension, which cannot be set by the user but can be retrieved/referencde. The reason for adding these is so built-in programs can be organised by operating system type (i.e. the platform key, which takes values like "win" for Windows, "linux", and "macos"). executable_extension is .exe on Windows, and empty on other platforms.

This PR also includes an unrelated fix in how we store run IDs associated with jobscript blocks. We were storing run IDs as unsigned integers, but then expected signed integers elswhere, which caused problems (most obviously in the show command, for task schemas that have conditional actions)!

@aplowman aplowman changed the title feat: support Action.program(_path) attribute for running a built-i… Support running built-in or external "programs" Jul 17, 2025
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