From 13f8c0ece915a2c18c422323c32d72c1bdf09620 Mon Sep 17 00:00:00 2001 From: lukas leufen <l.leufen@fz-juelich.de> Date: Thu, 28 Nov 2019 14:19:24 +0100 Subject: [PATCH] changed name for CI test results (was naming duplication with standard python test folder) --- .gitlab-ci.yml | 6 +++--- CI/run_pytest.sh | 12 ++++++------ src/data_preparation.py | 2 +- test/test_data_preparation.py | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c34d9a24..f0da24d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ tests: when: always paths: - badges/ - - test/ + - test_results/ coverage: tags: @@ -90,7 +90,7 @@ pages: - cp -af coverage/. public/coverage - ls public/coverage - mkdir -p public/test - - cp -af test/. public/test + - cp -af test_results/. public/test - ls public/test - ls public when: always @@ -101,7 +101,7 @@ pages: - public - badges/ - coverage/ - - test/ + - test_results/ cache: key: old-pages paths: diff --git a/CI/run_pytest.sh b/CI/run_pytest.sh index d8755448..5547b7ab 100644 --- a/CI/run_pytest.sh +++ b/CI/run_pytest.sh @@ -6,14 +6,14 @@ python3 -m pytest --html=report.html --self-contained-html test/ | tee test_resu IS_FAILED=$? # move html test report -mkdir test/ +mkdir test_results/ BRANCH_NAME=$( echo -e "${CI_COMMIT_REF_NAME////_}") -mkdir test/${BRANCH_NAME} -mkdir test/recent -cp report.html test/${BRANCH_NAME}/. -cp report.html test/recent/. +mkdir test_results/${BRANCH_NAME} +mkdir test_results/recent +cp report.html test_results/${BRANCH_NAME}/. +cp report.html test_results/recent/. if [[ "${CI_COMMIT_REF_NAME}" = "master" ]]; then - cp -r report.html test/. + cp -r report.html test_results/. fi # exit 0 if no tests implemented diff --git a/src/data_preparation.py b/src/data_preparation.py index 3cadf590..258a2475 100644 --- a/src/data_preparation.py +++ b/src/data_preparation.py @@ -124,7 +124,7 @@ class DataPrep(object): def __repr__(self): return f"Dataprep(path='{self.path}', network='{self.network}', station={self.station}, " \ - f"variables={self.variables}, station_type='{self.station_type}', **{self.kwargs})" + f"variables={self.variables}, station_type={self.station_type}, **{self.kwargs})" def interpolate(self, dim: str, method: str = 'linear', limit: int = None, use_coordinate: Union[bool, str] = True, **kwargs): diff --git a/test/test_data_preparation.py b/test/test_data_preparation.py index 0a520eaf..ba3a4cdf 100644 --- a/test/test_data_preparation.py +++ b/test/test_data_preparation.py @@ -38,7 +38,7 @@ class TestDataPrep: d.station_type = "traffic" d.kwargs = None assert d.__repr__().rstrip() == "Dataprep(path='data/test', network='dummy', station=['DEBW107'], "\ - "variables=['o3', 'temp'], station_type='traffic', **None)".rstrip() + "variables=['o3', 'temp'], station_type=traffic, **None)".rstrip() def test_set_file_name_and_meta(self): d = object.__new__(DataPrep) -- GitLab