-
Notifications
You must be signed in to change notification settings - Fork 498
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
Rely on std::filesystem for file_utils #3042
base: develop
Are you sure you want to change the base?
Rely on std::filesystem for file_utils #3042
Commits on Jun 17, 2024
-
Rely on std::filesystem for file_utils
First attempt was to remove `file_utils` in favor of direct calls to things like `std::filesystem::exists` and ``std::filesystem::path::get_extension`. However, many places in openmc use strings to store paths to files and directories which would require patterns that previously look like ```cpp if (!file_exists(member_string_var_)) { ... } ``` where a class stores a string file path at `member_string_var_` to change to ```cpp std::filesystem::path p(member_string_var_); if (!std::filesystem::exists(p)) { ... } ``` This second pattern would be repeated in a lot of the code base, so keeping `file_exists(std::string)` means less repeated code. An alternative is to use `std::filesystem::path` objects to represent paths to files and directories. This would work pretty easily in at least two locations: - `Library::path_` - `DAGUniverse::filename_` But the primary source of "strings for paths" is due to various settings, e.g., `settings::path_input`. I don't believe those can be converted to `std::filesystem::path` objects because they must be more portable to C and, by extension, Python. Closes openmc-dev#3041
Andrew Johnson committedJun 17, 2024 Configuration menu - View commit details
-
Copy full SHA for 21692af - Browse repository at this point
Copy the full SHA 21692afView commit details
Commits on Jun 18, 2024
-
Andrew Johnson committed
Jun 18, 2024 Configuration menu - View commit details
-
Copy full SHA for 01e7381 - Browse repository at this point
Copy the full SHA 01e7381View commit details
Commits on Jun 20, 2024
-
Ensure source point file has .h5 extension
Andrew Johnson committedJun 20, 2024 Configuration menu - View commit details
-
Copy full SHA for b6b9765 - Browse repository at this point
Copy the full SHA b6b9765View commit details -
openmc_statepoint_write no longer appends to given filename
Always writes an h5 formatted file to the provided filepath, even if the extension is not .h5
Andrew Johnson committedJun 20, 2024 Configuration menu - View commit details
-
Copy full SHA for 013ccbe - Browse repository at this point
Copy the full SHA 013ccbeView commit details -
write_source_point no longer appends to given filename
Always writes an h5 formatted file to the provided filepath, even if the extension is not .h5
Andrew Johnson committedJun 20, 2024 Configuration menu - View commit details
-
Copy full SHA for c41d41d - Browse repository at this point
Copy the full SHA c41d41dView commit details -
Add tests for dir_name off develop
Andrew Johnson committedJun 20, 2024 Configuration menu - View commit details
-
Copy full SHA for ce39071 - Browse repository at this point
Copy the full SHA ce39071View commit details -
Update and annotate dir_name no longer returns final dir separator
Previous implementation returned the substring up to and including the final directory separator. This is not consistent with `std::filesystem::path::parent_path`
Andrew Johnson committedJun 20, 2024 Configuration menu - View commit details
-
Copy full SHA for 0f98f16 - Browse repository at this point
Copy the full SHA 0f98f16View commit details -
Update dagmc universe construction with std::filesystem
Andrew Johnson committedJun 20, 2024 Configuration menu - View commit details
-
Copy full SHA for 96a7a1f - Browse repository at this point
Copy the full SHA 96a7a1fView commit details
Commits on Jun 21, 2024
-
Revert "Ensure source point file has .h5 extension"
This reverts commit b6b9765.
Andrew Johnson committedJun 21, 2024 Configuration menu - View commit details
-
Copy full SHA for ef1da94 - Browse repository at this point
Copy the full SHA ef1da94View commit details -
Ensure source write file names have correct extensions
Avoids needing to modify a user-provided file name in write_source_point and write_mcnp_source_point
Andrew Johnson committedJun 21, 2024 Configuration menu - View commit details
-
Copy full SHA for 47e50a3 - Browse repository at this point
Copy the full SHA 47e50a3View commit details