Skip to content
Snippets Groups Projects
Commit 78e6fcd6 authored by mjbonifa's avatar mjbonifa
Browse files

refactor: converted all examples to yaml and added test for config2. Updated...

refactor: converted all examples to yaml and added test for config2. Updated readme. Fixed but in diff that assumed all csv files in map directory where map files when some where error files if no codes exists, moved error files to errors directory in the map directory to avoid this. Closes #19
parent 9eca4250
No related branches found
No related tags found
No related merge requests found
...@@ -232,7 +232,9 @@ def validate(phen_dir): ...@@ -232,7 +232,9 @@ def validate(phen_dir):
logger.info(f"Validating phenotype: {phen_dir}") logger.info(f"Validating phenotype: {phen_dir}")
phen_path = Path(phen_dir) phen_path = Path(phen_dir)
if not phen_path.is_dir(): if not phen_path.is_dir():
raise NotADirectoryError(f"Error: '{str(phen_path.resolve())}' is not a directory") raise NotADirectoryError(
f"Error: '{str(phen_path.resolve())}' is not a directory"
)
config_path = phen_path / CONFIG_FILE config_path = phen_path / CONFIG_FILE
if not config_path.is_file(): if not config_path.is_file():
......
...@@ -46,11 +46,13 @@ def test_phen_init_local_specified(tmp_dir, monkeypatch, caplog): ...@@ -46,11 +46,13 @@ def test_phen_init_local_specified(tmp_dir, monkeypatch, caplog):
# TODO: This test will need to be refactored so that the expected outputs match the config files # TODO: This test will need to be refactored so that the expected outputs match the config files
# right now it just tests that it runs successfully and does not check the contents of the output # right now it just tests that it runs successfully and does not check the contents of the output
@pytest.mark.parametrize("config_file", [ @pytest.mark.parametrize(
"config_file",
[
("config1.yaml"), # config.yaml test case ("config1.yaml"), # config.yaml test case
("config2.yaml"), # config.yaml test case ("config2.yaml"), # config.yaml test case
],
]) )
def test_phen_workflow(tmp_dir, monkeypatch, caplog, config_file): def test_phen_workflow(tmp_dir, monkeypatch, caplog, config_file):
print(f"Temporary directory: {tmp_dir}") # Prints path for debugging print(f"Temporary directory: {tmp_dir}") # Prints path for debugging
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment