Skip to content

[Add] .compile() uses tmpdir for binary#220

Merged
g5t merged 1 commit intomainfrom
simulation-compile-tmpdir
Mar 6, 2026
Merged

[Add] .compile() uses tmpdir for binary#220
g5t merged 1 commit intomainfrom
simulation-compile-tmpdir

Conversation

@g5t
Copy link
Copy Markdown
Collaborator

@g5t g5t commented Mar 6, 2026

This pull request updates the Simulation class in simulation.py to improve how temporary directories are handled during compilation. Now, if no directory is specified when calling compile, a temporary directory is automatically created and managed by the Simulation instance, ensuring proper cleanup.

Temporary directory management improvements:

  • The compile method now accepts directory=None, in which case a temporary directory is created and its lifetime is tied to the Simulation instance for automatic cleanup. [1] [2] [3]
  • Added an instance variable _tmpdir to store the temporary directory object when created.
  • Updated the docstring for compile to document the new behavior when directory is None.

@g5t g5t merged commit c525bb3 into main Mar 6, 2026
17 checks passed
@g5t g5t deleted the simulation-compile-tmpdir branch March 6, 2026 16:37
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