Skip to content

Commit

Permalink
Update build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
krisstern committed Jul 16, 2023
1 parent aa1c77a commit 1049c67
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
18 changes: 14 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

``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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[tool.black]
line-length = 79
target-version = ['py36', 'py37', 'py38']
target-version = ['py36', 'py37', 'py38', 'py39']
include = '\.pyi?$'
exclude = '''
/(
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ sphinx_rtd_theme
sphinx_gallery
matplotlib
numpydoc
build
6 changes: 5 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ classifiers =
[options]
packages = find:
package_dir =
=src
= src
include_package_data = True
install_requires =
numpy
scikit-learn

[options.packages.find]
where = src

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
18 changes: 13 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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="[email protected]",
url="https://group-lasso.readthedocs.io/en/latest/",
packages=find_packages(
where="src",
include=["group_lasso*"]
),
package_dir={"": "src"},
include_package_data=True
)

0 comments on commit 1049c67

Please sign in to comment.