Skip to content

Commit

Permalink
remove unused args and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mshadbolt committed Nov 21, 2023
1 parent e516bb6 commit 56c2728
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions validate_coverage.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import argparse
import json
import sys
import yaml
import jsonschema
import os
import re
import CSVConvert
import mappings
from copy import deepcopy
from mohschema import MoHSchema
from jsoncomparison import Compare
# from jsoncomparison import Compare
# from copy import deepcopy
# import yaml
# import jsonschema
# import os
# import re
# import CSVConvert


def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--manifest', type=str, help="Path to a manifest file describing the mapping.", required=False)
parser.add_argument('--json', type=str, help="<input-file-path-name>_map.json file generated by CSVConvert.py.", required=True)
parser.add_argument('--input', type=str, required=False, help="Directory to the raw clinical data used for creating the JSON file.")
parser.add_argument('--json', type=str, help="<input-file-path-name>_map.json file generated by CSVConvert.py.",
required=True)
parser.add_argument('--verbose', '--v', action="store_true", help="Print extra information")
# parser.add_argument('--manifest', type=str, help="Path to a manifest file describing the mapping.", required=False)
# parser.add_argument('--input', type=str, required=False, help="Directory to the raw clinical data used for creating the JSON file.")
args = parser.parse_args()
return args

Expand Down Expand Up @@ -199,7 +200,7 @@ def parse_args():
# missing.append(comment_match.group(2))
# print("\n".join(missing))

def validate_coverage(map_json, input_path=None, verbose=False):
def validate_coverage(map_json, verbose=False):
if verbose:
mappings.VERBOSE = True

Expand Down Expand Up @@ -237,9 +238,9 @@ def main(args):
sys.exit(f"No {e} key found in the provided map json, please check you are providing the right file and "
"try again, it should end with '_map.json'.")

input_path = args.input
# input_path = args.input
verbose = True if args.verbose else False
result = validate_coverage(map_json, input_path, verbose)
result = validate_coverage(map_json, verbose)
if len(result["warnings"]) > 0:
print("Mapping has missing data:")
for line in result["warnings"]:
Expand Down

0 comments on commit 56c2728

Please sign in to comment.