pyprecag


Namepyprecag JSON
Version 0.4.3 PyPI version JSON
download
home_pageNone
SummaryA suite of tools for Precision Agriculture
upload_time2025-01-30 03:11:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseBSD-3-Clause
keywords agriculture precision agriculture gis cartography geopandas rasterio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # pyprecag

A suite of tools for Precision Agriculture data analysis

-   Homepage: <https://github.com/CSIRO-Precision-Agriculture/pyprecag>
-   Documentation:
    <https://CSIRO-Precision-Agriculture.github.io/pyprecag_docs>
-   [Installation](https://csiro-precision-agriculture.github.io/pyprecag_docs/installation.html#installation)
-   Version: 0.4.3
-   License: [GNU General Public Licence version 3
    (GPLv3)](https://github.com/CSIRO-Precision-Agriculture/pyprecag/blob/master/LICENSE)

Precision Agriculture Tools (PAT) Plugin for QGIS contains tools for
processing and analysing precision agriculture data which uses the
pyPrecAg python module. For more infomation visit
<https://github.com/CSIRO-Precision-Agriculture/PAT_QGIS_Plugin>

## Citation

If you use pyprecag for any published work, please cite using the
reference below:

*Ratcliff, Christina; Gobbett, David; & Bramley, Rob (2025): pyprecag -
a Python package for the analysis of precision agriculture data. CSIRO.
v5. Software. http://hdl.handle.net/102.100.100/78353*

## Dependencies

-   Python version 3.7+
-   [GDAL](https://www.gdal.org/)
-   [Fiona](https://fiona.readthedocs.io/en/stable/)
-   [Rasterio](https://rasterio.readthedocs.io/en/stable/)
-   [Geopandas](https://geopandas.org/en/stable/)
-   [VESPER](https://precision-agriculture.sydney.edu.au/resources/software/)
    (for Kriging)

### Installation

pyprecag is available through the Python Packaging Index and can be
installed with pip, however some dependencies require additional steps
to install properly.

It is recommended to install pyprecag in a virtual environment so that
the dependencies do not cause issues with your system-level Python
installation.

VESPER Kriging is only supported on Windows platforms with the
[VESPER](https://sydney.edu.au/agriculture/pal/software/vesper.shtml)
software installed.

Install via pip:

``` console
pip install pyprecag
```

## Linux

The only dependency that causes issues is [GDAL](https://www.gdal.org/)
. The Python package is available from
[PyPI](https://pypi.org/project/GDAL/) . However, the
[libgdal-dev]{.title-ref} dependencies are required, and the location of
the header files needs to be specified when installing. These libraries
are available via [UbuntuGIS](https://wiki.ubuntu.com/UbuntuGIS) and
other avenues.

On Debian systems, this process should work. Add the unstable release of
UbuntuGIS, get and install packages with:

``` console
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libgdal-dev gdal-bin
```

If the above doesn\'t work try removing all gdal related files from the
[/etc/apt/sources.list.d]{.title-ref} direcory and trying again (it\'s
possible old files are interfering with install attempts).

Once the [libgdal-dev]{.title-ref} libraries and [gdal-bin]{.title-ref}
are installed, pip install GDAL while specifying the version and the
location of the header files with:

``` console
pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal"
```

Then pyprecag should install without issue.

## Docker

The Dockerfile included in the examples directory builds a container
with Pyprecag installed in an Ubuntu 18.04 image. Build the container
with:

``` console
docker build -f docs/Dockerfile -t <tag> .
```

The tests can be run inside this container like this:

``` console
docker run <container id or tag> make test
```

## Windows

The dependencies [GDAL](https://www.gdal.org/),
[Fiona](https://github.com/Toblerity/Fiona) , and
[Rasterio](https://github.com/mapbox/rasterio) , all cause issues when
installing on Windows.

The easiest way to install all of these is with the Windows Binaries
provided by Christoph Gohlke at
<https://www.lfd.uci.edu/~gohlke/pythonlibs/>. Download the Python 2.7
version for your system architecture then install them with:

``` console
pip install /path/to/<downloaded_file.whl>
```

It is recommended to install GDAL first, as it is a requirements for
both Fiona and Rasterio. GDAL might also return an error and require you
to install Visual C++.

They are also available from the conda-forge channel in conda. pyprecag
is not currently available to install with conda, however can be pip
installed in a conda environment and use the conda-installed versions of
GDAL, Fiona and Rasterio.

Once those three dependencies are installed, pyprecag should install
without issue.

### Development

There is a makefile in the project root with targets for the most common
development operations such as lint checks, running unit tests, building
the documentation, and building installer packages. [tox]{.title-ref}
does not have a target, as [make tox]{.title-ref} is more typing than
[tox]{.title-ref}.

Run make with no target to see the list of targets:

``` bash
$ make
```

[Bump-my-version](https://callowayproject.github.io/bump-my-version/) is
used to manage the package version numbers. This ensures that the
version number is correctly incremented in all required files. Please
see the bumpversion documentation for usage instructions, and do not
edit the version strings directly.

Version numbers follow the [Semantic versioning guidelines](semver.org).

### Contributing

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

## Bug reports

When [reporting a
bug](https://github.com/CSIRO-Precision-Agriculture/pyprecag/issues)
please include:

> -   Your operating system name and version.
> -   Any details about your local setup that might be helpful in
>     troubleshooting.
> -   The pyprecag package version.
> -   Detailed steps to reproduce the bug.

## Documentation improvements

pyprecag could always use more documentation, whether as part of the
official pyprecag docs, in docstrings, or even on the web in blog posts,
articles, and such.

:::: note
::: title
Note
:::

This project uses Google-style docstrings. Contributed code should
follow the same conventions. For examples, please see the [Napoleon
examples](http://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_google.html),
or the [Google Python Style
Guide](https://github.com/google/styleguide/blob/gh-pages/pyguide.md).
::::

## Feature requests and feedback

The best way to send feedback is to [file an
issue](https://github.com/CSIRO-Precision-Agriculture/pyprecag/issues)

If you are proposing a feature:

-   Explain in detail how it would work.
-   Keep the scope as narrow as possible, to make it easier to
    implement.
-   Remember that this is a volunteer-driven project, and that
    contributions are welcome :)

Or, implement the feature yourself and submit a pull request.

## Development

To set up pyprecag for local development:

1.  Fork the [pyprecag]{.title-ref} repo on GitHub.
2.  Clone your fork locally:

``` bash
$ git clone git@github.com:your_name_here/pyprecag.git
```

3.  Create a branch for local development:

``` bash
git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
```

4.  When you\'re done making changes, run all the tests, doc builder and
    pylint checks using the project makefile:

``` bash
make clean lint test docs
```

5.  Commit your changes and push your branch to GitHub:

``` console
git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature
```

6.  Submit a pull request through the GitHub website.

## Pull Request Guidelines

If you need some code review or feedback while you\'re developing the
code just make the pull request.

For merging, you should:

1.  Include passing tests.
2.  Update documentation when there\'s new API, functionality etc.
3.  Add a note to `CHANGELOG.rst` about the changes.
4.  Add yourself to `AUTHORS.rst`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyprecag",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Agriculture, Precision Agriculture, GIS, cartography, geopandas, rasterio",
    "author": null,
    "author_email": "Christina Ratcliff <pat@csiro.au>",
    "download_url": "https://files.pythonhosted.org/packages/bb/3e/f45276505f1dbae714ee9eaf46211656be2be034336eb3ca0d8be93c56a8/pyprecag-0.4.3.tar.gz",
    "platform": null,
    "description": "# pyprecag\r\n\r\nA suite of tools for Precision Agriculture data analysis\r\n\r\n-   Homepage: <https://github.com/CSIRO-Precision-Agriculture/pyprecag>\r\n-   Documentation:\r\n    <https://CSIRO-Precision-Agriculture.github.io/pyprecag_docs>\r\n-   [Installation](https://csiro-precision-agriculture.github.io/pyprecag_docs/installation.html#installation)\r\n-   Version: 0.4.3\r\n-   License: [GNU General Public Licence version 3\r\n    (GPLv3)](https://github.com/CSIRO-Precision-Agriculture/pyprecag/blob/master/LICENSE)\r\n\r\nPrecision Agriculture Tools (PAT) Plugin for QGIS contains tools for\r\nprocessing and analysing precision agriculture data which uses the\r\npyPrecAg python module. For more infomation visit\r\n<https://github.com/CSIRO-Precision-Agriculture/PAT_QGIS_Plugin>\r\n\r\n## Citation\r\n\r\nIf you use pyprecag for any published work, please cite using the\r\nreference below:\r\n\r\n*Ratcliff, Christina; Gobbett, David; & Bramley, Rob (2025): pyprecag -\r\na Python package for the analysis of precision agriculture data. CSIRO.\r\nv5. Software. http://hdl.handle.net/102.100.100/78353*\r\n\r\n## Dependencies\r\n\r\n-   Python version 3.7+\r\n-   [GDAL](https://www.gdal.org/)\r\n-   [Fiona](https://fiona.readthedocs.io/en/stable/)\r\n-   [Rasterio](https://rasterio.readthedocs.io/en/stable/)\r\n-   [Geopandas](https://geopandas.org/en/stable/)\r\n-   [VESPER](https://precision-agriculture.sydney.edu.au/resources/software/)\r\n    (for Kriging)\r\n\r\n### Installation\r\n\r\npyprecag is available through the Python Packaging Index and can be\r\ninstalled with pip, however some dependencies require additional steps\r\nto install properly.\r\n\r\nIt is recommended to install pyprecag in a virtual environment so that\r\nthe dependencies do not cause issues with your system-level Python\r\ninstallation.\r\n\r\nVESPER Kriging is only supported on Windows platforms with the\r\n[VESPER](https://sydney.edu.au/agriculture/pal/software/vesper.shtml)\r\nsoftware installed.\r\n\r\nInstall via pip:\r\n\r\n``` console\r\npip install pyprecag\r\n```\r\n\r\n## Linux\r\n\r\nThe only dependency that causes issues is [GDAL](https://www.gdal.org/)\r\n. The Python package is available from\r\n[PyPI](https://pypi.org/project/GDAL/) . However, the\r\n[libgdal-dev]{.title-ref} dependencies are required, and the location of\r\nthe header files needs to be specified when installing. These libraries\r\nare available via [UbuntuGIS](https://wiki.ubuntu.com/UbuntuGIS) and\r\nother avenues.\r\n\r\nOn Debian systems, this process should work. Add the unstable release of\r\nUbuntuGIS, get and install packages with:\r\n\r\n``` console\r\nsudo apt-get install software-properties-common\r\nsudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable\r\nsudo apt-get update\r\nsudo apt-get install libgdal-dev gdal-bin\r\n```\r\n\r\nIf the above doesn\\'t work try removing all gdal related files from the\r\n[/etc/apt/sources.list.d]{.title-ref} direcory and trying again (it\\'s\r\npossible old files are interfering with install attempts).\r\n\r\nOnce the [libgdal-dev]{.title-ref} libraries and [gdal-bin]{.title-ref}\r\nare installed, pip install GDAL while specifying the version and the\r\nlocation of the header files with:\r\n\r\n``` console\r\npip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option=\"-I/usr/include/gdal\"\r\n```\r\n\r\nThen pyprecag should install without issue.\r\n\r\n## Docker\r\n\r\nThe Dockerfile included in the examples directory builds a container\r\nwith Pyprecag installed in an Ubuntu 18.04 image. Build the container\r\nwith:\r\n\r\n``` console\r\ndocker build -f docs/Dockerfile -t <tag> .\r\n```\r\n\r\nThe tests can be run inside this container like this:\r\n\r\n``` console\r\ndocker run <container id or tag> make test\r\n```\r\n\r\n## Windows\r\n\r\nThe dependencies [GDAL](https://www.gdal.org/),\r\n[Fiona](https://github.com/Toblerity/Fiona) , and\r\n[Rasterio](https://github.com/mapbox/rasterio) , all cause issues when\r\ninstalling on Windows.\r\n\r\nThe easiest way to install all of these is with the Windows Binaries\r\nprovided by Christoph Gohlke at\r\n<https://www.lfd.uci.edu/~gohlke/pythonlibs/>. Download the Python 2.7\r\nversion for your system architecture then install them with:\r\n\r\n``` console\r\npip install /path/to/<downloaded_file.whl>\r\n```\r\n\r\nIt is recommended to install GDAL first, as it is a requirements for\r\nboth Fiona and Rasterio. GDAL might also return an error and require you\r\nto install Visual C++.\r\n\r\nThey are also available from the conda-forge channel in conda. pyprecag\r\nis not currently available to install with conda, however can be pip\r\ninstalled in a conda environment and use the conda-installed versions of\r\nGDAL, Fiona and Rasterio.\r\n\r\nOnce those three dependencies are installed, pyprecag should install\r\nwithout issue.\r\n\r\n### Development\r\n\r\nThere is a makefile in the project root with targets for the most common\r\ndevelopment operations such as lint checks, running unit tests, building\r\nthe documentation, and building installer packages. [tox]{.title-ref}\r\ndoes not have a target, as [make tox]{.title-ref} is more typing than\r\n[tox]{.title-ref}.\r\n\r\nRun make with no target to see the list of targets:\r\n\r\n``` bash\r\n$ make\r\n```\r\n\r\n[Bump-my-version](https://callowayproject.github.io/bump-my-version/) is\r\nused to manage the package version numbers. This ensures that the\r\nversion number is correctly incremented in all required files. Please\r\nsee the bumpversion documentation for usage instructions, and do not\r\nedit the version strings directly.\r\n\r\nVersion numbers follow the [Semantic versioning guidelines](semver.org).\r\n\r\n### Contributing\r\n\r\nContributions are welcome, and they are greatly appreciated! Every\r\nlittle bit helps, and credit will always be given.\r\n\r\n## Bug reports\r\n\r\nWhen [reporting a\r\nbug](https://github.com/CSIRO-Precision-Agriculture/pyprecag/issues)\r\nplease include:\r\n\r\n> -   Your operating system name and version.\r\n> -   Any details about your local setup that might be helpful in\r\n>     troubleshooting.\r\n> -   The pyprecag package version.\r\n> -   Detailed steps to reproduce the bug.\r\n\r\n## Documentation improvements\r\n\r\npyprecag could always use more documentation, whether as part of the\r\nofficial pyprecag docs, in docstrings, or even on the web in blog posts,\r\narticles, and such.\r\n\r\n:::: note\r\n::: title\r\nNote\r\n:::\r\n\r\nThis project uses Google-style docstrings. Contributed code should\r\nfollow the same conventions. For examples, please see the [Napoleon\r\nexamples](http://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_google.html),\r\nor the [Google Python Style\r\nGuide](https://github.com/google/styleguide/blob/gh-pages/pyguide.md).\r\n::::\r\n\r\n## Feature requests and feedback\r\n\r\nThe best way to send feedback is to [file an\r\nissue](https://github.com/CSIRO-Precision-Agriculture/pyprecag/issues)\r\n\r\nIf you are proposing a feature:\r\n\r\n-   Explain in detail how it would work.\r\n-   Keep the scope as narrow as possible, to make it easier to\r\n    implement.\r\n-   Remember that this is a volunteer-driven project, and that\r\n    contributions are welcome :)\r\n\r\nOr, implement the feature yourself and submit a pull request.\r\n\r\n## Development\r\n\r\nTo set up pyprecag for local development:\r\n\r\n1.  Fork the [pyprecag]{.title-ref} repo on GitHub.\r\n2.  Clone your fork locally:\r\n\r\n``` bash\r\n$ git clone git@github.com:your_name_here/pyprecag.git\r\n```\r\n\r\n3.  Create a branch for local development:\r\n\r\n``` bash\r\ngit checkout -b name-of-your-bugfix-or-feature\r\nNow you can make your changes locally.\r\n```\r\n\r\n4.  When you\\'re done making changes, run all the tests, doc builder and\r\n    pylint checks using the project makefile:\r\n\r\n``` bash\r\nmake clean lint test docs\r\n```\r\n\r\n5.  Commit your changes and push your branch to GitHub:\r\n\r\n``` console\r\ngit add .\r\ngit commit -m \"Your detailed description of your changes.\"\r\ngit push origin name-of-your-bugfix-or-feature\r\n```\r\n\r\n6.  Submit a pull request through the GitHub website.\r\n\r\n## Pull Request Guidelines\r\n\r\nIf you need some code review or feedback while you\\'re developing the\r\ncode just make the pull request.\r\n\r\nFor merging, you should:\r\n\r\n1.  Include passing tests.\r\n2.  Update documentation when there\\'s new API, functionality etc.\r\n3.  Add a note to `CHANGELOG.rst` about the changes.\r\n4.  Add yourself to `AUTHORS.rst`.\r\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "A suite of tools for Precision Agriculture",
    "version": "0.4.3",
    "project_urls": {
        "Homepage": "https://github.com/CSIRO-Precision-Agriculture/pyprecag"
    },
    "split_keywords": [
        "agriculture",
        " precision agriculture",
        " gis",
        " cartography",
        " geopandas",
        " rasterio"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "066d6727a1643640ab8d8733885aa6ecc6f52638e159aef83e2bfd42e0e0d10d",
                "md5": "11357140b56583ebd9a444cc3a0ffba2",
                "sha256": "4c869e12b09cd592d7d8d5ff29f5c2a9ccb8d87d05ea8af00cc30c9a53fd99cd"
            },
            "downloads": -1,
            "filename": "pyprecag-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "11357140b56583ebd9a444cc3a0ffba2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 287390,
            "upload_time": "2025-01-30T03:11:31",
            "upload_time_iso_8601": "2025-01-30T03:11:31.927939Z",
            "url": "https://files.pythonhosted.org/packages/06/6d/6727a1643640ab8d8733885aa6ecc6f52638e159aef83e2bfd42e0e0d10d/pyprecag-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bb3ef45276505f1dbae714ee9eaf46211656be2be034336eb3ca0d8be93c56a8",
                "md5": "a5a9c481e89e8bfe0159e5334db03dff",
                "sha256": "b83963ae666caa9ff401c43914b934a9ecf6e82b101e6c4aaffa0646bc9da37e"
            },
            "downloads": -1,
            "filename": "pyprecag-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a5a9c481e89e8bfe0159e5334db03dff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 285320,
            "upload_time": "2025-01-30T03:11:34",
            "upload_time_iso_8601": "2025-01-30T03:11:34.854944Z",
            "url": "https://files.pythonhosted.org/packages/bb/3e/f45276505f1dbae714ee9eaf46211656be2be034336eb3ca0d8be93c56a8/pyprecag-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-30 03:11:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CSIRO-Precision-Agriculture",
    "github_project": "pyprecag",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pyprecag"
}
        
Elapsed time: 0.67367s