EDGAR — Experimental Design Generator and Randomiser
A modern Python implementation of EDGAR, originally developed as Excel/VBA workbooks by the Biometrics team at Rothamsted Research. This package replaces legacy macro-driven workbooks with a deterministic, reproducible, fully tested Python system.
Supported Designs
| Key | Design |
|---|---|
cr_eq |
Completely Randomised — Equal Replication |
cr_uneq |
Completely Randomised — Unequal Replication |
rcb |
Randomised Complete Block |
rcb_uneq |
RCB — Unequal Replication |
two_factor_rcb |
Two-Factor RCB |
latin |
Latin Square |
split_plot |
Split Plot |
variable_blocks |
Variable Block Sizes |
alpha |
Alpha Design (Patterson & Williams, 1976) |
Installation
pip install edgar_design
Quick Start
Command-line
# List all design types
edgar-design list-designs
# Generate an RCB design
edgar-design generate rcb --treatment-count 8 --block-count 4 --seed 42 --format csv
# Generate an alpha design as XLSX
edgar-design generate alpha --treatment-count 30 --reps 3 --blocks-per-replicate 6 --seed 1 --format xlsx -o design.xlsx
Web interface
uvicorn edgar_design.api.main:app --reload --host 0.0.0.0 --port 8000
# Open http://localhost:8000
A read-only static preview is available at https://rotsl.github.io/edgar/.
Python API
from edgar_design.designs import generate_design
result = generate_design("rcb", treatment_count=4, block_count=3, seed=42)
for row in result.rows:
print(row)
Key Features
- Deterministic —
random.Random(seed)ensures same seed always gives same design - 9 design types — covers the most common agricultural and industrial experiment structures
- Three interfaces — web UI, CLI (
edgar-design), and Python API - Multiple export formats — CSV, JSON, XLSX (with metadata, matching legacy workbook layout)
- 229 tests, 94–100% coverage on core modules
- No Excel required — pure Python, runs on any OS
Links
- Repository: https://github.com/rotsl/edgar
- Full documentation: https://github.com/rotsl/edgar/blob/main/README.md
- Issue tracker: https://github.com/rotsl/edgar/issues
- Original Excel workbooks: https://www.edgarweb.org.uk
License
Copyright © 2026 rotsl. MIT License.
Metadata
Release files for edgar-design 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| edgar_design-1.0.0.tar.gz | 85.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| edgar_design-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 127.9 kB
Release files / edgar_design-1.0.0.tar.gz
| Download URL | edgar_design-1.0.0.tar.gz |
|---|---|
| Size | 85.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
503bf5dd3c0b854e3b7317c819e1d89fecd3c8dd97c50ffdb7e2d5595f144f63
|
|
BLAKE2b-256 checksum How to use checksums |
658b8fe834a0d13ee8e60b6a56f7d7333296e835f3a9c9382d3e09c14e6d5b4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.
Transparency logRelease files / edgar_design-1.0.0-py3-none-any.whl
| Download URL | edgar_design-1.0.0-py3-none-any.whl |
|---|---|
| Size | 42.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a51995acdf2ef4a707a9e1ce5425a401978e6680d1996e4495b48376ae99e43
|
|
BLAKE2b-256 checksum How to use checksums |
445c767f7f0cd3cd5732cc919021ed7d553a6a674bb6cb7398544e0c0858cb2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.
Transparency logSecurity for edgar-design 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for edgar_design-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.