Catalog PyPI
PACKAGE EXPLORERView in registry

adaptive-tests-py

PyPI

Adaptive test discovery for Python projects

Versions collected1
Direct dependencies2From release 0.2.5
Last observed20 Oct, 19:08 UTC

README

Version 0.2.5 documentation

adaptive-tests-py

Python port of the adaptive discovery engine. It mirrors the JavaScript API so polyglot teams can keep their testing strategy consistent across stacks while preserving the zero-runtime guarantees of static analysis.

Installation

pip install adaptive-tests-py

Usage

from adaptive_tests_py import DiscoveryEngine, Signature

engine = DiscoveryEngine(root=".")
result = engine.discover(
    Signature(name="TodoService", methods=["add", "complete", "list"]),
    load=False,
)

print(result.module, result.methods)
TodoService = result.load()  # module imported on demand
service = TodoService()
service.add("Ship adaptive tests")

Use engine.discover_all(signature) to inspect every ranked match when tuning signatures or debugging coverage. The engine now mirrors the JavaScript implementation more closely:

  • Configurable scoring – drop an adaptive-tests.config.json (or pass inline overrides) to tweak path/file/method weighting.
  • Persistent cache – results are stored in .adaptive-tests-cache.json and re-used on future runs when the target file is unchanged.
  • Lens explanations – call engine.explain(signature) to retrieve top candidates with per-factor score breakdowns.

CLI

The package ships with a lightweight CLI so you can run discovery diagnostics and scaffold pytest stubs without writing code:

adaptive-tests-py why '{"name": "TodoService"}' --root examples/python/src --limit 3
adaptive-tests-py why signature.json --json
adaptive-tests-py discover '{"name": "TodoService"}' --root .
adaptive-tests-py scaffold src/services/user_service.py --tests-dir tests/adaptive

Use --no-cache for a fresh scan and --config path/to/config.json to supply overrides ad-hoc.

Configuration can also be placed in pyproject.toml under the [tool.adaptive_tests] table to match modern Python tooling conventions.

Python Example Project

See examples/python/ for a full pytest demo, custom configuration, and advanced signatures.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.520 Sept 20252

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
anon57396/adaptive-tests

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:08 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:b64563c9062d4cea751f4568df56f0cb220a20f3b224febd8e8d1f117b19f270