Skip to content
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

Merged
merged 6 commits into from
Oct 3, 2023
Merged

Conversation

ritvje
Copy link
Member

@ritvje 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
@ritvje
Copy link
Member Author

ritvje commented Sep 26, 2023

Tässä olikin näköjään jotain testejä, voin katsoa niitä ensi viikolla.

@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Merging #19 (d81daef) into main (7721ac3) will decrease coverage by 0.32%.
The diff coverage is 80.00%.

❗ Current head d81daef differs from pull request most recent head 2d4a3eb. Consider uploading reports for the commit 2d4a3eb to get more accurate results

@@            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     
Flag Coverage Δ
unittests 93.19% <80.00%> (-0.32%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
georest/tests/test_geoserver.py 100.00% <100.00%> (ø)
georest/__init__.py 81.10% <78.57%> (-0.83%) ⬇️

@ritvje ritvje requested a review from lahtinep October 2, 2023 08:13
Copy link
Contributor

@pnuu pnuu left a 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.

examples/create_layers.yaml Show resolved Hide resolved
examples/create_layers.yaml Show resolved Hide resolved
Comment on lines +131 to +135
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)
Copy link
Contributor

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().

Copy link
Contributor

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.

Copy link
Member Author

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)

Copy link
Collaborator

@lahtinep lahtinep left a 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!

@lahtinep lahtinep merged commit f23c1de into main Oct 3, 2023
6 checks passed
@lahtinep lahtinep deleted the feature-dimensions-and-style branch October 3, 2023 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants