diff --git a/HISTORY.md b/HISTORY.md index 2ab4273..767f8c4 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,11 @@ History --- +# 0.3.2 (2024-03-25) + +- Major import bug fix +- Cleanup + # 0.3.1 (2024-03-03) - Minor cleanups diff --git a/MANIFEST.in b/MANIFEST.in index 862b86c..88c7375 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,7 +4,6 @@ include HISTORY.md include LICENSE include README.md include requirements.txt -include requirements_dev.txt recursive-include tests * recursive-exclude * __pycache__ diff --git a/README.md b/README.md index d768855..2acbec5 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,6 @@ To use Lazy Predict in a project: ## Classification ``` - # Old Way - from lazypredict.Supervised import LazyClassifier - # New Way from lazypredict import LazyClassifier from sklearn.datasets import load_breast_cancer @@ -81,9 +78,6 @@ To use Lazy Predict in a project: ## Regression ``` - # Original Way - from lazypredict.Supervised import LazyRegressor - # Alternate Way from lazypredict import LazyRegressor from sklearn import datasets diff --git a/lazypredict/__init__.py b/lazypredict/__init__.py index 1f390a2..599c86c 100644 --- a/lazypredict/__init__.py +++ b/lazypredict/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from Supervised import LazyClassifier, LazyRegressor +from .supervised import LazyClassifier, LazyRegressor __all__ = [ LazyClassifier, diff --git a/lazypredict/cli.py b/lazypredict/cli.py deleted file mode 100644 index d198215..0000000 --- a/lazypredict/cli.py +++ /dev/null @@ -1,17 +0,0 @@ -# -*- coding: utf-8 -*- - -"""Console script for lazypredict.""" -import sys -import click - - -@click.command() -def main(args=None): - """Console script for lazypredict.""" - click.echo("Replace this message by putting your code into " "lazypredict.cli.main") - click.echo("See click documentation at https://click.palletsprojects.com/") - return 0 - - -if __name__ == "__main__": - sys.exit(main()) # pragma: no cover diff --git a/lazypredict/Supervised.py b/lazypredict/supervised.py similarity index 99% rename from lazypredict/Supervised.py rename to lazypredict/supervised.py index af2780d..8c36d01 100644 --- a/lazypredict/Supervised.py +++ b/lazypredict/supervised.py @@ -101,8 +101,6 @@ # Helper function - - def get_card_split(df, cols, n=11): """ Splits categorical columns into 2 lists based on cardinality (i.e # of unique values) @@ -680,7 +678,3 @@ def provide_models(self, X_train, X_test, y_train, y_test): self.fit(X_train, X_test, y_train, y_test) return self.models - - -Regression = LazyRegressor -Classification = LazyClassifier diff --git a/setup.cfg b/setup.cfg index b114645..8ef06b9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.1 +current_version = 0.3.2 commit = True tag = True diff --git a/setup.py b/setup.py index dbcfa00..420f1bf 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,6 @@ ], description="[Updated] Lazy Predict help build a lot of basic models without much code and helps understand which models works better without any parameter tuning", long_description_content_type="text/markdown", - entry_points={"console_scripts": ["lazypredict=lazypredict.cli:main",],}, install_requires=requirements, license="MIT license", long_description=readme + "\n\n" + history, @@ -51,6 +50,6 @@ setup_requires=setup_requirements, test_suite="tests", url="https://github.com/nityansuman/lazypredict-nightly", - version="0.3.1", + version="0.3.2", zip_safe=False ) diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index 35cad56..0000000 --- a/tests/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# -*- coding: utf-8 -*- - -"""Unit test package for lazypredict.""" diff --git a/tests/placeholder b/tests/placeholder new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_lazypredict.py b/tests/test_lazypredict.py deleted file mode 100644 index 2ae91ff..0000000 --- a/tests/test_lazypredict.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -"""Tests for `lazypredict` package.""" - -import pytest - -from click.testing import CliRunner - -from lazypredict import cli - - -@pytest.fixture -def response(): - """Sample pytest fixture. - - See more at: http://doc.pytest.org/en/latest/fixture.html - """ - # import requests - # return requests.get('https://github.com/audreyr/cookiecutter-pypackage') - - -def test_content(response): - """Sample pytest test function with the pytest fixture as an argument.""" - # from bs4 import BeautifulSoup - # assert 'GitHub' in BeautifulSoup(response.content).title.string - - -def test_command_line_interface(): - """Test the CLI.""" - runner = CliRunner() - result = runner.invoke(cli.main) - assert result.exit_code == 0 - assert "lazypredict.cli.main" in result.output - help_result = runner.invoke(cli.main, ["--help"]) - assert help_result.exit_code == 0 - assert "--help Show this message and exit." in help_result.output diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 31c25b9..0000000 --- a/tox.ini +++ /dev/null @@ -1,28 +0,0 @@ -[tox] -envlist = py36, py37, py38, py39 flake8 - -[travis] -python = - 3.10: py310 - 3.9: py39 - 3.8: py38 - 3.7: py37 - 3.6: py36 - -[testenv:flake8] -basepython = python -deps = flake8 -commands = flake8 lazypredict - -[testenv] -setenv = - PYTHONPATH = {toxinidir} -deps = - -r{toxinidir}/requirements_dev.txt -; If you want to make tox run the tests with the same versions, create a -; requirements.txt with the pinned versions and uncomment the following line: -; -r{toxinidir}/requirements.txt -commands = - pip install -U pip - pytest --basetemp={envtmpdir} -