Skip to main content

AquaCropPy

PyPI

Crop growth model to address food security and assess the effect of the environment and management on crop production. Python code to run an AquaCrop simulation. AquaCrop was developed by the The Food and Agriculture Organization (FAO).

matlab code structure

Building with tests included

This module was built to be tested, released and installed like any other python package. Someday users will be able to pip install it from Pypi.

For now, developers will need to download the repo and instal it in 'editable mode' to avoid having to re-build it:

pip install -e .

Running tests

Leveraging pytest with the pytest-cov module:

pytest -v --cov=aquacroppy

Alternatively, you could run the unit tests with nose:

nosetests  --with-coverage --cover-package=aquacroppy -v

Test Driven Development

The idea is to only write code that meets a specification. Generally speaking, the specifications are the tests.

Here is a sample workflow:

  • start with a test suite that passes
  • write a test for code that does not yet exist
  • run the test, (confirm that it fails)
  • write the minimal amount of code to get the test to pass
  • run the entire test suite again (confirm that new code doesn't break other parts of the application)
  • commit code repository
  • repeat

Building distribution

After checking out the repo, run the following command if you want to generate distributions:

python3 setup.py sdist bdist_wheel

Release files for aquacroppy 0.0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aquacroppy 0.0.0.3
File Size Uploaded
aquacroppy-0.0.0.3.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aquacroppy 0.0.0.3
File Interpreter ABI Platform
aquacroppy-0.0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 24.7 kB

Release files / aquacroppy-0.0.0.3.tar.gz

Download URL aquacroppy-0.0.0.3.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5d29ef806f29d6b1197c05806750837b2bd0754ad9e9f37c5724b566e1eaf290
BLAKE2b-256 checksum
How to use checksums
769198f1e745532853bba0a1fa0c0a9ba0f6d87ade6c46a2d3ad330848647732
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / aquacroppy-0.0.0.3-py3-none-any.whl

Download URL aquacroppy-0.0.0.3-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce71818e1295ad7e1f13715463384390f74c933ba21755ca95c02d99018c4ae5
BLAKE2b-256 checksum
How to use checksums
bddfc484004cdb39c356bb29dfadb7004cb5a9770e093c8ccff81b9021f58195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.0.0.3 This release

2 release files

0.0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page