Modern Python implementation of EDGAR – Experimental Design Generator and Randomiser
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edgar_design-1.0.0.tar.gz.
File metadata
- Download URL: edgar_design-1.0.0.tar.gz
- Upload date:
- Size: 85.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
503bf5dd3c0b854e3b7317c819e1d89fecd3c8dd97c50ffdb7e2d5595f144f63
|
|
| MD5 |
6c02c360711f1e8ab657143d60db3754
|
|
| BLAKE2b-256 |
658b8fe834a0d13ee8e60b6a56f7d7333296e835f3a9c9382d3e09c14e6d5b4e
|
Provenance
The following attestation bundles were made for edgar_design-1.0.0.tar.gz:
Publisher:
publish.yml on rotsl/edgar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edgar_design-1.0.0.tar.gz -
Subject digest:
503bf5dd3c0b854e3b7317c819e1d89fecd3c8dd97c50ffdb7e2d5595f144f63 - Sigstore transparency entry: 1689934501
- Sigstore integration time:
-
Permalink:
rotsl/edgar@c6331231eff050e5e99e39fb62f50819e9a49c34 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rotsl
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c6331231eff050e5e99e39fb62f50819e9a49c34 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file edgar_design-1.0.0-py3-none-any.whl.
File metadata
- Download URL: edgar_design-1.0.0-py3-none-any.whl
- Upload date:
- Size: 42.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a51995acdf2ef4a707a9e1ce5425a401978e6680d1996e4495b48376ae99e43
|
|
| MD5 |
3b068ec4685d8d5f738c790bb751897d
|
|
| BLAKE2b-256 |
445c767f7f0cd3cd5732cc919021ed7d553a6a674bb6cb7398544e0c0858cb2a
|
Provenance
The following attestation bundles were made for edgar_design-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on rotsl/edgar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edgar_design-1.0.0-py3-none-any.whl -
Subject digest:
6a51995acdf2ef4a707a9e1ce5425a401978e6680d1996e4495b48376ae99e43 - Sigstore transparency entry: 1689934646
- Sigstore integration time:
-
Permalink:
rotsl/edgar@c6331231eff050e5e99e39fb62f50819e9a49c34 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rotsl
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c6331231eff050e5e99e39fb62f50819e9a49c34 -
Trigger Event:
workflow_dispatch
-
Statement type: