Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

AquaCrop Python

Project description

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

Project details


Download files

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

Files for aquacroppy, version 0.0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size aquacroppy-0.0.0.3-py3-none-any.whl (19.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size aquacroppy-0.0.0.3.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page