semvec/pypi-packages huggingface dataset:
adaptive-tests-py 0.2.5
Adaptive test discovery for Python projects
License: MIT
Requires Python: >=3.8

# 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

```bash
pip install adaptive-tests-py
```

## Usage

```python
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:

```bash
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.
solshade 0.1.0
Terrain-aware solar illumination modeling using DEMs and orbital sun geometry.
License: MIT
Requires Python: >=3.13
Keywords: DEM, GIS, geospatial, illumination, solar, terrain

![](https://github.com/user-attachments/assets/69bef1b9-10b1-44d9-9bf0-46eac1fda3ce)
---
`solshade` is a Python toolkit for simulating solar radiation across landscapes, accounting for terrain shadows, solar angles, and orbital geometry. It’s designed for interdisciplinary research at the intersection of astronomy, glaciology, botany, and geology.

---

## What does `solshade` do?

- Computes per-pixel solar exposure over time from a DEM
- Generates terrain-aware **horizon maps** to determine shadowing
- Uses precise **solar ephemerides** (via Skyfield)
- Calculates:
  - Total annual insolation
  - Date of maximum sunlight
  - Mean solar incidence angle
  - Terrain shading based on real orbital paths

---

## Example Applications

- Modeling plant growing seasons across topography
- Studying microhabitats in extreme environments
- Predicting snowmelt timing in complex terrain
- Understanding glacial melt and shadowed regions

---

## Project Status

This project is in early development.  
Expect breaking changes, experiments, and rapid iteration.

---

## License

MIT License — see `LICENSE` file.

---

## Acknowledgments

Inspired by many interesting conversations with Anna O'Flynn, Anthony Zerafa & Chris Omelon at the McGill Arctic Research Station (MARS) on Axel Heiberg Island, 2025.