Skip to content
Snippets Groups Projects
Commit 049c6b92 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Documentation improvement

parent b58d6010
Branches
Tags v1.1.3
No related merge requests found
# ReferenceModel <img src="docs/illustrations/vipslogo_512.png" alt="VIPS Logo" height="250"/>
## How to find and instantiate this model
TODO: Must find a way of dynamically importing models
Clues here: https://stackoverflow.com/questions/42401495/how-to-dynamically-import-modules#42402095
``` python # ReferenceModel
>>> from reference_model import reference_model This VIPS model is **an example only, without any actual agronomic value**. It provides examples of how you
>>> from vipscore_common.vips_model import VIPSModel create your own pest prediction model that can be deployed to a [VIPSCore-Python server](https://gitlab.nibio.no/VIPS/VIPSCore-Python) deployment.
>>> print(VIPSModel.__subclasses__())
[<class 'reference_model.reference_model.ReferenceModel'>]
>>> print(VIPSModel.__subclasses__()[0])
<class 'reference_model.reference_model.ReferenceModel'>
>>> t = VIPSModel.__subclasses__()[0]()
>>> t
<reference_model.reference_model.ReferenceModel object at 0x7f8fab6dee30>
>>> t.get_model_name()
'Reference Model'
>>> t.get_model_description()
"\n The model is a reference model for developers, showcasing best practices and functionalities of a model.\n It's a simple day degree model for an imagined pest, and when thresholds are passed, the warning status progresses.\n "
``` ## How to deploy this model
See the [VIPSCore-Python README](https://gitlab.nibio.no/VIPS/VIPSCore-Python#install-vips-models) for how to make it available on that server.
## Testing ## Testing
The tests are located in the `tests` folder, and we're using [Pytest](https://docs.pytest.org/) The tests are located in the `tests` folder, and we're using [Pytest](https://docs.pytest.org/)
......
docs/illustrations/vipslogo_512.png

21.4 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment