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

Add short-circuit logic and convenience tempfile functions #933

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

johnwikman
Copy link
Contributor

@johnwikman johnwikman commented Mar 20, 2025

This PR adds the following convenience functions:

  • Short-circuit logic in bool.mc. This is useful to perform a sequential evaluation only if the previous one failed. The use case is to check that a command exists prior to running that command in the test spec, but that is now moved to its own PR.
  • Adds the sysWithTempDir and sysWithTempFile in sys.mc that emulates the python with tempfile.TemporaryFile scope that automatically cleans up the file or directory once we are done with it.

@johnwikman johnwikman changed the title Check if CUDA device actually exists before running accelerate tests Add short-circuit logic and convenience tempfile functions Mar 20, 2025
@johnwikman johnwikman marked this pull request as ready for review March 20, 2025 16:03
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