From c0e82a1ea415bb556d21ff45c9054a46192aa3b4 Mon Sep 17 00:00:00 2001 From: Jordan Day Date: Tue, 10 Dec 2024 10:32:04 +0000 Subject: [PATCH] Update workflow and removing old functions --- .github/workflows/main.yaml | 4 ++-- cons_results/imputation/post_imputation.py | 10 +--------- tests/imputation/test_post_imputation.py | 3 +-- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0ba2033..bce9216 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -41,8 +41,8 @@ jobs: - name: create container run: docker run -id --name container_${{matrix.cml_version}} -v"$(pwd)"://home/cdsw cml:${{matrix.cml_version}} - name: build in dev mode - run: docker exec container_${{matrix.cml_version}} pip install ."[dev]" + run: docker exec container_${{matrix.cml_version}} pip install -e .[dev] - name: check env run: docker exec container_${{matrix.cml_version}} pip list - name: test - run: docker exec container_${{matrix.cml_version}} pytest + run: docker exec container_${{matrix.cml_version}} pytest -v diff --git a/cons_results/imputation/post_imputation.py b/cons_results/imputation/post_imputation.py index e5263ad..70584c0 100644 --- a/cons_results/imputation/post_imputation.py +++ b/cons_results/imputation/post_imputation.py @@ -11,7 +11,7 @@ # Can the total be imputed? my guess would be no -def calculate_totals(df: pd.DataFrame, derive_from: list[int]) -> pd.DataFrame: +def calculate_totals(df: pd.DataFrame, derive_from: list) -> pd.DataFrame: """ Returns the sums of a dataframe in which the first level index is in @@ -215,11 +215,3 @@ def rescale_imputed_values( ) return df # Return the modified DataFrame - - -def check_imputed_values_constrained( - df: pd.DataFrame, derive_from: list[int] -) -> pd.DataFrame: - # derive total again, DO NOT OVERWRITE RETURN - - pass diff --git a/tests/imputation/test_post_imputation.py b/tests/imputation/test_post_imputation.py index 0c31eb4..a3fa9b7 100644 --- a/tests/imputation/test_post_imputation.py +++ b/tests/imputation/test_post_imputation.py @@ -5,9 +5,8 @@ scenarios = [100, 101, 102, 103, 104, 105] -pytestmark = pytest.mark.parametrize("reference", scenarios) - +@pytest.mark.parametrize("reference", scenarios) def test_rescale_imputed_values(reference): expected_output = pd.read_csv( "tests/data/imputation/test_data_rescale_imputed_single.csv"