Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • main
  • 0.1.5
  • 0.1.6
  • 0.2.0
  • 0.2.1
  • 0.2.2
  • 0.2.3
  • 0.2.4
  • 0.2.5
  • 0.2.6
10 results

Target

Select target project
  • VIPS/models/python/referencemodel
1 result
Select Git revision
  • main
  • 0.1.5
  • 0.1.6
  • 0.2.0
  • 0.2.1
  • 0.2.2
  • 0.2.3
  • 0.2.4
  • 0.2.5
  • 0.2.6
10 results
Show changes
Commits on Source (3)
......@@ -19,7 +19,7 @@ dependencies = [
"pydantic",
"pytz",
"pandas",
"vipscore_common @ git+https://gitlab.nibio.no/VIPS/vipscore-python-common.git@0.1.9"
"vipscore_common @ git+https://gitlab.nibio.no/VIPS/vipscore-python-common.git@0.2.0"
]
requires-python = ">=3.9"
......
src/vips_reference_model/images/DeadParrot.png

180 KiB

src/vips_reference_model/images/Monty_python_foot.png

205 KiB

......@@ -16,6 +16,7 @@ LICENSE = """
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import pathlib
from vipscore_common.vips_model import VIPSModel
from vipscore_common.entities import Result, ModelConfiguration, WeatherObservation
......@@ -129,13 +130,20 @@ class ReferenceModel(VIPSModel):
def get_model_description(self, language = VIPSModel.default_language) -> str:
"""Returns the model description in the specified language (<a href="http://www.loc.gov/standards/iso639-2/php/English_list.php">ISO-639-2</a>)"""
return """
The model is a reference model for developers, showcasing best practices and functionalities of a model.
It's a simple day degree model for an imagined pest, and when thresholds are passed, the warning status progresses.
"""
# This method (get_text_with_base64_encoded_images) is defined in the VIPSModel base class
return self.get_text_with_base64_encoded_images(
translations.description.get(
language,
translations.description.get(VIPSModel.default_language, "NOT FOUND")
),
pathlib.Path(__file__).parent
)
def get_warning_status_interpretation(self, language = VIPSModel.default_language) -> str:
"""How to interpret the warning status (red-yellow-green, what does it mean?) in the specified language (<a href="http://www.loc.gov/standards/iso639-2/php/English_list.php">ISO-639-2</a>)"""
return translations.wsi.get(language, translations.wsi.get(VIPSModel.default_language, "NOT FOUND"))
def get_model_usage(self, language = VIPSModel.default_language) -> str:
......
......@@ -24,29 +24,17 @@ name = {
description = {
"en": """
Well, there's egg and bacon,
Egg sausage and bacon
Egg and spam
Egg, bacon and spam
Egg, bacon, sausage and spam
Spam, bacon, sausage and spam
Spam, egg, spam, spam, bacon and spam
Spam, sausage, spam, spam, spam, bacon, spam tomato and spam
Spam, spam, spam, egg and spam
Spam, spam, spam, spam, spam, spam, baked beans, spam, spam, spam and spam.
{{filename="/images/Monty_python_foot.png" description="Av Agnolo Bronzino - Bronzino&#039;s Venus, Cupid, Folly and Time, authored by User:Husky., Offentlig eiendom, https://commons.wikimedia.org/w/index.php?curid=3595935"}}
The model is a reference model for developers, showcasing best practices and functionalities of a model.
It's a simple day degree model for an imagined pest, and when thresholds are passed, the warning status progresses.
{{filename="/images/DeadParrot.png" description="This is a dead parrot"}}
""",
"nb": """
Vel, det er egg og bacon,
Eggepølse og bacon
Egg og spam
Egg, bacon og spam
Egg, bacon, pølse og spam
Spam, bacon, pølse og spam
Spam, egg, spam, spam, bacon og spam
Spam, pølse, spam, spam, spam, bacon, spam tomat og spam
Spam, spam, spam, egg og spam
Spam, spam, spam, spam, spam, spam, baked beans, spam, spam, spam og spam.
{{filename="/images/Monty_python_foot.png" description="Av Agnolo Bronzino - Bronzino&#039;s Venus, Cupid, Folly and Time, authored by User:Husky., Offentlig eiendom, https://commons.wikimedia.org/w/index.php?curid=3595935"}}
Modellen er en referansemodell for utviklere, som viser beste praksis for modellutvikling.
Det er en enkel dagsgradsmodell for et tenkt skadedyr, og når terskler passeres, utvikler advarselsstatusen seg
{{filename="/images/DeadParrot.png" description="This is a dead parrot"}}
""",
}
......