mpfaffenberger / mpfaffenberger/code_puppy

pyproject.toml: invalid [project] dev-dependencies key duplicates [dependency-groups], redundant bedrock extra, JSON data shipped twice in wheel

Open Beginner friendly
#424 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. [project.optional-dependencies] bedrock = ["boto3>=1.35.0"] is redundant — boto3>=1.43.9 is already an unconditional runtime dependency (line 31), so pip 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.
  2. [tool.hatch.build.targets.wheel.shared-data] maps code_puppy/models.json and models_dev_api.json into wheel shared-data (i.e., installed under sys.prefix/data), but the package directory is already included via packages = ["code_puppy"], which ships those files inside the package. Shipping the 535 KB models_dev_api.json twice 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.