Skip to content
Snippets Groups Projects
Commit 3b7281fa authored by Jakub Dylag's avatar Jakub Dylag
Browse files

Run scripts from command line

parent 2626301b
No related branches found
No related tags found
No related merge requests found
...@@ -291,8 +291,7 @@ def run_all(mapping_file, target_code_type, ...@@ -291,8 +291,7 @@ def run_all(mapping_file, target_code_type,
error_df = error_df.sort_values(by=["SOURCE", "VOCABULARY", "CONCEPT"]) error_df = error_df.sort_values(by=["SOURCE", "VOCABULARY", "CONCEPT"])
error_df.to_csv(log_errors_path, index=False) error_df.to_csv(log_errors_path, index=False)
def main():
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Script preprocess code lists and to map to given concept/phenotype", parser = argparse.ArgumentParser(description="Script preprocess code lists and to map to given concept/phenotype",
formatter_class=argparse.ArgumentDefaultsHelpFormatter) formatter_class=argparse.ArgumentDefaultsHelpFormatter)
...@@ -333,3 +332,7 @@ if __name__ == '__main__': ...@@ -333,3 +332,7 @@ if __name__ == '__main__':
params["log_errors_path"] = config["error_log"] params["log_errors_path"] = config["error_log"]
run_all(**params) run_all(**params)
if __name__ == '__main__':
main()
\ No newline at end of file
...@@ -13,3 +13,8 @@ dependencies = [ ...@@ -13,3 +13,8 @@ dependencies = [
"pandas", "pandas",
"numpy" "numpy"
] ]
[project.scripts]
medcoder = "medcoder.main:main"
medcoder_install_trud = "medcoder.trud_api:main"
medcoder_install_omop = "medcoder.omop_api:main"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment