PYPI PACKAGE AUDIT v0.1.0 Needs Improvement

ypea

Yarpiz Evolutionary Algorithms: define an optimization problem once, solve it with any metaheuristic.

PyPkgScore ypea
Methodology & Criteria ♥ Donate
555 / 1000
Quick Install
pip install ypea
1. Governance
50/200
2. PEP Metadata
200/200
3. Security
200/200
4. Docs & SEO
105/200
5. CI Engineering
0/200
📣 Share Audit: Share this report and visual preview in the current language
Advertisement
PYPI TELEMETRY

Downloads & Community Adoption

Last 30 days (without mirrors)
Last 7 days
305
Last 30 days
305
Total (180 days)
305
Metric / Ecosystem Status / Value Source
Downloads (30d / 180d) — PyPI Stats (without mirrors)
Trusted Publishing (PEP 740) ✓ Verified OIDC PyPI Integrity / Sigstore
Django Packages — djangopackages.org
PyTech / PyPkgScore 555 / 1000 PyPkgScore Engine

Health & Engineering Analysis (5 Pillars)

1. Governance & Community50 / 200 ▾
LICENSE✓ 50 pts
SECURITY.md✕ 0 pts
CONTRIBUTING.md✕ 0 pts
CODE_OF_CONDUCT.md✕ 0 pts
2. PEP Metadata & Packaging200 / 200 ▾
Wheel (.whl)✓ 50 pts
pyproject.toml✓ 50 pts
Project URLs✓ 50 pts
Trove Classifiers✓ 50 pts
3. Security & Supply Chain200 / 200 ▾
Zero CVEs (OSV)✓ 60 pts
Trusted Publishing (OIDC)✓ 50 pts
Snyk / Audit Link✓ 40 pts
HTTPS Repository✓ 50 pts
4. Documentation, SEO & Ecosystem105 / 200 ▾
Structured README✓ 60 pts
Read the Docs✕ 0 pts
Django Packages✕ 0 pts
Website / Technical Articles✓ 45 pts
5. Engineering, CI & Quality0 / 200 ▾
Automated Tests✕ 0 pts
GitHub Actions CI✕ 0 pts
CHANGELOG.md✕ 0 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)✕ 0 pts
Advertisement
README & DOCS

Official Documentation & Usage Guide — ypea

PyPI Metadata v0.1.0
Show full original documentation (English README) ▾

YPEA for Python

Yarpiz Evolutionary Algorithms (YPEA) is a toolbox for defining an optimization problem once and solving it with any of its metaheuristics. This is the Python version of YPEA for MATLAB, redesigned and with the known defects fixed.

Status: early development (0.1.0). The core framework and four algorithms (PSO, DE, GA, SA) work. The other algorithms, benchmark suites, test problems and the experiment runner are being added. See review/2026-11-25-1859-matlab-review/implementation-plan.md for the plan.

Install

YPEA is not on PyPI yet. Install it from a copy of this repository (Python 3.12 or newer):

pip install -e .            # core, needs only NumPy
pip install -e ".[plot]"    # with matplotlib for plots

Once 0.1 is released, pip install ypea will work.

Example

Find 20 real numbers in [-10, 10] that minimize the sphere function:

import ypea

problem = ypea.Problem(
    vars=ypea.Real("x", shape=20, lb=-10, ub=10),
    objective=lambda sol: ypea.benchmarks.sphere(sol.x),
)

pso = ypea.PSO(max_iter=100, pop_size=100, w=0.5, wdamp=1, c1=1, c2=2)
result = pso.solve(problem, seed=42)

print(result.best.solution.x)
print(result.best.obj_value)

Any other algorithm solves the same problem:

de = ypea.DE(strategy="DE/best/2/bin", max_iter=1000, pop_size=20,
             beta_min=0.1, beta_max=0.9, crossover_prob=0.1)
result = de.solve(problem, seed=42)

Decision variables

All variable types are encoded as numbers in [0, 1], so every algorithm can solve every problem. Decoded indices are 0 based.

Type Decodes to Typical use
Real(name, shape, lb, ub) real array in [lb, ub] continuous optimization
Integer(name, shape, lb, ub) integer array in [lb, ub] generalized knapsack
Binary(name, shape) 0/1 array knapsack
Permutation(name, n, count=None) permutation of 0..n-1 (one per row) TSP, QAP, n-Queens
Selection(name, n, k, count=None) k distinct items out of n feature selection
BinarySelection(name, n, k, count=None) 0/1 mask with k ones feature selection
Partition(name, n, k, count=None) list of k groups of items vehicle routing, allocation
BinaryPartition(name, n, k, count=None) (k, n) 0/1 assignment matrix hub location allocation
FixedSum(name, shape, target, axis=None) non negative reals with a fixed total, row sums or column sums transportation

A problem can mix several variables. The decoded solution has one attribute per variable (sol.x, sol.tour).

Constraints

The objective may return (f, g), where each value in g is satisfied when g <= 0. By default, solutions are compared with Deb's feasibility rules. Use constraints="penalty" for a penalty method.

def evaluate(sol):
    x, y = sol.x
    return (x - 1) ** 2 + (y - 2) ** 2, [x + y - 2]

problem = ypea.Problem(ypea.Real("x", shape=2, lb=-5, ub=5), evaluate)

Citing

For this Python version (see CITATION.cff):

Mostapha Kalami Heris, YPEA: Yarpiz Evolutionary Algorithms for Python, version 0.1.0, 2026. https://github.com/smkalami/ypea-python

For the original MATLAB toolbox:

Mostapha Kalami Heris, Yarpiz Evolutionary Algorithms Toolbox for MATLAB (YPEA), Yarpiz, 2020.

License

MIT