Skip to content

Commit

Permalink
Merge pull request #17 from yohila/main
Browse files Browse the repository at this point in the history
Version 0.1.2 - Quick Fix for scikitlearn -- Works from oython 3.7 to 3.11
  • Loading branch information
gaetanbrison authored Jan 16, 2024
2 parents 2870d88 + cbec1be commit 5697fb5
Show file tree
Hide file tree
Showing 43 changed files with 75,951 additions and 25,031 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build_wheels_Manul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Generating Wheels

on:
push:
branches-ignore:
- "main"
# To ignore main branch
# branches-ignore:
# - "main"
# branches: [ main ]
schedule:
- cron: '0 0 1 * *'
Expand All @@ -16,9 +17,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
# os: [macos-latest, ubuntu-latest, windows-latest]
python: ['3.7', '3.8', '3.9']
# os: [windows-latest]
os: [macos-latest, ubuntu-latest, windows-latest]
python: ['3.7', '3.8', '3.9', '3.10', '3.11'] # Gives error for Python 3.12
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pytest_cp310.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
# os: [ubuntu-latest]
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest]
python: ['3.10',]
env:
OS: ${{ matrix.os }}
Expand Down Expand Up @@ -53,14 +54,16 @@ jobs:

- name: Build and compile
run: |
make clean
# make clean
# pip install .
################## Use this when you want to use local wheel installation through dist ######################
make dist
pip freeze | xargs pip uninstall -y # remove all the packages installed through pip
pip install dist/*
#############################################################################
# python setup.py develop
# pip install -i https://test.pypi.org/simple/ structured-predictions==0.0.6
#### To install from TestPyPi
# pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
# pip install -i https://test.pypi.org/simple/ structured-predictions
# python tests/tests_DIOKR/Demo_DeepIOKR_bibtex.py
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/pytest_cp311.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: pytesting 3.11

on:
push:
branches-ignore:
- "main"
# branches: [ main ]
schedule:
- cron: '0 0 1 * *'
# pull_request:
# branches:
# - '*'

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest]
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest]
python: ['3.11',]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
################### Use this when you want to use local wheel installation through dist #################
pip install -r requirements.txt
# - name: Lint with flake8
# run: |
# pip install flake8
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pip install pytest
# pytest -v --cov=structured-predictions --cov-report=html


# - name: Build and compile
# run: |
# make dist
# python setup.py develop

- name: Build and compile
run: |
# make clean
# pip install .
################## Use this when you want to use local wheel installation through dist ######################
make dist
pip freeze | xargs pip uninstall -y # remove all the packages installed through pip
pip install dist/*
#############################################################################
# python setup.py develop
# pip install -i https://test.pypi.org/simple/ structured-predictions==0.0.6
#### To install from TestPyPi
# pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
# pip install -i https://test.pypi.org/simple/ structured-predictions
# python tests/tests_DIOKR/Demo_DeepIOKR_bibtex.py
- name: Test with pytest
run: |
pip install pytest
pytest tests/tests_OK3/test_tree_clf_and_reg.py tests/tests_OK3/test_complementary.py
pytest tests/tests_DIOKR
# python tests/tests_IOKR/ISOKR.py
# python tests/tests_IOKR/SISOKR.py
# pytest tests/tests_IOKR
20 changes: 12 additions & 8 deletions .github/workflows/pytest_cp36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
run: |
python -m pip install --upgrade pip
################### Use this when you want to use local wheel installation through dist #################
# pip install -r requirements.txt
pip install -r requirements.txt
# - name: Lint with flake8
# run: |
# pip install flake8
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 ---statistics
# - name: Test with pytest
# run: |
# pip install pytest
Expand All @@ -56,18 +56,22 @@ jobs:
# make clean
# pip install .
################## Use this when you want to use local wheel installation through dist ######################
# make dist
# pip install dist/*
make dist
pip freeze | xargs pip uninstall -y # remove all the packages installed through pip
pip install dist/*
#############################################################################
# python setup.py develop
# pip install -i https://test.pypi.org/simple/ structured-predictions==0.0.6
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
#### To install from TestPyPi
# pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
# pip install -i https://test.pypi.org/simple/ structured-predictions
python tests/tests_DIOKR/Demo_DeepIOKR_bibtex.py
# python tests/tests_DIOKR/Demo_DeepIOKR_bibtex.py
- name: Test with pytest
run: |
pip install pytest
pytest tests/tests_OK3/test_tree_clf_and_reg.py tests/tests_OK3/test_complementary.py tests/tests_IOKR tests/tests_DIOKR
pytest tests/tests_OK3/test_tree_clf_and_reg.py tests/tests_OK3/test_complementary.py
pytest tests/tests_DIOKR
# python tests/tests_IOKR/ISOKR.py
# python tests/tests_IOKR/SISOKR.py
# pytest tests/tests_IOKR
26 changes: 17 additions & 9 deletions .github/workflows/pytest_cp37.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
################## GitHub Action Tips ##############3
# If you use GitHub Action for specific project after long Time.
# You first need to modify the Action file in order for GitHub Action to work

name: pytesting 3.7

on:
push:
# branches-ignore:
# - "main"
### This will ignore the testing
branches-ignore:
- "main"
# # branches: [ main ]
schedule:
- cron: '0 0 1 * *'
Expand All @@ -16,8 +21,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, macos-latest]
os: [macos-latest, ubuntu-latest, windows-latest]
# os: [ubuntu-latest]
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest]
python: ['3.7',]
env:
OS: ${{ matrix.os }}
Expand All @@ -32,7 +38,7 @@ jobs:
run: |
python -m pip install --upgrade pip
################### Use this when you want to use local wheel installation through dist #################
# pip install -r requirements.txt
pip install -r requirements.txt
# - name: Lint with flake8
# run: |
# pip install flake8
Expand All @@ -56,19 +62,21 @@ jobs:
# make clean
# pip install .
################## Use this when you want to use local wheel installation through dist ######################
# make dist
# pip install dist/*
make dist
pip freeze | xargs pip uninstall -y # remove all the packages installed through pip
pip install dist/*
#############################################################################
# python setup.py develop
# pip install -i https://test.pypi.org/simple/ structured-predictions==0.0.6
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
#### To install from TestPyPi
# pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
# pip install -i https://test.pypi.org/simple/ structured-predictions
# python tests/tests_DIOKR/Demo_DeepIOKR_bibtex.py
- name: Test with pytest
run: |
pip install pytest
pytest tests/tests_OK3/test_tree_clf_and_reg.py tests/tests_OK3/test_complementary.py
pytest tests/tests_DIOKR
python tests/tests_IOKR/ISOKR.py
# python tests/tests_IOKR/ISOKR.py
# python tests/tests_IOKR/SISOKR.py
# pytest tests/tests_IOKR
23 changes: 15 additions & 8 deletions .github/workflows/pytest_cp38.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
################## GitHub Action Tips ##############3
# If you use GitHub Action for specific project after long Time.
# You first need to modify the Action file in order for GitHub Action to work

name: pytesting 3.8

on:
push:
# branches-ignore:
# - "main"
branches-ignore:
- "main"
# branches: [ main ]
schedule:
- cron: '0 0 1 * *'
Expand All @@ -17,7 +21,8 @@ jobs:
strategy:
matrix:
# os: [ubuntu-latest]
os: [macos-latest, ubuntu-latest, windows-latest]
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest]
python: ['3.8',]
env:
OS: ${{ matrix.os }}
Expand All @@ -32,7 +37,7 @@ jobs:
run: |
python -m pip install --upgrade pip
################### Use this when you want to use local wheel installation through dist #################
# pip install -r requirements.txt
pip install -r requirements.txt
# - name: Lint with flake8
# run: |
# pip install flake8
Expand All @@ -56,19 +61,21 @@ jobs:
# make clean
# pip install .
################## Use this when you want to use local wheel installation through dist ######################
# make dist
# pip install dist/*
make dist
pip freeze | xargs pip uninstall -y # remove all the packages installed through pip
pip install dist/*
#############################################################################
# python setup.py develop
# pip install -i https://test.pypi.org/simple/ structured-predictions==0.0.6
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
#### To install from TestPyPi
# pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
# pip install -i https://test.pypi.org/simple/ structured-predictions
# python tests/tests_DIOKR/Demo_DeepIOKR_bibtex.py
- name: Test with pytest
run: |
pip install pytest
pytest tests/tests_OK3/test_tree_clf_and_reg.py tests/tests_OK3/test_complementary.py
pytest tests/tests_DIOKR
python tests/tests_IOKR/ISOKR.py
# python tests/tests_IOKR/ISOKR.py
# python tests/tests_IOKR/SISOKR.py
# pytest tests/tests_IOKR
24 changes: 16 additions & 8 deletions .github/workflows/pytest_cp39.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
################## GitHub Action Tips ##############3
# If you use GitHub Action for specific project after long Time.
# You first need to modify the Action file in order for GitHub Action to work

name: pytesting 3.9

on:
push:
branches-ignore:
- "main"
# branches: [ main ]
# # branches: [ main ]
schedule:
- cron: '0 0 1 * *'
# pull_request:
Expand All @@ -16,8 +20,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest]
os: [macos-latest, ubuntu-latest, windows-latest]
# os: [ubuntu-latest]
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest]
python: ['3.9',]
env:
OS: ${{ matrix.os }}
Expand All @@ -32,7 +37,8 @@ jobs:
run: |
python -m pip install --upgrade pip
################### Use this when you want to use local wheel installation through dist #################
# pip install -r requirements.txt
# pip install numpy==1.19.5
pip install -r requirements.txt
# - name: Lint with flake8
# run: |
# pip install flake8
Expand All @@ -56,19 +62,21 @@ jobs:
# make clean
# pip install .
################## Use this when you want to use local wheel installation through dist ######################
# make dist
# pip install dist/*
make dist
pip freeze | xargs pip uninstall -y # remove all the packages installed through pip
pip install dist/*
#############################################################################
# python setup.py develop
# pip install -i https://test.pypi.org/simple/ structured-predictions==0.0.6
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
#### To install from TestPyPi
# pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple structured-predictions
# pip install -i https://test.pypi.org/simple/ structured-predictions
# python tests/tests_DIOKR/Demo_DeepIOKR_bibtex.py
- name: Test with pytest
run: |
pip install pytest
pytest tests/tests_OK3/test_tree_clf_and_reg.py tests/tests_OK3/test_complementary.py
pytest tests/tests_DIOKR
python tests/tests_IOKR/ISOKR.py
# python tests/tests_IOKR/ISOKR.py
# python tests/tests_IOKR/SISOKR.py
# pytest tests/tests_IOKR
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[build-system]
requires = ["setuptools", "wheel", "oldest-supported-numpy", "cython>=0.23", "scikit-learn==0.24.2"]
# requires = ["setuptools", "wheel", "oldest-supported-numpy", "cython>=0.23", "scikit-learn==0.24.2"]
requires = ["setuptools", "wheel", "oldest-supported-numpy", "cython>=0.23"]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
Expand Down
Loading

0 comments on commit 5697fb5

Please sign in to comment.