Skip to content

Commit 82d6ab2

Browse files
committed
Reduce core dependencies, split in optional dependencies
1 parent 9240813 commit 82d6ab2

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ To install our latest pre-release (3.0.0 alpha), run:
3939
``` bash
4040
pip install -U --pre mesa
4141
```
42+
With Mesa 3.0, we don't install all our dependencies anymore by default.
43+
```bash
44+
# You can customize the additional dependencies you need, if you want. Available are:
45+
pip install -U --pre mesa[network,viz]
46+
47+
# This is equivalent to our recommended dependencies:
48+
pip install -U --pre mesa[rec]
49+
50+
# To install all, including developer, dependencies:
51+
pip install -U --pre mesa[all]
52+
```
4253

4354
You can also use `pip` to install the latest GitHub version:
4455

pyproject.toml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,36 +36,45 @@ classifiers = [
3636
]
3737
readme = "README.md"
3838
dependencies = [
39-
"click",
40-
"cookiecutter",
41-
"matplotlib",
42-
"networkx",
4339
"numpy",
4440
"pandas",
45-
"solara",
4641
"tqdm",
4742
]
4843
dynamic = ["version"]
4944

5045
[project.optional-dependencies]
46+
# User collections
47+
rec = ["mesa[network,viz]"]
48+
all = ["mesa[network,viz,dev,examples,docs]"]
49+
# Core dependencies
50+
network = [
51+
"networkx",
52+
]
53+
viz = [
54+
"matplotlib",
55+
"solara",
56+
]
57+
# Dev and CI stuff
5158
dev = [
52-
"ruff~=0.1.1", # Update periodically
53-
"pytest >= 4.6",
59+
"mesa[rec]",
60+
"ruff",
61+
"pytest",
5462
"pytest-cov",
5563
"sphinx",
5664
"pytest-mock",
5765
]
5866
examples = [
59-
"pytest >= 4.6",
60-
"scipy"
67+
"mesa[rec]",
68+
"pytest",
69+
"scipy",
6170
]
6271
docs = [
6372
"sphinx",
6473
"ipython",
6574
"pydata_sphinx_theme",
6675
"seaborn",
6776
"myst-nb",
68-
"myst-parser", # Markdown in Sphinx
77+
"myst-parser", # Markdown in Sphinx
6978
]
7079

7180
[project.urls]

0 commit comments

Comments
 (0)