diff --git a/README.rst b/README.rst index 085fdfd..a20ec5b 100644 --- a/README.rst +++ b/README.rst @@ -33,7 +33,7 @@ only a sparse set of these covariate groups have non-zero components. There are several reasons for why this might be a good idea. Say for example that we have a set of sensors and each of these sensors generate five -measurements. We don't want to maintain an unneccesary number of sensors. +measurements. We don't want to maintain an unnecessary number of sensors. If we try normal LASSO regression, then we will get sparse components. However, these sparse components might not correspond to a sparse set of sensors, since they each generate five measurements. If we instead use group @@ -60,12 +60,22 @@ To install group-lasso via ``pip``, simply run the command:: pip install group-lasso -Alternatively, you can manually pull this repository and run the -``setup.py`` file:: +Alternatively, you can manually pull this repository and run the following commands on macOS/Unix:: git clone https://github.com/yngvem/group-lasso.git cd group-lasso - python setup.py + python3 -m build + +On Windows run the following equivalent commands in PowerShell instead:: + + git clone https://github.com/yngvem/group-lasso.git + cd group-lasso + py -m build (Windows) + +``setuptools`` allows you to modify your source code and have the changes taking effect without you having to rebuild and reinstall. +To install a package without copying any files to your interpreter directory, run at the root:: + + pip install --editable . ------------- Documentation diff --git a/pyproject.toml b/pyproject.toml index f8398d6..6136691 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ [tool.black] line-length = 79 -target-version = ['py36', 'py37', 'py38'] +target-version = ['py36', 'py37', 'py38', 'py39'] include = '\.pyi?$' exclude = ''' /( diff --git a/requirements.txt b/requirements.txt index 9b7251e..6aa1c26 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,3 +8,4 @@ sphinx_rtd_theme sphinx_gallery matplotlib numpydoc +build diff --git a/setup.cfg b/setup.cfg index 5208677..fa323e7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ classifiers = [options] packages = find: package_dir = - =src + = src include_package_data = True install_requires = numpy @@ -19,3 +19,7 @@ install_requires = [options.packages.find] where = src + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index dc70452..f0f6676 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,15 @@ from setuptools import find_packages, setup -with open("README.rst") as f: - long_description = f.read() - - -setup() +setup(name="group-lasso", + version="1.5.0", + description="Fast group lasso regularised linear models in a sklearn-style API", + author="Yngve Mardal Moe", + author_email="yngve.m.moe@gmail.com", + url="https://group-lasso.readthedocs.io/en/latest/", + packages=find_packages( + where="src", + include=["group_lasso*"] + ), + package_dir={"": "src"}, + include_package_data=True + )