Skip to content

Commit

Permalink
bump v0.15.4
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrymoudiki committed Apr 26, 2024
1 parent a308ff4 commit 83e0316
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 159 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ clean-build: ## remove build artifacts
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.so' -exec rm -f {} +

clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
Expand Down
36 changes: 0 additions & 36 deletions mlsauce.egg-info/PKG-INFO

This file was deleted.

64 changes: 0 additions & 64 deletions mlsauce.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion mlsauce.egg-info/dependency_links.txt

This file was deleted.

1 change: 0 additions & 1 deletion mlsauce.egg-info/not-zip-safe

This file was deleted.

14 changes: 0 additions & 14 deletions mlsauce.egg-info/requires.txt

This file was deleted.

1 change: 0 additions & 1 deletion mlsauce.egg-info/top_level.txt

This file was deleted.

15 changes: 6 additions & 9 deletions mlsauce/adaopt/_adaopt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import pickle
import numpy as np
import pandas as pd
Expand All @@ -13,15 +14,11 @@
from ..utils import cythonize_file

try:
from . import _adaoptc as adaoptc
except ModuleNotFoundError:
try:
cythonize_file("./_adaoptc.pyx")
import _adaoptc
except ModuleNotFoundError:
subprocess.run(['python3', './fallbacksetup.py', 'build_ext', '--inplace'])
import _adaoptc

from . import _adaoptc as adaoptc
except ImportError:
import pyximport; pyximport.install()
import _adaoptc


class AdaOpt(BaseEstimator, ClassifierMixin):
"""AdaOpt classifier.
Expand Down
8 changes: 2 additions & 6 deletions mlsauce/booster/_booster_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@
try:
from . import _boosterc as boosterc
except ModuleNotFoundError:
try:
cythonize_file("./_boosterc.pyx")
import _boosterc
except ModuleNotFoundError:
subprocess.run(['python3', './fallbacksetup.py', 'build_ext', '--inplace'])
import _boosterc
import pyximport; pyximport.install()
import _boosterc


class LSBoostClassifier(BaseEstimator, ClassifierMixin):
Expand Down
8 changes: 2 additions & 6 deletions mlsauce/booster/_booster_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@
try:
from . import _boosterc as boosterc
except ModuleNotFoundError:
try:
cythonize_file("./_boosterc.pyx")
import _boosterc
except ModuleNotFoundError:
subprocess.run(['python3', './fallbacksetup.py', 'build_ext', '--inplace'])
import _boosterc
import pyximport; pyximport.install()
import _boosterc

class LSBoostRegressor(BaseEstimator, RegressorMixin):
"""LSBoost regressor.
Expand Down
2 changes: 1 addition & 1 deletion mlsauce/booster/fallbacksetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

dir_path = os.path.dirname(os.path.realpath(__file__))

setup(ext_modules=cythonize(os.path.join(dir_path, "_stumpc.pyx"),
setup(ext_modules=cythonize(os.path.join(dir_path, "_boosterc.pyx"),
compiler_directives={'language_level' : "3"}))
8 changes: 2 additions & 6 deletions mlsauce/lasso/_lasso.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@
try:
from . import _lassoc as mo
except ModuleNotFoundError:
try:
cythonize_file("./_lassoc.pyx")
import _lassoc
except ModuleNotFoundError:
subprocess.run(['python3', './fallbacksetup.py', 'build_ext', '--inplace'])
import _lassoc
import pyximport; pyximport.install()
import _lassoc


class LassoRegressor(BaseEstimator, RegressorMixin):
Expand Down
8 changes: 2 additions & 6 deletions mlsauce/ridge/_ridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
try:
from . import _ridgec as mo
except ModuleNotFoundError:
try:
cythonize_file("./_ridgec.pyx")
import _ridgec
except ModuleNotFoundError:
subprocess.run(['python3', './fallbacksetup.py', 'build_ext', '--inplace'])
import _ridgec
import pyximport; pyximport.install()
import _ridgec


class RidgeRegressor(BaseEstimator, RegressorMixin):
Expand Down
8 changes: 2 additions & 6 deletions mlsauce/stump/_stump_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
try:
from . import _stumpc as stumpc
except ModuleNotFoundError:
try:
cythonize_file("./_stumpc.pyx")
import _stumpc
except ModuleNotFoundError:
subprocess.run(['python3', './fallbacksetup.py', 'build_ext', '--inplace'])
import _stumpc
import pyximport; pyximport.install()
import _stumpc


class StumpClassifier(BaseEstimator, ClassifierMixin):
Expand Down
18 changes: 16 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
MAINTAINER_EMAIL = '[email protected]'
LICENSE = 'BSD3 Clause Clear'

__version__ = '0.15.3'
__version__ = '0.15.4'

VERSION = __version__

Expand Down Expand Up @@ -200,4 +200,18 @@ def setup_package():
setup(**metadata)

if __name__ == "__main__":
setup_package()

# /!\ do not change the order of execution of the following commands

setup_package()

dir_path = os.path.dirname(os.path.realpath(__file__))
folders = ['adaopt', 'booster', 'lasso', 'ridge', 'stump']

for folder in folders:

filename = os.path.join(dir_path, "mlsauce", folder, 'fallbacksetup.py')

print(f"\n\n Running command: {filename} \n\n")

subprocess.run(['python3', filename, 'build_ext', '--inplace'])

0 comments on commit 83e0316

Please sign in to comment.