Skip to content

Commit

Permalink
Merge pull request #19 from I-TECH-UW/pip-package-initial-clean
Browse files Browse the repository at this point in the history
Initial clean to get cli commands to work
  • Loading branch information
xkmato authored Jul 18, 2024
2 parents b91a8f8 + 14a541a commit 445fbdb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"]
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from setuptools import setup, find_packages

from setuptools import find_packages, setup

setup(
name="who_l3_smart_tools",
Expand Down
12 changes: 6 additions & 6 deletions tests/test_cql_tools.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# 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,
)
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):
Expand Down Expand Up @@ -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()

Expand All @@ -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:
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion who_l3_smart_tools/core/terminology/terminology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 445fbdb

Please sign in to comment.