-
-
Notifications
You must be signed in to change notification settings - Fork 369
t.rast.extract: Handle fully qualified map names and semantic labels #6300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
for k, v in expected_info.items(): | ||
assert ( | ||
strds_info[k] == v | ||
), f"Expected value for key '{k}' is {v}. Got: {strds_info[k]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the default behavior of pytest not enough for dictionaries when developing your tests?
(Like for a bad value, missing, and extra keys)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to check only a subset of the metadata keys. And unfortunately, it did not print out the key when I compared values are as expected. Are you aware of any build-in methods in pytest that would allow to test if a dictionary is covered by another (regardless of the order of keys and the like...)? I would be happy to adjust and drop the loop...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't check this 100%, but generally it looks good.
temporal/t.rast.extract/testsuite/test_t_rast_extract_pytest.py
Outdated
Show resolved
Hide resolved
temporal/t.rast.extract/testsuite/test_t_rast_extract_pytest.py
Outdated
Show resolved
Hide resolved
temporal/t.rast.extract/testsuite/test_t_rast_extract_pytest.py
Outdated
Show resolved
Hide resolved
temporal/t.rast.extract/testsuite/test_t_rast_extract_pytest.py
Outdated
Show resolved
Hide resolved
temporal/t.rast.extract/testsuite/test_t_rast_extract_pytest.py
Outdated
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I had to address semantic_labels better as well. They were introduced after the extract module was created... The new tests cover semantic labels... |
This PR appends semantic labels to the basename when expression is given for extraction of raster maps and handles fully qualified STRDS names more reliably. It also adds a pytest based testcase.
Fixes #6254