From 07fa3dc6864c8899c0cc37be85c07d48d4ff8c24 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Thu, 18 Jul 2024 13:35:04 +0300 Subject: [PATCH 1/6] Added automatic PyPI update --- .github/workflows/python-publish.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..66622cb --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,40 @@ +name: Upload Python Package + +on: workflow_dispatch + +permissions: + contents: read + id-token: write # Allow GitHub to mint tokens + +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest # Can use macos-latest if needed + + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + pip install setuptools + pip install twine + pip install wheel + sudo apt-get install jq + + - name: Clean previous builds + run: rm -rf dist + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Publish package to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: twine upload --verbose dist/* From e851be9bf873351d4c0268b9285e703256ea1192 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Mon, 29 Jul 2024 12:35:38 +0300 Subject: [PATCH 2/6] Fixed coverage files --- .github/workflows/ubuntu_test_cases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_test_cases.yml b/.github/workflows/ubuntu_test_cases.yml index bee1f0c..9334a33 100644 --- a/.github/workflows/ubuntu_test_cases.yml +++ b/.github/workflows/ubuntu_test_cases.yml @@ -32,7 +32,7 @@ jobs: - name: Generate Coverage Report run: | pip install pytest-cov - cd tests/unit && pytest --cov + cd tests/unit && pytest --cov=./ --cov-report=xml - name: Upload Coverage to Codecov uses: codecov/codecov-action@v2 with: From b9ad501e6f5d8120701e9e79ca176a835c37323c Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Mon, 29 Jul 2024 12:42:12 +0300 Subject: [PATCH 3/6] New version for codecov --- .github/workflows/ubuntu_test_cases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_test_cases.yml b/.github/workflows/ubuntu_test_cases.yml index 9334a33..72cc128 100644 --- a/.github/workflows/ubuntu_test_cases.yml +++ b/.github/workflows/ubuntu_test_cases.yml @@ -34,7 +34,7 @@ jobs: pip install pytest-cov cd tests/unit && pytest --cov=./ --cov-report=xml - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} slug: CBICA/spare_score From 8fc35e29ab081e8a384389fc9a995b095eb20212 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Mon, 29 Jul 2024 14:55:15 +0300 Subject: [PATCH 4/6] Codecov update --- .github/workflows/ubuntu_test_cases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_test_cases.yml b/.github/workflows/ubuntu_test_cases.yml index 72cc128..7ae22ea 100644 --- a/.github/workflows/ubuntu_test_cases.yml +++ b/.github/workflows/ubuntu_test_cases.yml @@ -32,7 +32,7 @@ jobs: - name: Generate Coverage Report run: | pip install pytest-cov - cd tests/unit && pytest --cov=./ --cov-report=xml + cd tests/unit && pytest --cov=../../ --cov-report=xml - name: Upload Coverage to Codecov uses: codecov/codecov-action@v4.0.1 with: From eaef203646dc5202eab7b8d4d3a4ee4747883ffd Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Mon, 29 Jul 2024 15:13:12 +0300 Subject: [PATCH 5/6] Codecov update 2 --- .github/workflows/macos_test_cases.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/macos_test_cases.yml b/.github/workflows/macos_test_cases.yml index e9ff9f8..bbeab6a 100644 --- a/.github/workflows/macos_test_cases.yml +++ b/.github/workflows/macos_test_cases.yml @@ -29,14 +29,5 @@ jobs: - name: Run unit tests run: | cd tests/unit && python -m unittest discover -s . -p "*.py" - - name: Generate Report - run: | - pip install pytest-cov - cd tests/unit && pytest --cov - - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_TOKEN }} - slug: CBICA/spare_score From 07d6642922b23914bbcc755745e48dddd57ddfe7 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Fri, 16 Aug 2024 21:21:33 +0300 Subject: [PATCH 6/6] Updated version to 1.2.2 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e0f7596..a8af09d 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="spare_scores", - version="1.2.1", + version="1.2.2", description="Compute characteristic brain signatures of your case population.", long_description=long_description, long_description_content_type="text/markdown",