-
Notifications
You must be signed in to change notification settings - Fork 3
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 tests for XML writer #13
Conversation
Preview page for your plugin is ready here: |
90570b9
to
f518898
Compare
Preview page for your plugin is ready here: |
This has fixed saving of a single layer to xml, but the multiple layer writing (e.g. >1 points layer to a single XML file) still seems to be broken for me. |
f518898
to
89c0d7d
Compare
Preview page for your plugin is ready here: |
Thanks for testing. I've refactored the code a bit to reduce duplication, and it seems to be working for me locally. @adamltyson could you check again? The tests failing are unrelated, and fixed in #15 |
Maybe I mistyped on my last comment, because now I can save multiple layers, but not a single layer. I get:
|
I can reproduce that. The multiple writer seems capable of saving data from a single layer though (at least from local tests), so I'd propose that we remove the single layer writer and have just one points writer that can hangle both single and multiple layers? |
89c0d7d
to
a094f12
Compare
Codecov Report
@@ Coverage Diff @@
## master #13 +/- ##
===========================================
+ Coverage 23.55% 37.86% +14.31%
===========================================
Files 12 12
Lines 276 272 -4
===========================================
+ Hits 65 103 +38
+ Misses 211 169 -42
Continue to review full report at Codecov.
|
Preview page for your plugin is ready here: |
Yep, I'm not sure why there are multiple writers (maybe old npe?). As long as N cell layers can be saved to a single xml file that's fine. |
paths = writer_xml.write_multiple_points_to_xml( | ||
str(tmpdir / "multiple.xml"), 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.
I assume this method can't handle Path
objects?
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 guess it should be able to. The file will eventually just be opened with open
.
This should fix #10 (the XML writers not working), and adds associated tests.
Note that the XML "multiple file" writer works fine for writing a single file to (as far as I can tell from local testing), so to reduce code duplication and the number of options in the plugin menu I've removed the "single file" writer.