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 level parameter to inventory.write stationXML #1830

Merged
merged 6 commits into from Jul 10, 2017

Conversation

@Jollyfant
Copy link
Contributor

Jollyfant commented Jun 28, 2017

Adds kwarg level for Inventory.write for StationXML. FDSNWS-Station supports these four levels and I wanted to try to use ObsPy running behind FDSNWS Station writing at different levels. Maybe it's useful.

@krischer

This comment has been minimized.

Copy link
Member

krischer commented Jun 28, 2017

Yea - would be very useful. This discussion here is also relevant: krischer/jane#33

@krischer

This comment has been minimized.

Copy link
Member

krischer commented Jun 28, 2017

Still requires a couple basic tests.

@@ -825,8 +825,12 @@ def _write_stationxml(inventory, file_or_file_object, validate=False,

etree.SubElement(root, "Created").text = _format_time(inventory.created)

level = kwargs.get("level") or "response"

This comment has been minimized.

Copy link
@megies

megies Jun 28, 2017

Member

could also do kwargs.get("level", "response")

This comment has been minimized.

Copy link
@Jollyfant

Jollyfant Jun 28, 2017

Author Contributor

Neat

@megies

This comment has been minimized.

Copy link
Member

megies commented Jun 28, 2017

Maybe this kwarg could also be added to Inventory/Network.select(), but maybe it's not so important there..

Jollyfant added 4 commits Jun 28, 2017
@Jollyfant

This comment has been minimized.

Copy link
Contributor Author

Jollyfant commented Jun 30, 2017

Added a basic test. Is Jane actively undergoing development?

@krischer

This comment has been minimized.

Copy link
Member

krischer commented Jun 30, 2017

Is Jane actively undergoing development?

It works and crucial bugs are fixed but currently there are no large efforts to add new features whatever these may be. We are definitely also open to pull and feature requests.

Copy link
Member

krischer left a comment

I only have a minor comment. Also please add a changelog entry. Otherwise this looks pretty good to me.

@@ -825,8 +825,12 @@ def _write_stationxml(inventory, file_or_file_object, validate=False,

etree.SubElement(root, "Created").text = _format_time(inventory.created)

level = kwargs.get("level", "response")

This comment has been minimized.

Copy link
@krischer

krischer Jun 30, 2017

Member

Please make this a proper argument to _write_stationxml().

@megies

This comment has been minimized.

Copy link
Member

megies commented Jul 1, 2017

Do we want a changelog for this PR?

@Jollyfant

This comment has been minimized.

Copy link
Contributor Author

Jollyfant commented Jul 10, 2017

Added to change log.

@krischer

This comment has been minimized.

Copy link
Member

krischer commented Jul 10, 2017

Looks pretty done to me. Can this be merged? Thanks a lot!

@Jollyfant Jollyfant merged commit 5b057eb into obspy:master Jul 10, 2017
5 of 6 checks passed
5 of 6 checks passed
docker-testbot docker testbot results not available yet
ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 97.61% of diff hit (target 90%)
Details
codecov/project 87.7% (+1.43%) compared to 9f951c1
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.