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

added mkdir to cwd argument in run #2523

Merged
merged 2 commits into from May 23, 2023

Conversation

shimwell
Copy link
Member

When passing a path into model.run(cwd='my_path') it appears that we can't currently accept a path with a sub-directory. So this currently fails

model.run(cwd='my_path/subfolder')

This PR adds a pathlib.Path.mkdir command to create the folder and subfolders if it doesn't exist

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _change_directory context manager already calls Path.mkdir actually but just doesn't have the parents=True argument, so it would be better to just update it there.

@shimwell
Copy link
Member Author

Good point, I've updated the _change_directory method.
Thanks Paul

@paulromano paulromano enabled auto-merge (squash) May 23, 2023 03:05
@paulromano paulromano merged commit d6eac66 into openmc-dev:develop May 23, 2023
16 checks passed
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.

None yet

2 participants