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

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
Copy link
Member

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

@krischer
Copy link
Member

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat

@megies
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..

@megies megies added the .core.inventory issues related to our Inventory functionality label Jun 28, 2017
@megies megies added this to the 1.1.0 milestone Jun 28, 2017
@Jollyfant
Copy link
Contributor Author

Added a basic test. Is Jane actively undergoing development?

@krischer
Copy link
Member

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 krischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this a proper argument to _write_stationxml().

@megies
Copy link
Member

megies commented Jul 1, 2017

Do we want a changelog for this PR?

@Jollyfant
Copy link
Contributor Author

Added to change log.

@krischer
Copy link
Member

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

@Jollyfant Jollyfant merged commit 5b057eb into obspy:master Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.core.inventory issues related to our Inventory functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants