Open-source, code-first virtual farm runtime for agricultural researchers.
Project description
CropForge
Open-source, code-first virtual farm runtime for agricultural researchers.
CropForge lets you define a crop simulation entirely in Python. You write the model equations; CropForge handles time-stepping, spatial state management, logging, and visual playback.
pip install cropforge
What's New in v0.5.0
White Minimal Scientific Dashboard
A complete rework of the visualisation layer built on Material Design:
- Sleek, clean white minimal theme with refined borders and ample whitespace.
- Persistent Farm Inspector (always visible, no click-to-reveal).
- Left sidebar with all controls; right sidebar with live charts.
- Animated preloader with per-field progress tracking.
- All panels renamed to researcher-facing terminology.
Official Crop Plugins — StandardWheat & StandardMaize
First-party, PRD-verified crop plugins distributed as cropforge.plugins:
from cropforge.plugins import StandardWheat, StandardMaize
field.use_plugin(StandardWheat) # CERES-Wheat phenology + RUE biomass + grain fill
field.use_plugin(StandardMaize) # C4 parameters + root impedance + water stress
- StandardWheat: 6-stage thermal-time phenology, RUE biomass, grain-fill partitioning into
plant.custom['grain_biomass_g']. - StandardMaize: C4 photosynthesis parameters, hard-pan root clamping, water-stress mortality.
- Both plugins are fully isolated per field — no cross-talk when running dual-plot comparisons.
Advanced Physics Engines
Two new opt-in physics engines, mathematically verified against PRD Crucible criteria:
Beer-Lambert Radiation Interception
farm.use_physics(radiation=True, k_extinction=0.45)
# Writes plant.custom['intercepted_par_mj'] for every plant every day
Implements: PAR_int = solar_rad × 0.5 × (1 − e^(−k × LAI))
Crucible verified: LAI=3.0, k=0.45, rad=15 MJ → 5.5557 MJ ±0.001.
Wind-driven Anisotropic Disease Spread
farm.use_physics(
disease=True,
disease_foci=[(15, 15)], # Initial outbreak coordinates
disease_wind_direction_deg=270.0, # From West → spreads East
disease_spread_rate=0.20,
disease_anisotropy=0.80,
)
A spatially explicit SIR grid model where infection probability is heavily weighted by wind direction. Crucible verified: eastern half has 2.5× more infections than western half when wind blows East.
Quick Start
from cropforge import Farm, Field, Crop, Soil, Weather
from cropforge.plugins import StandardWheat
farm = Farm(name="MyFarm", location=(28.6, 77.2))
field = Field(name="Plot A", rows=20, cols=30, area_ha=2.4)
field.set_crop(Crop(species="wheat"))
field.set_weather(Weather.from_csv("data/weather.csv", ...))
field.set_soil(Soil.from_csv("data/soil.csv", apply="uniform"))
farm.add_field(field)
field.use_plugin(StandardWheat)
farm.use_physics(radiation=True, disease=True, disease_wind_direction_deg=270.0)
farm.run(days=90)
See examples/wheat_basic_v2.py, examples/maize_dual_plot_v2.py, and examples/disease_outbreak_trial.py for complete working scripts.
What's New in v0.4.0
- Plugin Ecosystem: Extensible architecture for third-party crop models via PyPI.
- Multi-Season Rotations: Preserve soil state between consecutive runs.
- Compare Dashboard: Compare multiple farm configs and export to CSV.
- Spatial Hydrology: D8 lateral surface water routing across gridded fields.
What's New in v0.2.0
- Opt-In Physics: FAO-56 Penman-Monteith ET0 and Root Impedance models.
- Multi-Field Dashboard: Field Selector, comparative time-series, GxE analysis.
Documentation
Full documentation at cropforge.readthedocs.io.
Licence
MIT — Saswat Sundar Rath, ICAR-IARI Jharkhand, 2026
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
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 cropforge-0.5.0.tar.gz.
File metadata
- Download URL: cropforge-0.5.0.tar.gz
- Upload date:
- Size: 153.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5201f26da1bfb0590935e1cc365184b4e770404f42651f2819377b431fe22087
|
|
| MD5 |
b374dc22a508b0e0a22bd2fd6728da26
|
|
| BLAKE2b-256 |
3944190a96584b41043b097715c476e0704589626fb1d960c35dbecbfa543335
|
Provenance
The following attestation bundles were made for cropforge-0.5.0.tar.gz:
Publisher:
publish.yml on saswatsundar123/CropForge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cropforge-0.5.0.tar.gz -
Subject digest:
5201f26da1bfb0590935e1cc365184b4e770404f42651f2819377b431fe22087 - Sigstore transparency entry: 1996185825
- Sigstore integration time:
-
Permalink:
saswatsundar123/CropForge@8535de6c9b6cca7f37b2ad3a2c822ddae59182a8 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/saswatsundar123
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8535de6c9b6cca7f37b2ad3a2c822ddae59182a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cropforge-0.5.0-py3-none-any.whl.
File metadata
- Download URL: cropforge-0.5.0-py3-none-any.whl
- Upload date:
- Size: 95.4 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 |
0d76a7b7852a574bbbdc1429cc015b17c5f65cfb1851fc4dc954473eca800b05
|
|
| MD5 |
22900724b3286cb52eccf92ac97058d6
|
|
| BLAKE2b-256 |
2f27697f98a04b8a05dbe2637a5de24502c86ee18a929a93f81e15c97ee7e0d5
|
Provenance
The following attestation bundles were made for cropforge-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on saswatsundar123/CropForge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cropforge-0.5.0-py3-none-any.whl -
Subject digest:
0d76a7b7852a574bbbdc1429cc015b17c5f65cfb1851fc4dc954473eca800b05 - Sigstore transparency entry: 1996186012
- Sigstore integration time:
-
Permalink:
saswatsundar123/CropForge@8535de6c9b6cca7f37b2ad3a2c822ddae59182a8 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/saswatsundar123
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8535de6c9b6cca7f37b2ad3a2c822ddae59182a8 -
Trigger Event:
push
-
Statement type: