mpfaffenberger / mpfaffenberger/code_puppy
pyproject.toml: invalid [project] dev-dependencies key duplicates [dependency-groups], redundant bedrock extra, JSON data shipped twice in wheel
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 814
- Forks
- 278
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 76
Description
Problem
pyproject.toml:33-39 declares dev dependencies under [project] dev-dependencies:
dependencies = [
...
]
dev-dependencies = [
"pytest>=8.3.4",
"pytest-cov>=6.1.1",
"pytest-asyncio>=0.23.1",
"ruff>=0.11.11",
"pexpect>=4.9.0",
]
dev-dependencies is not a valid PEP 621 [project] key. Hatchling tolerates unknown keys today, but strict PEP 621 validators (and future build backends) will reject it. The same five packages are correctly declared again under [dependency-groups] dev (lines 105-112) — so the [project] block is a dead duplicate that must be kept in sync by hand (it's the legacy uv location that predates PEP 735).
Two adjacent packaging nits:
[project.optional-dependencies] bedrock = ["boto3>=1.35.0"]is redundant —boto3>=1.43.9is already an unconditional runtime dependency (line 31), sopip install code-puppy[bedrock]adds nothing. Either drop boto3 from core deps (preferred — it's heavy and only needed for Bedrock) or remove the extra.[tool.hatch.build.targets.wheel.shared-data]mapscode_puppy/models.jsonandmodels_dev_api.jsoninto wheel shared-data (i.e., installed undersys.prefix/data), but the package directory is already included viapackages = ["code_puppy"], which ships those files inside the package. Shipping the 535 KBmodels_dev_api.jsontwice bloats the wheel.
Suggested fix
-dev-dependencies = [
- "pytest>=8.3.4",
- "pytest-cov>=6.1.1",
- "pytest-asyncio>=0.23.1",
- "ruff>=0.11.11",
- "pexpect>=4.9.0",
-]
Keep only [dependency-groups] dev. Then decide one canonical home for the JSON data files (package data, since code_puppy.model_factory reads them relative to __file__) and delete the shared-data mapping.
Filed by Zen Reviewer C (code-puppy-60635a)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect pyproject.toml lines 33-39, the [dependency-groups] section, the bedrock extra, and the wheel shared-data mapping. Check code_puppy.model_factory's relative data lookup, then build a wheel to verify the PEP 621 configuration and that the JSON files are included only once.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100