diff --git a/pyproject.toml b/pyproject.toml index c426aeb..1dae497 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,13 +16,13 @@ fhirpy = ">=1.4" Faker = ">=25.0" inflect = "^7.3.0" python-slugify = ">=8.0.4" +stringcase = ">=1.2" jinja2 = "^3.1.4" [tool.poetry.group.dev.dependencies] pytest = ">=6" flake8 = ">=3.8" Sphinx = ">=3.2" -stringcase = ">=1.2" pyright = "^1.1.367" pre-commit = "^3.7.1" pylint = "^3.2.5" @@ -35,6 +35,10 @@ venv = ".venv" [tool.poetry.scripts] lint = "scripts.lint:main" format = "scripts.format:main" +logical_model_gen = "who_l3_smart_tools.cli.logical_model_gen:main" +indicator_testing = "who_l3_smart_tools.cli.indicator_testing:main" +terminology = "who_l3_smart_tools.cli.terminology:main" + [build-system] requires = ["poetry-core"] diff --git a/setup.py b/setup.py index ea17fd9..9e691f3 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ -from setuptools import setup, find_packages - +from setuptools import find_packages, setup setup( name="who_l3_smart_tools", diff --git a/tests/test_cql_tools.py b/tests/test_cql_tools.py index a4ff4a0..b28a685 100644 --- a/tests/test_cql_tools.py +++ b/tests/test_cql_tools.py @@ -1,7 +1,11 @@ # Generated by CodiumAI import datetime import os -import re +import unittest + +import pandas as pd +import stringcase + from who_l3_smart_tools.core.cql_tools.cql_file_generator import CqlFileGenerator from who_l3_smart_tools.core.cql_tools.cql_resource_generator import ( CqlResourceGenerator, @@ -9,9 +13,6 @@ from who_l3_smart_tools.core.cql_tools.cql_template_generator import ( CqlTemplateGenerator, ) -import pandas as pd -import unittest -import stringcase class TestCqlTools(unittest.TestCase): @@ -100,7 +101,7 @@ def test_generate_library_fsh(self): with open(output_file, "w") as f: f.write(library_fsh) - expected_lib_file = f"tests/data/example_fsh/HIV27_library.fsh" + expected_lib_file = "tests/data/example_fsh/HIV27_library.fsh" with open(expected_lib_file, "r") as expected_lib_fsh_file: expected_library_fsh = expected_lib_fsh_file.read().rstrip() @@ -116,7 +117,6 @@ def test_generate_measure_fsh(self): output_file = ( f"tests/output/fsh/{stringcase.alphanumcase(p["library_name"])}_measure.fsh" ) - if os.path.exists(output_file): os.remove(output_file) with open(output_file, "w") as f: diff --git a/who_l3_smart_tools/core/cql_tools/__init__.py b/who_l3_smart_tools/core/cql_tools/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/who_l3_smart_tools/core/terminology/terminology.py b/who_l3_smart_tools/core/terminology/terminology.py index 2f1cdb2..5c53ca0 100644 --- a/who_l3_smart_tools/core/terminology/terminology.py +++ b/who_l3_smart_tools/core/terminology/terminology.py @@ -268,7 +268,7 @@ def _convert_rows(self) -> None: sheet = workbook[sheet_name] header: Optional[list[str]] = None for row in sheet.iter_rows(values_only=True): - # if header is set the current raw as the header and skip to the next row. + # if header is None. Set the current row as the header and skip to the next row. if header is None: header = row continue