-
Notifications
You must be signed in to change notification settings - Fork 15
Resource file path from simulation #1410
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
Conversation
…alysis rti_deaths, re-worked test_rti
…tate cancer, fixed test equipment and dxmanager
…e path from simulation.py.
…t.py and breast_cancer.py method updated for resource file path from simulation.py
…t.py and breast_cancer.py method updated for resource file path from simulation.py
…t.py isort the import to fix incorrectly sorted error
…vert to path in simulation
# Conflicts: # src/tlo/methods/alri.py # src/tlo/methods/depression.py # src/tlo/methods/diarrhoea.py # src/tlo/methods/epilepsy.py # src/tlo/methods/rti.py
…ontraception'].resourcefilepath)
…ontraception'].resourcefilepath)
…rent activ resource file in the HIV resource folder
…s(self, resourcefilepath: Optional[Path] = None): parameter_dataframe = read_csv_files(resourcefilepath /
…sourcefilepath is None: resourcefilepath = get_root_path() / 'resources' from utils.py.
…sourcefilepath is None: resourcefilepath = get_root_path() / 'resources' from utils.py.
…sourcefilepath is None: resourcefilepath = get_root_path() / 'resources' from utils.py.
…cefilepath is None: resourcefilepath = get_root_path() / 'resources' from utils.py.
…cefilepath is None: resourcefilepath = get_root_path() / 'resources' from utils.py.
…to jkumwenda/resource_file_path # Conflicts: # src/tlo/methods/scenario_switcher.py
# Conflicts: # src/tlo/analysis/utils.py # src/tlo/methods/bladder_cancer.py # src/tlo/methods/breast_cancer.py # src/tlo/methods/enhanced_lifestyle.py # src/tlo/methods/oesophagealcancer.py # src/tlo/methods/other_adult_cancers.py # src/tlo/methods/prostate_cancer.py # src/tlo/methods/stunting.py
@tbhallett please review and merge in master if all is good. I have addressed all comments from @mnjowe |
def __init__( | ||
self, | ||
*, | ||
start_date: Date, | ||
seed: Optional[int] = None, | ||
log_config: Optional[dict] = None, | ||
show_progress_bar: bool = False, | ||
resourcefilepath: Optional[Path] = None, | ||
resourcefilepath: Optional[str | Path] = None, |
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.
agreed about query of whether we think string is ok here -- and I wasn't sure if the whole argument should be Optional.
I see below that a string would be OK as line 112 wraps this in Path()
.
I also see that the comment on line 93 explains that not giving a parameter is ok.
I don't know why that would be mean, but there might be a reason.
resourcefilepath: Optional[str | Path] = None, | |
resourcefilepath: Path, |
Great work, @jkumwenda --- so glad this is working now. My comments will mostly be for @tamuri, I think. I am not sure myself what the right thing to do would be, so have commented where I would instinctively have done something different. |
Created resource file path function and calling it from different modules.