Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update spare_score to work for python 3.8 up to python 3.12 #22

Merged
merged 25 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cfa0761
Worflow update
spirosmaggioros Jul 9, 2024
a7ed814
Workflow update again
spirosmaggioros Jul 9, 2024
b1922ca
And again...
spirosmaggioros Jul 9, 2024
9fceaf8
Installed anaconda to be suer
spirosmaggioros Jul 9, 2024
5f645c5
Updated workflow with correct conda env
spirosmaggioros Jul 9, 2024
c4c5757
Added miniconda-version
spirosmaggioros Jul 9, 2024
dd51ad6
Removed echo
spirosmaggioros Jul 9, 2024
228ec87
Added dependencies downloader just to be sure
spirosmaggioros Jul 9, 2024
eaa789a
setuptools for some reason is not being downloaded
spirosmaggioros Jul 9, 2024
2e28bc5
Lets check if it works on one workflow
spirosmaggioros Jul 9, 2024
5ca53d9
Added the same for ubuntu
spirosmaggioros Jul 9, 2024
439e292
Resolved multiple os error
spirosmaggioros Jul 9, 2024
5f9817e
Merge branch 'main' into macos_builder
spirosmaggioros Jul 13, 2024
76d3d9f
Update spare_score to work for python 3.8 up to python 3.12
spirosmaggioros Aug 14, 2024
eefb589
Updated macos workflow versions to macos-13
spirosmaggioros Aug 14, 2024
85c28d1
Merge branch 'test_cases' into macos_builder
spirosmaggioros Aug 14, 2024
b1f3d7a
Changed numpy version
spirosmaggioros Aug 14, 2024
03624dd
Changed torch version
spirosmaggioros Aug 14, 2024
82faf1e
Changed to macos 14 for just 3.12
spirosmaggioros Aug 14, 2024
d4b9e8f
Changed to macos 12 for just 3.12
spirosmaggioros Aug 14, 2024
9b02fa5
Changed some deprecated stuff from scikit-learn
spirosmaggioros Aug 14, 2024
d3efcab
forgot to run pre-commit
spirosmaggioros Aug 14, 2024
e1084ca
Revert "forgot to run pre-commit"
spirosmaggioros Aug 14, 2024
de66a0a
Revert "Changed some deprecated stuff from scikit-learn"
spirosmaggioros Aug 14, 2024
037aeeb
Made macos 3.8 report to coverage instead of 3.12
spirosmaggioros Aug 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions .github/workflows/macos_test_cases.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/macos_test_cases_p3-12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: spare_scores test cases on macos for python 3.12

# workflow dispatch has been added for testing purposes
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ["macos-13"]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set-up miniconda for macos and ubuntu
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.12
miniconda-version: "latest"
- name: Create conda env
run: conda create -n spare python=3.12
- name: Install pip
run: conda run -n spare conda install pip
- name: Install spare scores
run: |
pip install setuptools twine wheel
python -m pip install .
- name: Run unit tests
run: |
cd tests/unit && python -m unittest discover -s . -p "*.py"
42 changes: 42 additions & 0 deletions .github/workflows/macos_test_cases_p3-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: spare_scores test cases on macos for python 3.8

# workflow dispatch has been added for testing purposes
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ["macos-13"]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Set-up miniconda for macos and ubuntu
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
miniconda-version: "latest"
- name: Create conda env
run: conda create -n spare python=3.8
- name: Install pip
run: conda run -n spare conda install pip
- name: Install spare scores
run: |
pip install setuptools twine wheel
python setup.py bdist_wheel
cd dist
WHEEL_FILE=$(ls spare_scores*)
pip install "$WHEEL_FILE"
- name: Download dependencies
run: pip install setuptools && pip install .
- name: Generate Coverage Report
run: |
pip install pytest-cov
cd tests/unit && pytest --cov=../../ --cov-report=xml
- name: Upload Coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CBICA/spare_score
27 changes: 13 additions & 14 deletions .github/workflows/sphinx-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: Deploy static cntent to Pages
on:
push:
branches: ["main"]

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: "3.12"
- name: Activate conda
run: |
conda create -n spare python=3.8
conda create -n spare python=3.12
conda run -n spare conda install pip
conda run -n spare pip install spare_scores
- name: Install dependencies
Expand All @@ -29,30 +29,29 @@ jobs:

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3

with:
path: docs/_build/html
retention-days: 90

deploy-docs:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: build-docs

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.output.page_url }}
concurrency:

concurrency:
group: "pages"
cancel-in-progress: true

runs-on: ubuntu-latest
steps:
- name: Deploy artifact to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Deploy artifact to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
38 changes: 0 additions & 38 deletions .github/workflows/ubuntu_test_cases.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/ubuntu_test_cases_p3-12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: spare_scores test cases on ubuntu for python 3.12

# workflow dispatch has been added for testing purposes
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ["ubuntu-latest"]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set-up miniconda for macos and ubuntu
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.12
miniconda-version: "latest"
- name: Create conda env
run: conda create -n spare python=3.12
- name: Install pip
run: conda run -n spare conda install pip
- name: Install spare scores
run: |
pip install setuptools twine wheel
python -m pip install .
- name: Download dependencies
run: pip install setuptools && pip install .
- name: Run unit tests
run: |
cd tests/unit && python -m unittest discover -s . -p "*.py"
36 changes: 36 additions & 0 deletions .github/workflows/ubuntu_test_cases_p3-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: spare_scores test cases on ubuntu for python 3.8

# workflow dispatch has been added for testing purposes
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ["ubuntu-latest"]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Set-up miniconda for macos and ubuntu
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
miniconda-version: "latest"
- name: Create conda env
run: conda create -n spare python=3.8
- name: Install pip
run: conda run -n spare conda install pip
- name: Install spare scores
run: |
pip install setuptools twine wheel
python setup.py bdist_wheel
cd dist
WHEEL_FILE=$(ls spare_scores*)
pip install "$WHEEL_FILE"
- name: Download dependencies
run: pip install setuptools && pip install .
- name: Run unit tests
run: |
cd tests/unit && python -m unittest discover -s . -p "*.py"
Loading
Loading