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 CI #1089

Merged
merged 8 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 16 additions & 17 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,34 @@ jobs:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

env:
GITHUB_ACTIONS_CI: true
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install packages and test with pytest
channels: conda-forge
activate-environment: mlxtend
environment-file: environment.yml
create-env-file: true

- name: Install dependencies and run tests
shell: bash -l {0}
run: |
conda config --add channels conda-forge
conda update conda -y -q
conda env update --file environment.yml --name base
pip install scikit-learn==1.1.3
pip install pandas==1.3.5
conda install tensorflow joblib pytest -y -q
conda install imageio scikit-image -y -q
conda install dlib -y -q
pip install markdown
pip install coverage
pip install -e .
pip install scikit-learn==1.1.3 pandas==1.3.5 markdown coverage
pip install -e .
python -c "import numpy; print('NumPy:', numpy.__version__)"
python -c "import scipy; print('SciPy:', scipy.__version__)"
python -c "import sklearn; print('Scikit-learn:', sklearn.__version__)"
python -c "import pandas; print('Pandas:', pandas.__version__)"
coverage run --source=mlxtend --branch -m pytest mlxtend
coverage xml

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v2
1 change: 0 additions & 1 deletion mlxtend/classifier/adaline.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


class Adaline(_BaseModel, _IterativeModel, _Classifier):

"""ADAptive LInear NEuron classifier.

Note that this implementation of Adaline expects binary class labels
Expand Down
1 change: 0 additions & 1 deletion mlxtend/classifier/ensemble_vote.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class EnsembleVoteClassifier(BaseEstimator, ClassifierMixin, TransformerMixin):

"""Soft Voting/Majority Rule classifier for scikit-learn estimators.

Parameters
Expand Down
1 change: 0 additions & 1 deletion mlxtend/classifier/logistic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


class LogisticRegression(_BaseModel, _IterativeModel, _Classifier):

"""Logistic regression classifier.

Note that this implementation of Logistic Regression
Expand Down
1 change: 0 additions & 1 deletion mlxtend/classifier/multilayerperceptron.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
class MultiLayerPerceptron(
_BaseModel, _IterativeModel, _MultiClass, _MultiLayer, _Classifier
):

"""Multi-layer perceptron classifier with logistic sigmoid activations

Parameters
Expand Down
1 change: 0 additions & 1 deletion mlxtend/classifier/oner.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


class OneRClassifier(BaseEstimator, ClassifierMixin):

"""OneR (One Rule) Classifier.

Parameters
Expand Down
1 change: 0 additions & 1 deletion mlxtend/classifier/perceptron.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


class Perceptron(_BaseModel, _IterativeModel, _Classifier):

"""Perceptron classifier.

Note that this implementation of the Perceptron expects binary class labels
Expand Down
1 change: 0 additions & 1 deletion mlxtend/classifier/softmax_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@


class SoftmaxRegression(_BaseModel, _IterativeModel, _Classifier, _MultiClass):

"""Softmax regression classifier.

Parameters
Expand Down
1 change: 0 additions & 1 deletion mlxtend/classifier/stacking_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


class StackingClassifier(_BaseXComposition, _BaseStackingClassifier, TransformerMixin):

"""A Stacking classifier for scikit-learn estimators for classification.

Parameters
Expand Down
1 change: 0 additions & 1 deletion mlxtend/classifier/stacking_cv_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
class StackingCVClassifier(
_BaseXComposition, _BaseStackingClassifier, TransformerMixin
):

"""A 'Stacking Cross-Validation' classifier for scikit-learn estimators.

New in mlxtend v0.4.3
Expand Down
7 changes: 6 additions & 1 deletion mlxtend/evaluate/tests/test_bias_variance_decomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ def test_mse_bagging():
APPVEYOR = False


@pytest.mark.skipif(TRAVIS or APPVEYOR, reason="TensorFlow dependency")
GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS_CI", "false").lower() == "true"


@pytest.mark.skipif(
TRAVIS or APPVEYOR or GITHUB_ACTIONS, reason="TensorFlow dependency"
)
def test_keras():
import tensorflow as tf

Expand Down
7 changes: 6 additions & 1 deletion mlxtend/evaluate/tests/test_bootstrap_point632.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ def test_scoring_proba():
APPVEYOR = False


@pytest.mark.skipif(TRAVIS or APPVEYOR, reason="TensorFlow dependency")
GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS_CI", "false").lower() == "true"


@pytest.mark.skipif(
TRAVIS or APPVEYOR or GITHUB_ACTIONS, reason="TensorFlow dependency"
)
def test_keras_fitparams():
import tensorflow as tf

Expand Down
1 change: 0 additions & 1 deletion mlxtend/externals/pyprind/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
PyPI: https://pypi.python.org/pypi/PyPrind
"""


from .generator_factory import prog_bar, prog_percent
from .progbar import ProgBar
from .progpercent import ProgPercent
Expand Down
1 change: 0 additions & 1 deletion mlxtend/externals/pyprind/prog_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
PyPI: https://pypi.python.org/pypi/PyPrind
"""


import os
import sys
import time
Expand Down
1 change: 0 additions & 1 deletion mlxtend/externals/pyprind/progbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
PyPI: https://pypi.python.org/pypi/PyPrind
"""


import time
from math import floor

Expand Down
1 change: 0 additions & 1 deletion mlxtend/feature_selection/exhaustive_feature_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


class ExhaustiveFeatureSelector(BaseEstimator, MetaEstimatorMixin):

"""Exhaustive Feature Selection for Classification and Regression.
(new in v0.4.3)

Expand Down
1 change: 0 additions & 1 deletion mlxtend/feature_selection/sequential_feature_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


class SequentialFeatureSelector(_BaseXComposition, MetaEstimatorMixin):

"""Sequential Feature Selection for Classification and Regression.

Parameters
Expand Down
8 changes: 5 additions & 3 deletions mlxtend/plotting/plot_confusion_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,11 @@ def plot_confusion_matrix(
s=cell_text,
va="center",
ha="center",
color="white"
if conf_mat[i, j] > np.max(conf_mat) * fontcolor_threshold
else "black",
color=(
"white"
if conf_mat[i, j] > np.max(conf_mat) * fontcolor_threshold
else "black"
),
)
if class_names is not None:
tick_marks = np.arange(len(class_names))
Expand Down
1 change: 0 additions & 1 deletion mlxtend/preprocessing/mean_centering.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class MeanCenterer(object):

"""Column centering of vectors and matrices.

Attributes
Expand Down
1 change: 0 additions & 1 deletion mlxtend/regressor/linear_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


class LinearRegression(_BaseModel, _IterativeModel, _Regressor):

"""Ordinary least squares linear regression.

Parameters
Expand Down
1 change: 0 additions & 1 deletion mlxtend/regressor/stacking_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class StackingRegressor(_BaseXComposition, RegressorMixin, TransformerMixin):

"""A Stacking regressor for scikit-learn estimators for regression.

Parameters
Expand Down
1 change: 0 additions & 1 deletion mlxtend/utils/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class Counter(object):

"""Class to display the progress of for-loop iterators.

Parameters
Expand Down
Loading