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

Update helpers.py #463

Merged
merged 1 commit into from
Oct 11, 2023
Merged

Update helpers.py #463

merged 1 commit into from
Oct 11, 2023

Conversation

nikobenho
Copy link
Contributor

Added out_dir parameter to the functions simple_tpl_from_pars, simple_ins_from_obs and pst_from_parnames_obsnames to allow files to be created in directories other than from where the functions are called. This can be useful if the model files are located in a different directory from the notebook where function calls are made.

I ran pytest --basetemp=runner -n auto autotest/utils_tests.py::pst_from_parnames_obsnames_test which yielded the same result before and after the changes:

utils_tests.py::pst_from_parnames_obsnames_test
  C:\Users\ni6304be\AppData\Local\anaconda3\envs\pyemu_test\Lib\site-packages\pyemu\pst\pst_utils.py:914: UserWarning: error processing instruction file model.output.ins, trying inschek: output file 'model.output' not found

Not sure if that is an error on my part. I'm not a very experienced programmer, just thought I'd try and make a small contribution to make these functions a bit more convenient based on a recent use-case.

Cheers

Added out_dir parameter to the functions `simple_tpl_from_pars`, `simple_ins_from_obs` and `pst_from_parnames_obsnames` to allow files to be created in directories other than from where the functions are called (e.g. if the model files are in a different directory from the notebook where the function calls are made)
@coveralls
Copy link

Coverage Status

coverage: 79.26% (+0.07%) from 79.193% when pulling b041af9 on nikobenho:develop into 3322178 on pypest:develop.

@jtwhite79 jtwhite79 merged commit 3e7f96a into pypest:develop Oct 11, 2023
10 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.

3 participants