# -*- coding: utf-8 -*-
from setuptools import setup

package_dir = \
{'': '.'}

packages = \
['pybeepop']

package_data = \
{'': ['*'], 'pybeepop': ['data/*', 'lib/*']}

install_requires = \
['pandas>=2.0.0,<3.0.0']

setup_kwargs = {
    'name': 'pybeepop-plus',
    'version': '0.1.1',
    'description': "EPA's Python wrapper for the EPA/USDA honey bee colony model BeePop+",
    'long_description': '# pybeepop+ :honeybee:\nPython-based wrapper for the USDA/EPA\'s honey bee colony model **BeePop+**.\n\nFor more information about **BeePop+** see [Garber *et al.* 2022](https://doi.org/10.3390/ecologies3030022).\n\nDeveloped by: Jeffrey Minucci \n\n## Table of Contents\n\n- [Requirements](#requirements)\n- [Quick Start Guide](#quick-start-guide)\n- [Example Notebook](#example-notebook)\n- [API Documentation](#api-documentation)\n- [Compiling BeePop+ on Linux](#compiling-beepop-on-linux)\n- [Contributing to pybeepop+](#contributing-to-pybeepop+)\n\n## Requirements\n\n* Supported platforms: \n    * Windows 64-bit (x64)\n    * Linux\n* For **Windows**: [Microsoft Visual C++ Redistributable 2015-2022](https://www.microsoft.com/en-us/download/details.aspx?id=48145)\n* For **Linux**, the bundled BeePop+ library was compiled on **Ubuntu**. If you encounter errors loading the library, you can try compiling BeePop+ yourself from source. Instructions for compiling BeePop+ for Linux are [below](#compiling-beepop-on-linux). Source code is available on [the project\'s GitHub page](https://github.com/quanted/vpoplib).\n* Python version 3.6 or above.\n* pandas installed in your Python environment.\n\n\n## Quick Start Guide\n\n1. **Install the package** into your Python environment using pip:\n\n        pip install pybeepop-plus\n        \n2.  **Import the PyBeePop class** in your python code, e.g.:\n    \n        from pybeepop import PyBeePop\n      \n  \n3. **Create a BeePop+ object**:\n\n        beepop = PyBeePop()\n        \n\n4. **Set parameters, weather and pesticide exposure levels (optional)**.\n\n        # define a dictionary of BeePop+ parameters (parameter_name: value)\n        params = {"ICWorkerAdults": 10000, "ICWorkerBrood": 8000, \n            "SimStart": "04/13/2015", "SimEnd": "09/15/2015",\n            "AIAdultLD50: 0.04"}\n        beepop.set_parameters(params)\n        \n        # load your weather file by giving its path\n        weather = \'/home/example/test_weather.txt\'\n        beepop.load_weather(weather)\n        \n        # load your pesticide residue file by giving its path (optional)\n        pesticide_file = \'/home/example/pesticide_residues.txt\'\n        beepop.load_contamination_file(pesticide_file)\n     \n    <br>Parameters that are not set by the user will take on the BeePop+ default values. For more information see [the BeePop+ publication](https://doi.org/10.3390/ecologies3030022).\n    \n    For a list of exposed BeePop+ parameters, see [docs/BeePop_exposed_parameters.csv](https://github.com/USEPA/pybeepop/blob/main/docs/BeePop_exposed_parameters.csv).\n    \n    For an explanation of the **weather file format**, see [docs/weather_readme.txt](https://github.com/USEPA/pybeepop/blob/main/docs/weather_readme.txt).\n\n    For an explanation of the **residue file format**, see [docs/residue_file_readme.txt](https://github.com/USEPA/pybeepop/blob/main/docs/residue_file_readme.txt).\n\n    **Example files** to run the model can be found at [example_files/](https://github.com/USEPA/pybeepop/tree/main/example_data).\n    \n5. **Run the Model** and get the results as a pandas DataFrame\n    ```\n    results = beepop.run_model()\n    print(results)\n    ```\n\n\n6. **Results from last simulation** can also be returned using the get_output function, with options to return a DataFrame or a json string.\n    ```\n    output = beepop.get_output()  # pandas dataframe\n    output_json = beepop.get_output(json_str=True)  # json string\n    ```\n\n\n7. You can pass new parameters and/or update previously set ones (and optionally set a new weather file), and then run the model again. Parameters that were previously defined will remain set\n\n    ```\n    # update value for ICWorkerAdults, InitColPollen, other values set previously remain\n    params_new = {"ICWorkerAdults": 22200, "InitColPollen": 4000}\n    beepop.set_parameters(parameters = params_new)\n    new_results = beepop.run_model()\n    ```\n\n\n8. You can also set parameters using a .txt file where each line gives a parameter in the format "Parameter=Value". \n\n    Example my_parameters.txt:\n        \n        RQEggLayDelay=10\n        RQReQueenDate=06/25/2015\n        RQEnableReQueen=False\n\n    In Python:\n\n        parameter_file = \'home/example/my_parameters.txt\'\n        my_parameters = beepop.load_input_file()\n        print(my_parameters)\n\n\n9. To get a list of the user-defined parameters:\n\n        my_parameters = beepop.get_parameters()\n        print(my_parameters)\n\n## Example notebook\n\nA Jupyter notebook with a working example of using `pybeepop+` is available [here](https://github.com/USEPA/pybeepop/blob/main/pybeepop_example.ipynb).\n\n\n## API Documentation\n\nDocumentation of the pybeepop+ API can be found at: https://usepa.github.io/pybeepop/.\n\n\n## Compiling BeePop+ on Linux\n\n\n### Requirements for compilation\n* cmake > 3.2\n* gcc and g++ compilers\n\n### Compiling BeePop+ from source on Linux\n\n1. Clone the BeePop+ repo:\n\n        git clone https://github.com/quanted/VPopLib.git\n    \n2. Create a build directory:\n\n        cd VPopLib\n        mkdir build\n        cd build\n    \n3. Build the shared library:\n\n        cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..  \t\n        cmake --build . --config Release\n \n4. Now the .so file liblibvpop.so should have been created inside the /build directory. This shared library can be moved or renamed. You can pass the path to this .so file as lib_path when creating a PyBeePop object:\n        \n        # pass the path to your previously compiled shared library file\n        lib_file = \'/home/example/liblibvpop.so\'\n        beepop = PyBeePop(lib_file)\n\n\n## Contributing to pybeepop+\n\nFor those in the user community wishing to contribute to this project:\n\n- Code updates or enhancements can be made by forking and submitting pull requests that will be reviewed by repository admins.\n- Software, code, or algorithm related bugs and issues can be submitted directly as issues on the GitHub repository.\n- Support can be requested through GitHub issues.',
    'author': 'Jeffrey Minucci',
    'author_email': 'minucci.jeffrey@epa.gov',
    'maintainer': 'Jeffrey Minucci',
    'maintainer_email': 'minucci.jeffrey@epa.gov',
    'url': 'https://github.com/USEPA/pybeepop',
    'package_dir': package_dir,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.8.0,<4.0.0',
}
from build import *
build(setup_kwargs)

setup(**setup_kwargs)
