Skip to content

Commit 3a68be8

Browse files
coketasteclaude
andauthored
chore: consolidate all optional deps into default dependencies (#146)
* chore: consolidate all optional deps into default dependencies Move dev, kubernetes, and all optional dependency groups into the main dependencies list and remove [project.optional-dependencies]. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * fix: update stale extras references and pin pytest lower bound Follow-up to the optional-deps consolidation: remove now-invalid madengine[dev]/[all]/[kubernetes] install commands from docs and runtime messages, and pin pytest>=7.0 to match minversion. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com> * docs(changelog): add v2.1.1 entries for dep consolidation and pytest pin Co-Authored-By: Claude Opus 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
1 parent 12b3d5d commit 3a68be8

8 files changed

Lines changed: 35 additions & 66 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [2.1.1] - 2026-06-02
1111

12+
### Changed
13+
14+
- **All dependencies are now included by default**: Kubernetes support (`kubernetes>=28.0.0`) and development tools (`pytest>=7.0`, `black`, `mypy`, `isort`, `pre-commit`, etc.) are bundled into the base `dependencies` list. The `[kubernetes]`, `[dev]`, and `[all]` extras have been removed — a plain `pip install madengine` or `pip install -e .` installs everything. All documentation and in-package install guidance has been updated accordingly.
15+
16+
- **`pytest` lower bound pinned to `>=7.0`**: Aligns the dependency pin with `minversion = "7.0"` already declared in `[tool.pytest.ini_options]`, preventing accidental resolution of older pytest versions that cannot run this project's tests.
17+
1218
### Fixed
1319

1420
- **`tools/` build context path corrected**: `docker build` now resolves the shared tools directory as `./tools` (project root) instead of `./scripts/common/tools`. The previous path was stale — `scripts/common/tools` is a temporary directory populated at runtime by `madengine run`, so it was absent during standalone `madengine build` invocations, silently omitting the `--build-context tools=…` flag and breaking Dockerfiles that rely on it via `COPY --from=tools`.

CLAUDE.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
55
## Development Setup
66

77
```bash
8-
# Install in development mode with all dependencies
9-
pip install -e ".[dev]"
10-
11-
# Optional: install Kubernetes support
12-
pip install -e ".[all]"
8+
# Install in development mode (all dependencies, including Kubernetes
9+
# support and dev tools, are included by default)
10+
pip install -e .
1311

1412
# Setup pre-commit hooks
1513
pre-commit install

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -552,15 +552,12 @@ See [CLI Reference](docs/cli-reference.md) for complete options.
552552
## 📦 Installation
553553

554554
```bash
555-
# Basic installation
555+
# Install madengine (all dependencies, including Kubernetes support, are included)
556556
pip install git+https://github.com/ROCm/madengine.git
557557

558-
# With Kubernetes support
559-
pip install "madengine[kubernetes] @ git+https://github.com/ROCm/madengine.git"
560-
561558
# Development installation
562559
git clone https://github.com/ROCm/madengine.git
563-
cd madengine && pip install -e ".[dev]"
560+
cd madengine && pip install -e .
564561
```
565562

566563
See [Installation Guide](docs/installation.md) for detailed instructions.
@@ -638,7 +635,7 @@ We welcome contributions! See [Contributing Guide](docs/contributing.md) for det
638635
git clone https://github.com/ROCm/madengine.git
639636
cd madengine
640637
python3 -m venv venv && source venv/bin/activate
641-
pip install -e ".[dev]"
638+
pip install -e .
642639

643640
# Run all tests
644641
pytest

docs/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ cd madengine
1919
python3 -m venv venv
2020
source venv/bin/activate # On Windows: venv\Scripts\activate
2121

22-
# Install in development mode with all dependencies
23-
pip install -e ".[dev]"
22+
# Install in development mode (all dependencies are included)
23+
pip install -e .
2424

2525
# Setup pre-commit hooks (optional but recommended)
2626
pre-commit install

docs/installation.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,8 @@ Complete installation instructions for madengine.
1414
### From GitHub
1515

1616
```bash
17-
# Basic installation
17+
# Install madengine (all dependencies, including Kubernetes support, are included)
1818
pip install git+https://github.com/ROCm/madengine.git
19-
20-
# With Kubernetes support
21-
pip install "madengine[kubernetes] @ git+https://github.com/ROCm/madengine.git"
22-
23-
# With all optional dependencies
24-
pip install "madengine[all] @ git+https://github.com/ROCm/madengine.git"
2519
```
2620

2721
### Development Installation
@@ -35,20 +29,16 @@ cd madengine
3529
python3 -m venv venv
3630
source venv/bin/activate # On Windows: venv\Scripts\activate
3731

38-
# Install in editable mode with dev dependencies
39-
pip install -e ".[dev]"
32+
# Install in editable mode (dev dependencies are included)
33+
pip install -e .
4034

4135
# Setup pre-commit hooks (optional, for contributors)
4236
pre-commit install
4337
```
4438

45-
## Optional Dependencies
39+
## Dependencies
4640

47-
| Extra | Install Command | Use Case |
48-
|-------|----------------|----------|
49-
| `kubernetes` | `pip install madengine[kubernetes]` | Kubernetes deployment support |
50-
| `dev` | `pip install madengine[dev]` | Development tools (pytest, black, mypy, etc.) |
51-
| `all` | `pip install madengine[all]` | All optional dependencies |
41+
All dependencies — including Kubernetes deployment support and development tools (pytest, black, mypy, etc.) — are installed by default. There are no optional extras to select.
5242

5343
**Note**: SLURM deployment requires no additional Python dependencies (uses CLI commands).
5444

pyproject.toml

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ dependencies = [
2626
"click>=8.0.0",
2727
"jinja2>=3.0.0",
2828
"pyyaml>=6.0",
29+
"kubernetes>=28.0.0",
30+
"pytest>=7.0",
31+
"pytest-cov",
32+
"pytest-xdist",
33+
"pytest-timeout",
34+
"pytest-mock",
35+
"pytest-asyncio",
36+
"black>=21.0.0",
37+
"flake8",
38+
"mypy>=0.910",
39+
"isort",
40+
"pre-commit",
2941
]
3042
classifiers = [
3143
"Programming Language :: Python :: 3",
@@ -40,40 +52,6 @@ madengine = "madengine.cli.app:cli_main"
4052
Homepage = "https://github.com/ROCm/madengine"
4153
Issues = "https://github.com/ROCm/madengine/issues"
4254

43-
[project.optional-dependencies]
44-
dev = [
45-
"pytest",
46-
"pytest-cov",
47-
"pytest-xdist",
48-
"pytest-timeout",
49-
"pytest-mock",
50-
"pytest-asyncio",
51-
"black>=21.0.0",
52-
"flake8",
53-
"mypy>=0.910",
54-
"isort",
55-
"pre-commit",
56-
]
57-
# Optional dependencies for distributed deployments
58-
# Note: SLURM requires no additional dependencies (uses CLI commands)
59-
kubernetes = [
60-
"kubernetes>=28.0.0",
61-
]
62-
# Complete development environment (dev + kubernetes deployment)
63-
all = [
64-
"kubernetes>=28.0.0",
65-
"pytest",
66-
"pytest-cov",
67-
"pytest-xdist",
68-
"pytest-timeout",
69-
"pytest-mock",
70-
"pytest-asyncio",
71-
"black>=21.0.0",
72-
"flake8",
73-
"mypy>=0.910",
74-
"isort",
75-
"pre-commit",
76-
]
7755

7856
[tool.hatch.build.targets.wheel]
7957
# scripts/ is listed in .gitignore (to exclude external MAD project scripts/ dirs during dev).

src/madengine/deployment/factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def register_default_deployments():
9191
import warnings
9292
warnings.warn(
9393
"Kubernetes deployment target is unavailable: the 'kubernetes' library is not "
94-
"installed. Install it with: pip install madengine[kubernetes] "
95-
"(or pip install madengine[all]).",
94+
"installed. Reinstall madengine (pip install madengine) or install the "
95+
"library directly with: pip install kubernetes.",
9696
UserWarning,
9797
stacklevel=2,
9898
)

src/madengine/deployment/kubernetes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ def __init__(self, config: DeploymentConfig):
132132
if not KUBERNETES_AVAILABLE:
133133
raise ImportError(
134134
"Kubernetes Python library not installed.\n"
135-
"Install with: pip install madengine[kubernetes]\n"
136-
"Or: pip install kubernetes"
135+
"Reinstall madengine (pip install madengine) or install the "
136+
"library directly with: pip install kubernetes"
137137
)
138138

139139
if not YAML_AVAILABLE:

0 commit comments

Comments
 (0)