Skip to content

chore(agentic-ci): declare numpy as direct dep of data-designer-engine#676

Merged
andreatgretel merged 4 commits into
mainfrom
agentic-ci/chore/dependencies-20260519-engine-numpy
May 20, 2026
Merged

chore(agentic-ci): declare numpy as direct dep of data-designer-engine#676
andreatgretel merged 4 commits into
mainfrom
agentic-ci/chore/dependencies-20260519-engine-numpy

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

Declare numpy as a direct dependency of data-designer-engine.

Why

Per AGENTS.md and the dependencies-suite audit (2026-05-19): the
engine imports numpy directly but only data-designer-config
declared it. Engine relied on transitive resolution via the config
package, which works for the monorepo install but is fragile if
data-designer-engine is ever installed standalone, and it bypasses
the "each package declares what it directly imports" contract.

Direct imports detected:

  • packages/data-designer-engine/src/data_designer/engine/sampling_gen/constraints.py
    (from numpy.typing import NDArray at module import time, plus
    import numpy as np under TYPE_CHECKING)
  • packages/data-designer-engine/src/data_designer/engine/sampling_gen/data_sources/base.py
    (TYPE_CHECKING-guarded import numpy as np and
    from numpy.typing import NDArray)

(Audit also flagged additional engine modules using numpy via the
lazy-import system — those will be covered by their own findings if
present; this PR only adds the missing declaration.)

What changed

A single line — "numpy>=1.23.5,<3", — added to the
[tool.hatch.metadata.hooks.uv-dynamic-versioning].dependencies list
in packages/data-designer-engine/pyproject.toml, in alphabetical
position between networkx and python-multipart. The specifier is
copied verbatim from packages/data-designer-config/pyproject.toml
where numpy>=1.23.5,<3 is already declared, so no version-range
reconciliation is required.

Tests

  • make install-dev resolved the lockfile cleanly (only the engine's
    own version metadata changed in uv.lock).
  • make test-engine — 2055 passed in 34.91s.

Provenance

Generated by the agentic-ci dependencies suite (daily run,
2026-05-19). Finding id b10e09fc453c, fix confidence 0.85, severity
high (heavy import bypassing the declared-deps contract).

…r-engine

The engine package imports numpy directly (e.g. `from numpy.typing import
NDArray` in `sampling_gen/constraints.py`) but only declared it
transitively via `data-designer-config`. Add `numpy>=1.23.5,<3` to the
engine's own `[project.dependencies]`, matching the specifier already
used by the config package. No runtime behavior changes.
@github-actions github-actions Bot requested a review from a team as a code owner May 19, 2026 09:27
@github-actions github-actions Bot added agentic-ci Created by agentic-ci automation agentic-ci/dependencies Agentic CI - dependencies suite labels May 19, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR promotes numpy from an implicit transitive dependency (inherited via data-designer-config) to an explicit direct dependency of data-designer-engine. The version specifier >=1.23.5,<3 is identical to the one already declared in data-designer-config, so no version-range conflict is introduced.

  • Adds a single line "numpy>=1.23.5,<3" to the engine's pyproject.toml dependency list, inserted in correct alphabetical order between networkx and python-multipart.
  • Addresses the "each package declares what it directly imports" contract, ensuring the engine can be installed standalone without relying on numpy flowing in through the config package.

Confidence Score: 5/5

Single-line dependency declaration change with no runtime logic touched — safe to merge.

The change adds one dependency line whose version specifier exactly matches the already-validated constraint in a sibling package, and it was confirmed to resolve cleanly against the lockfile. No code paths, interfaces, or behaviours are altered.

No files require special attention.

Important Files Changed

Filename Overview
packages/data-designer-engine/pyproject.toml Adds numpy>=1.23.5,<3 as a direct dependency, matching the version specifier already used in data-designer-config, correctly placed in alphabetical order.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[data-designer-engine] -->|direct dep - NEW| N[numpy >=1.23.5,<3]
    A -->|direct dep| C[data-designer-config]
    C -->|direct dep - existing| N
    A -->|direct dep| SC[scipy]
    A -->|direct dep| NX[networkx]
Loading

Reviews (4): Last reviewed commit: "Merge branch 'main' into agentic-ci/chor..." | Re-trigger Greptile

@andreatgretel
Copy link
Copy Markdown
Contributor

/authorize-agentic-ci

@andreatgretel andreatgretel merged commit aa69207 into main May 20, 2026
50 checks passed
@andreatgretel andreatgretel deleted the agentic-ci/chore/dependencies-20260519-engine-numpy branch May 20, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentic-ci/dependencies Agentic CI - dependencies suite agentic-ci Created by agentic-ci automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant