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

Target

Select target project
  • VIPS/vipscore-python-common
1 result
Select Git revision
Show changes
Commits on Source (2)
......@@ -8,7 +8,7 @@ This is the source code for the module that contains the common data models and
# From local path, if you've cloned the Git repo
pip3 install /home/foo/vipscore-python-common/
# From GitLab
pip3 install git+https://gitlab.nibio.no/VIPS/vipscore-python-common.git@v0.2.2
pip3 install git+https://gitlab.nibio.no/VIPS/vipscore-python-common.git@v0.2.3
```
...where the version is specified after the `@`
......
......@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "vipscore_common"
version = "0.2.2"
version = "0.2.3"
description = "Tools for the VIPSCore-Python web services and its models"
readme = "README.md"
authors = [{ name="Tor-Einar Skog", email="tor-einar.skog@nibio.no" }]
......@@ -27,7 +27,7 @@ requires-python = ">=3.9"
dev = ["bumpver", "pytest"]
[tool.bumpver]
current_version = "0.2.2"
current_version = "0.2.3"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "bump version {old_version} -> {new_version}"
commit = true
......
......@@ -73,14 +73,14 @@ class Result(BaseModel):
if v is not None and not isinstance(v, Point) and not isinstance(v, Polygon):
raise ValueError("%s is not a " % v)
def set_value(self, key, value):
def set_value(self, namespace, key, value):
temp_all_values = json.loads(self.all_values)
temp_all_values[key] = value
temp_all_values["%s.%s" %(namespace, key)] = value
self.all_values = json.dumps(temp_all_values)
def get_value(self, key):
def get_value(self, namespace, key):
temp_all_values = json.loads(self.all_values)
return temp_all_values.get(key)
return temp_all_values.get("%s.%s" %(namespace, key))
def set_all_values(self, values_dict):
self.all_values = json.dumps(values_dict)
......
......@@ -11,7 +11,7 @@ class TestEntities(unittest.TestCase):
valid_time_start = datetime.fromisoformat("2015-03-01T00:00:00+01:00"), # valid_time_start
valid_time_end = None,
warning_status = 2,
all_values = json.dumps({"TM":2})
all_values = json.dumps({"WEATHER.TM":2})
)
r = Result(
......@@ -20,7 +20,7 @@ class TestEntities(unittest.TestCase):
warning_status = 2
)
r.set_value("TM",2)
r.set_value("WEATHER","TM",2)
def test_weather_elements(self):
self.assertEquals("TM",WeatherElements.TEMPERATURE_MEAN)
\ No newline at end of file