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

Merge Matt edit to dev #217

Merged
merged 21 commits into from
May 6, 2024
Merged

Merge Matt edit to dev #217

merged 21 commits into from
May 6, 2024

Conversation

changliao1025
Copy link
Owner

No description provided.

changliao1025 and others added 21 commits April 16, 2024 22:00
… module.

This commit only moves the functions, and is thus breaking.
Rename from pyflowline_create_basin_template_configuration_file to pyflowline_create_template_basin_configuration_file for consistency with the main method. This has no side effects.
This fixes the imports of the read_configuration_file, change_json_key_value, and other configuration functions used to set json file parameters in the demos with the new module syntax. This also fixes various smaller bugs in the mpas example so it runs without error. The overall layout of the mpas example was also updated so all the parameters are defined up top so its clearer to users what values need to be modified. A subsequent commit will programmatically update the paths to make it easier, but this commit serves as a marker of a working set of demos using the new configuration module syntax.
This will enable programmatic setting of project paths in the examples and demos and json files.
…fects.

This refactor writes to a tempfile in case the function errors early. This should be os agnostic.
The purpose is to handle both realpath (str) and Path objects. With Path objects its easier to use the joinpath method, but a dedicated function will help ensure compatibility if path_manager is adopted more widely in the project.
This replaces realpath with Path and converts to str where needed, however, the Path objects are fully compatible with the configuration module functions. Conversion to string was only done for compatibility with the Hungarian notation convention e.g., sFolder_output is now oFolder_output.
It is necessary to check if optional path inputs are Path if they are set to None by default, unlike the required inputs which can be converted to str without any isinstance
@changliao1025 changliao1025 merged commit c55736f into development May 6, 2024
2 of 6 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.

2 participants