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

Check for valid output directory for FieldGenerator methods that write files #108

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

The9Cat
Copy link
Contributor

@The9Cat The9Cat commented Feb 2, 2025

Summary

Add checks using std::filesystem to check that the outdir parameter passed to FieldGenerator::file_lines, FiledGenerator::file_slices , and FieldGenerator::file_volumes is valid and throw a standard exception rather than terminate if the provided directory does not exist.

Tested by providing valid and invalid directories to FieldGenerator::file_volumes.

Comment

I also note that the standalone vtk volume writer appears to have transposed axes. Need to check this. The pyEXP.fields.volumes provides a 3-tensor that needs to be converted from column-major to row-major, but otherwise looks correct.

Martin D. Weinberg added 3 commits February 2, 2025 18:51
Copy link
Member

@michael-petersen michael-petersen left a comment

Choose a reason for hiding this comment

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

Nice smooth change for the user. I hadn't run into this before, but looks helpful in general.

@The9Cat The9Cat merged commit a232ebd into main Feb 7, 2025
8 checks passed
@The9Cat The9Cat deleted the outdirTest branch February 7, 2025 16:18
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.

2 participants