-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update perturbIC.py #5
base: main
Are you sure you want to change the base?
Conversation
Can the random generator be simplified?
…er functions. The descriptions are still in progress.
I can't work out why I specified it this way. In any case
This will give different results to the current implementation but will be stable in the future. PCG64 is currently the default bit generator but that could change so it's used explicitly here. |
Added more documentation and created variables for the integers
Adding the pytests
Create the necessary environments for testing for 3.10
Create the environment for Python 3.11
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the changes and a few more to correct some errors. Still need to update the unit tests
Condensing the environment files into one file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @leoberhelman for the amazing work restructuring this after my extensive review!
I added a few other minor suggestions. Please refer to the specific comments.
Two important points:
- I am going to open up a PR with a revision of the testing suite. That can also serve as a guideline an example for future testing suites.
As a consequence, there is no need to address the specific comment I left regarding thetest_create_default_outname
function. I will include that part in my testing-suite PR. Thetest_create_default_outname
comment should be viewed as an example of a testing approach. - With the restructuring of the repo and creation of the
original
branch, I think themain
branch should now only include the portions of the codebase we are restructuring, and potentially be in a "releasable" state (in the not-too-far future). Therefore, I would delete all the scripts that we are not using from this branch.
Namely, I would only keep theperturbIC.py
script (moving it inside theumfile_utils
folder, along with the already present_version.py
and__init__.py
files) while movind theREADME.md
at the top-level of the repo.
Note that, after this restructure, some minor modifications might be needed with the imports (from perturbIC import ...
should becomefrom umfile_utils.perturbIC
for example). Also, in thepyproject.toml
file the following lines should be added to ensurepytest
works correctly:[tool.pytest.ini_options] pythonpath = "src"
Don't perform the validation, but print a message to inform that validation has been skipped. | ||
""" | ||
print('Skipping mule validation. To enable the validation, run using the "--validate" option.') | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return |
We don't really need to return anything here I believe.
# Skip mule validation if the "--validate" option is provided | ||
if args.validate: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Skip mule validation if the "--validate" option is provided | |
if args.validate: | |
# Perform mule validation only if the "--validate" option is provided | |
if not args.validate: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added another comment
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Co-authored-by: Davide Marchegiani <[email protected]>
Update to unit tests
fix the args set up
This is a draft of a pull request to keep track of comments and questions I will have during refactoring and testing. Nothing yet but I am creating my unit tests.