From 063423d9138e2a7e07e22c262b78ba19f14c16a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=B6ger?= Date: Wed, 14 Feb 2024 17:52:24 +0100 Subject: [PATCH] debugging workflow --- .github/workflows/pytest-coverage.yml | 21 ++++++++----------- .../label_errors/test_intra_extra_distance.py | 5 +++-- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pytest-coverage.yml b/.github/workflows/pytest-coverage.yml index f144be9..33cf7e7 100644 --- a/.github/workflows/pytest-coverage.yml +++ b/.github/workflows/pytest-coverage.yml @@ -12,16 +12,16 @@ jobs: steps: - uses: actions/checkout@v4 # without submodules - - name: disable the keychain credential helper + - name: Disable the keychain credential helper run: git config --global credential.helper "" - - name: enable the local store credential helper + - name: Enable the local store credential helper run: git config --global --add credential.helper store - - name: add credential + - name: Add credential run: echo "https://x-access-token:${{ secrets.SUBMODULE_GITHUB_TOKEN }}@github.com" >> ~/.git-credentials - - name: tell git to use https instead of ssh whenever it encounters it + - name: Tell git to use https instead of ssh whenever it encounters it run: 'git config --global url."https://github.com/".insteadof git@github.com:' - name: Git submodule initialization @@ -49,11 +49,8 @@ jobs: run: | python3 -m coverage run -m pytest tests --junitxml=report.xml; coverage report -i --include=src/*; coverage xml -i --include=src/*; - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} # Not required for public repos - file: ./coverage.xml - flags: unittests - name: codecov-umbrella - fail_ci_if_error: true + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + env: + token: ${{ secrets.CODECOV_TOKEN }} + slug: Digital-Dermatology/SelfClean diff --git a/tests/unittests/cleaner/label_errors/test_intra_extra_distance.py b/tests/unittests/cleaner/label_errors/test_intra_extra_distance.py index d2a0f61..417acbf 100644 --- a/tests/unittests/cleaner/label_errors/test_intra_extra_distance.py +++ b/tests/unittests/cleaner/label_errors/test_intra_extra_distance.py @@ -39,8 +39,9 @@ def test_exact_duplicate_with_diff_label(self): cleaner.fit(emb_space=emb_space, labels=labels) out_dict = cleaner.predict() - self.assertTrue( - (out_dict["label_errors"]["indices"][:2] == [0, len(emb_space) - 1]).all() + np.testing.assert_array_equal( + np.sort(out_dict["label_errors"]["indices"][:2]), + np.sort(np.asarray([0, len(emb_space) - 1])), ) self.assertAlmostEqual(out_dict["label_errors"]["scores"][0], 0)