Skip to main content

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

  • Deterministicrandom.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

License

Copyright © 2026 rotsl. MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edgar_design-1.0.0.tar.gz (85.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edgar_design-1.0.0-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

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

Hashes for edgar_design-1.0.0.tar.gz
Algorithm Hash digest
SHA256 503bf5dd3c0b854e3b7317c819e1d89fecd3c8dd97c50ffdb7e2d5595f144f63
MD5 6c02c360711f1e8ab657143d60db3754
BLAKE2b-256 658b8fe834a0d13ee8e60b6a56f7d7333296e835f3a9c9382d3e09c14e6d5b4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for edgar_design-1.0.0.tar.gz:

Publisher: publish.yml on rotsl/edgar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for edgar_design-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a51995acdf2ef4a707a9e1ce5425a401978e6680d1996e4495b48376ae99e43
MD5 3b068ec4685d8d5f738c790bb751897d
BLAKE2b-256 445c767f7f0cd3cd5732cc919021ed7d553a6a674bb6cb7398544e0c0858cb2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for edgar_design-1.0.0-py3-none-any.whl:

Publisher: publish.yml on rotsl/edgar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page