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 = [ ...@@ -19,7 +19,7 @@ dependencies = [
"pydantic", "pydantic",
"pytz", "pytz",
"pandas", "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" 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 = """ ...@@ -16,6 +16,7 @@ LICENSE = """
You should have received a copy of the GNU Affero General Public 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/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
""" """
import pathlib
from vipscore_common.vips_model import VIPSModel from vipscore_common.vips_model import VIPSModel
from vipscore_common.entities import Result, ModelConfiguration, WeatherObservation from vipscore_common.entities import Result, ModelConfiguration, WeatherObservation
...@@ -129,13 +130,20 @@ class ReferenceModel(VIPSModel): ...@@ -129,13 +130,20 @@ class ReferenceModel(VIPSModel):
def get_model_description(self, language = VIPSModel.default_language) -> str: 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>)""" """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. # This method (get_text_with_base64_encoded_images) is defined in the VIPSModel base class
It's a simple day degree model for an imagined pest, and when thresholds are passed, the warning status progresses. 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: 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>)""" """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")) return translations.wsi.get(language, translations.wsi.get(VIPSModel.default_language, "NOT FOUND"))
def get_model_usage(self, language = VIPSModel.default_language) -> str: def get_model_usage(self, language = VIPSModel.default_language) -> str:
......
...@@ -24,29 +24,17 @@ name = { ...@@ -24,29 +24,17 @@ name = {
description = { description = {
"en": """ "en": """
Well, there's egg and bacon, {{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"}}
Egg sausage and bacon The model is a reference model for developers, showcasing best practices and functionalities of a model.
Egg and spam It's a simple day degree model for an imagined pest, and when thresholds are passed, the warning status progresses.
Egg, bacon and spam {{filename="/images/DeadParrot.png" description="This is a dead parrot"}}
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.
""", """,
"nb": """ "nb": """
Vel, det er egg og bacon, {{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"}}
Eggepølse og bacon Modellen er en referansemodell for utviklere, som viser beste praksis for modellutvikling.
Egg og spam Det er en enkel dagsgradsmodell for et tenkt skadedyr, og når terskler passeres, utvikler advarselsstatusen seg
Egg, bacon og spam {{filename="/images/DeadParrot.png" description="This is a dead parrot"}}
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.
""", """,
} }
......