Skip to content

Commit

Permalink
Merge branch 'master' into wgraham/pyinstrument-profiling-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
willGraham01 authored Aug 21, 2023
2 parents 03403ab + d09c7c1 commit 921fdb5
Show file tree
Hide file tree
Showing 70 changed files with 4,717 additions and 1,569 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,6 @@ docs/reference/tlo*.rst
# TLO configuration
tlo.conf


# ignore all files in outputs directory, except README
outputs/*
!outputs/README
4 changes: 2 additions & 2 deletions docs/write-ups/EPI.docx
Git LFS file not shown
4 changes: 0 additions & 4 deletions outputs/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions resources/ResourceFile_EPI_WHO_estimates.xlsx
Git LFS file not shown
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/cmd/ResourceFile_cmd_condition_hsi.xlsx
Git LFS file not shown
Git LFS file not shown
3 changes: 0 additions & 3 deletions resources/healthsystem/ResourceFile_PriorityRanking.csv

This file was deleted.

Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import argparse
import glob
import os.path
import zipfile
Expand All @@ -12,7 +13,6 @@
analysis_compare_appt_usage_real_and_simulation,
plot_appt_use_by_hsi,
)
from tlo.analysis.utils import get_scenario_outputs


def apply(results_folder: Path, output_folder: Path, resourcefilepath: Path = None):
Expand Down Expand Up @@ -60,11 +60,12 @@ def apply(results_folder: Path, output_folder: Path, resourcefilepath: Path = No


if __name__ == "__main__":
outputspath = Path('./outputs/[email protected]')

# Find results folder (most recent run generated using that scenario_filename)
scenario_filename = 'long_run_all_diseases.py'
results_folder = get_scenario_outputs(scenario_filename, outputspath)[-1]

# Run all the calibrations
apply(results_folder=results_folder, output_folder=results_folder, resourcefilepath=Path('./resources'))
parser = argparse.ArgumentParser()
parser.add_argument("results_folder", type=Path)
args = parser.parse_args()

apply(
results_folder=args.results_folder,
output_folder=args.results_folder,
resourcefilepath=Path('./resources')
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This uses the results of the Scenario defined in: src/scripts/long_run/long_run.py but it can edited to look at other
results (change 'scenario_filename').
"""

import argparse
from pathlib import Path

import numpy as np
Expand All @@ -15,7 +15,6 @@
extract_results,
format_gbd,
get_color_cause_of_death_or_daly_label,
get_scenario_outputs,
load_pickled_dataframes,
make_age_grp_lookup,
make_age_grp_types,
Expand Down Expand Up @@ -412,11 +411,12 @@ def shift_row_to_top(df, index_to_shift):


if __name__ == "__main__":
outputspath = Path('./outputs/[email protected]')
rfp = Path('./resources')

# Find results folder (most recent run generated using that scenario_filename)
scenario_filename = 'long_run_all_diseases.py'
results_folder = get_scenario_outputs(scenario_filename, outputspath)[-1]

apply(results_folder=results_folder, output_folder=results_folder, resourcefilepath=rfp)
parser = argparse.ArgumentParser()
parser.add_argument("results_folder", type=Path)
args = parser.parse_args()

apply(
results_folder=args.results_folder,
output_folder=args.results_folder,
resourcefilepath=Path('./resources')
)
Loading

0 comments on commit 921fdb5

Please sign in to comment.