-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add dimension metadata and style #19
Conversation
ritvje
commented
Sep 26, 2023
- Add possibility to set dimension metadata through config
- Add possibility to set default style through config
- Add possibility to set dimension metadata through config - Add possibility to set default style through config
Tässä olikin näköjään jotain testejä, voin katsoa niitä ensi viikolla. |
Codecov Report
@@ Coverage Diff @@
## main #19 +/- ##
==========================================
- Coverage 93.51% 93.19% -0.32%
==========================================
Files 4 4
Lines 833 838 +5
==========================================
+ Hits 779 781 +2
- Misses 54 57 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Very nice features! Just a small request to test that the style addition is handled correctly.
if style is not None: | ||
# Add default style for layer | ||
layer = cat.get_layer(layer_name) | ||
layer._set_default_style(cat.get_style(style["name"], workspace=style["workspace"])) | ||
cat.save(layer) |
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 think covering this in the tests would be as simple as setting the default_style
in georest.tests.test_geoserver.CREATE_LAYERS_CONFIG
dictionary and an assert
or two to test_create_layers()
.
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.
Or even bette, make that a new test case based on test_create_layers()
that only checks for the style being handled properly with an assert
or two.
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.
Okay, I tried to add a test case for the style (but I'm not an expert in tests so I'm not sure if this is how it should be done)
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.
Looks good to me!