Skip to content

Commit e48cba3

Browse files
committed
restructure to use toml for build
1 parent 589073b commit e48cba3

30 files changed

+105
-31
lines changed

README.md

+7-12
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,23 @@ or
2525
conda install -c conda-forge gglasso
2626

2727

28-
### Install from source
28+
### Developer installation
2929

30-
Alternatively, you can install the package from source using the following commands:
30+
If you want to create a conda environment with full development dependencies (for building docs, testing,...), run:
3131

32-
git clone https://github.com/fabian-sp/GGLasso.git
33-
pip install -r requirements.txt
34-
python setup.py
32+
conda env create -f environment.yml
3533

36-
Test your installation with
34+
To install `gglasso` in developer mode run
3735

38-
pytest gglasso/ -v
36+
python -m pip install --editable .
3937

4038

41-
### Advanced options
39+
Test your installation with
4240

43-
If you want to create a conda environment with full development dependencies (for building docs, testing etc), run:
41+
pytest tests/ -v
4442

45-
conda env create -f environment.yml
4643

47-
If you wish to install `gglasso` in developer mode, i.e. not having to reinstall `gglasso` everytime the source code changes (either by remote or local changes), run
4844

49-
python setup.py clean --all develop clean --all
5045

5146
## The `glasso_problem` class
5247

environment.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
name: gglasso_env
22

33
dependencies:
4-
- python>=3.8
5-
- numpy>=1.19.2
6-
- numba>=0.53.1
4+
- python>=3.9
5+
- numpy>=1.19.2, <2.0.0
6+
- numba>=0.53.1, <0.60.0
77
- scipy>=0.11.0
88
- scikit-learn>=0.24.1
99
- pandas
1010
- matplotlib
1111
- seaborn
1212
- networkx
13-
- decorator==4.4.2
14-
- sphinx==3.5.4
13+
- sphinx
1514
- pytest
1615
- pip
1716
- pip:
1817
- regain
1918
- scikit-fda
20-
- sphinx-gallery==0.8.2
21-
- sphinx_rtd_theme==0.5.2
22-
- fdasrsf==2.3.11
23-
19+
- sphinx-gallery
20+
- sphinx_rtd_theme

pyproject.toml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
###############################################################################
6+
# Main library #
7+
###############################################################################
8+
9+
[project]
10+
name = "gglasso"
11+
dynamic = ["version"]
12+
description = 'Algorithms for Single and Multiple Graphical Lasso problems.'
13+
readme = "README.md"
14+
requires-python = ">=3.9"
15+
license = "MIT"
16+
keywords = ["network inference",
17+
"graphcial models",
18+
"graphical lasso",
19+
"optimization"]
20+
authors = [
21+
{name = "Fabian Schaipp", email = "[email protected]" },
22+
{name = "Oleg Vlasovets", email = ""},
23+
{name = "Christian L. Müller", email = ""},
24+
]
25+
classifiers = [
26+
"Development Status :: 5 - Production/Stable",
27+
"License :: OSI Approved :: MIT License",
28+
"Programming Language :: Python",
29+
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
33+
"Programming Language :: Python :: Implementation :: CPython",
34+
"Programming Language :: Python :: Implementation :: PyPy",
35+
]
36+
dependencies = [
37+
"numpy>=1.17.3",
38+
"scipy>=0.11.0",
39+
"scikit-learn>=0.24.1",
40+
"numba>=0.46.0",
41+
"pandas",
42+
"matplotlib",
43+
"seaborn",
44+
"networkx",
45+
]
46+
47+
[project.urls]
48+
Documentation = "https://gglasso.readthedocs.io/en/stable/"
49+
Issues = "https://github.com/fabian-sp/GGLasso/issues"
50+
Source = "https://github.com/fabian-sp/GGLasso"
51+
52+
[tool.hatch.version]
53+
path = "src/gglasso/__init__.py"
54+
55+
[[tool.hatch.envs.all.matrix]]
56+
python = ["3.9", "3.10", "3.11", "3.12"]
57+
58+
# The minimum Python version that should be supported
59+
target-version = "py39"
60+
61+
[tool.hatch.build.targets.wheel]
62+
packages = ["src/gglasso"]
63+
64+
###############################################################################
65+
# Development dependencies #
66+
###############################################################################
67+
68+
# See: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml
69+
[project.optional-dependencies]
70+
tests = ["pytest", "pytest-cov"]
71+
docs = [
72+
"sphinx",
73+
"sphinx-gallery",
74+
"sphinx_rtd_theme",
75+
]
76+
examples = [
77+
"regain",
78+
"scikit-fda",
79+
]

readthedocs-requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ sphinx
44
sphinx-gallery
55
sphinx_rtd_theme
66

7-
scikit-fda
7+
scikit-fda
8+
regain

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ pandas
66
matplotlib
77
seaborn
88
networkx
9-
regain

setup.py

+11-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
URL = 'https://github.com/fabian-sp/GGLasso'
1111
1212
AUTHOR = 'Fabian Schaipp'
13-
REQUIRES_PYTHON = '>=3.7.0'
13+
REQUIRES_PYTHON = '>=3.9.0'
1414
VERSION = gglasso.__version__
1515

1616

1717
# What packages are required for this module to be executed?
1818
REQUIRED = [
1919
"numpy>=1.17.3", "scipy>=0.11.0", "scikit-learn>=0.24.1", "numba>=0.46.0", "pandas",
20-
"matplotlib", "seaborn", "networkx", "regain"]
20+
"matplotlib", "seaborn", "networkx"]
2121

2222
# What packages are optional?
2323
EXTRAS = {
@@ -27,6 +27,10 @@
2727
"sphinx-gallery",
2828
"sphinx_rtd_theme",
2929
],
30+
"examples": [
31+
"regain",
32+
"scikit-fda",
33+
]
3034
}
3135

3236
here = os.path.abspath(os.path.dirname(__file__))
@@ -42,13 +46,12 @@
4246

4347
CLASSIFIERS = """\
4448
Development Status :: 5 - Production/Stable
45-
Intended Audience :: Science/Research
46-
Intended Audience :: Developers
47-
License :: OSI Approved
49+
License :: OSI Approved :: MIT License
4850
Programming Language :: Python
49-
Programming Language :: Python :: 3
50-
Topic :: Software Development
51-
Operating System :: Unix
51+
Programming Language :: Python :: 3.9
52+
Programming Language :: Python :: 3.10
53+
Programming Language :: Python :: 3.11
54+
Programming Language :: Python :: 3.12
5255
"""
5356

5457

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)