Skip to content

Commit c8219de

Browse files
authored
Merge pull request #278 from kujaku11/patches
Updated EMTFXML Location to include datum and declination information.
2 parents 94de6a6 + 5e5c26e commit c8219de

File tree

16 files changed

+134
-69
lines changed

16 files changed

+134
-69
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
7474
- name: Generate changelog
7575
run: |
76-
git cliff -o CHANGELOG.md
76+
git cliff --unreleased --tag v${{ steps.version.outputs.version }} -o CHANGELOG.md
7777
echo "Generated changelog for version ${{ steps.version.outputs.version }}"
7878
7979
- name: Update HISTORY.rst

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
Changelog
2-
All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.All notable changes to this project will be documented in this file.
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.

CHANGELOG.rst

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
1-
Changelog All notable changes to this project will be documented in this
2-
file.All notable changes to this project will be documented in this
3-
file.All notable changes to this project will be documented in this
4-
file.All notable changes to this project will be documented in this
5-
file.All notable changes to this project will be documented in this
6-
file.All notable changes to this project will be documented in this
7-
file.All notable changes to this project will be documented in this
8-
file.All notable changes to this project will be documented in this
9-
file.All notable changes to this project will be documented in this
10-
file.All notable changes to this project will be documented in this
11-
file.All notable changes to this project will be documented in this
12-
file.All notable changes to this project will be documented in this
13-
file.All notable changes to this project will be documented in this
14-
file.All notable changes to this project will be documented in this
15-
file.All notable changes to this project will be documented in this
16-
file.All notable changes to this project will be documented in this
17-
file.All notable changes to this project will be documented in this
18-
file.All notable changes to this project will be documented in this
19-
file.All notable changes to this project will be documented in this
20-
file.All notable changes to this project will be documented in this
21-
file.All notable changes to this project will be documented in this
22-
file.All notable changes to this project will be documented in this
23-
file.All notable changes to this project will be documented in this
24-
file.All notable changes to this project will be documented in this
25-
file.All notable changes to this project will be documented in this
26-
file.All notable changes to this project will be documented in this
27-
file.All notable changes to this project will be documented in this
28-
file.All notable changes to this project will be documented in this
29-
file.
1+
Changelog
2+
=========
3+
4+
All notable changes to this project will be documented in this file.

HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,3 +280,7 @@ file.All notable changes to this project will be documented in this
280280
file.All notable changes to this project will be documented in this
281281
file.All notable changes to this project will be documented in this
282282
file.
283+
Changelog
284+
=========
285+
286+
All notable changes to this project will be documented in this file.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# mt_metadata version 1.0.3
1+
# mt_metadata version 1.0.4
22
Standard MT metadata
33

44
[![PyPi version](https://img.shields.io/pypi/v/mt_metadata.svg)](https://pypi.python.org/pypi/mt-metadata)
@@ -28,7 +28,7 @@ MT Metadata is a project led by [IRIS-PASSCAL MT Software working group](https:/
2828

2929
Most people will be using the transfer functions, but a lot of that metadata comes from the time series metadata. This module supports both and has tried to make them more or less seamless to reduce complication.
3030

31-
* **Version**: 1.0.3
31+
* **Version**: 1.0.4
3232
* **Free software**: MIT license
3333
* **Documentation**: https://mt-metadata.readthedocs.io.
3434
* **Examples**: Click the `Binder` badge above and Jupyter Notebook examples are in **mt_metadata/examples/notebooks** and **docs/source/notebooks**

cliff.toml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
[changelog]
2-
header = """# Changelog
2+
header = """
3+
# Changelog
34
45
All notable changes to this project will be documented in this file.
56
"""
67

78
body = """
89
{% for group, commits in commits | group_by(attribute="group") %}
9-
## {{ group | upper_first }}
10-
{% for commit in commits %}
11-
- {% if commit.breaking %}[**BREAKING**] {% endif %}{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))
12-
{% endfor %}
10+
## {{ group | upper_first }}
11+
{% for commit in commits %}
12+
- {% if commit.breaking %}[**BREAKING**] {% endif %}{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/kujaku11/mth5/commit/{{ commit.id }}))
13+
{% endfor %}
14+
1315
{% endfor %}
1416
"""
1517

@@ -26,11 +28,16 @@ commit_parsers = [
2628
{ message = "^refactor", group = "Refactor" },
2729
{ message = "^style", group = "Styling" },
2830
{ message = "^test", group = "Testing" },
29-
{ message = "^chore\\(release\\): prepare for", skip = true },
30-
{ message = "^chore\\(deps\\)", skip = true },
31-
{ message = "^chore\\(pr\\)", skip = true },
32-
{ message = "^chore\\(pull\\)", skip = true },
31+
{ message = "^chore(release): prepare for", skip = true },
32+
{ message = "^chore(deps)", skip = true },
33+
{ message = "^chore(pr)", skip = true },
34+
{ message = "^chore(pull)", skip = true },
35+
{ message = "^chore|^ci", skip = true },
3336
{ message = "^chore", group = "Miscellaneous Tasks" },
3437
{ body = ".*security", group = "Security" },
3538
{ message = "^revert", group = "Revert" },
3639
]
40+
41+
# Skip commits that only bump versions
42+
filter_commits = true
43+
skip_tags = "v0.1.0-beta.1"

code.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
"name": "mt-metadata",
44
"organization": "U.S. Geological Survey",
55
"description": "A Python module to handle/validate/read/write metadata in general but mainly for magnetotelluric data including time series, transfer functions, and Fourier coefficients. Formats include JSON, XML, text files.",
6-
"version": "v1.0.3",
6+
"version": "v1.0.4",
77
"status": "Production",
88
"permissions": {
99
"usageType": "openSource",
1010
"licenses": [
1111
{
1212
"name": "MIT",
13-
"URL": "https://code.usgs.gov/gmeg/mt-metadata/-/raw/v1.0.3/LICENSE.md"
13+
"URL": "https://code.usgs.gov/gmeg/mt-metadata/-/raw/v1.0.4/LICENSE.md"
1414
}
1515
]
1616
},
1717
"homepageURL": "https://code.usgs.gov/gmeg/mt_metadata",
18-
"downloadURL": "https://code.usgs.gov/gmeg/mt-metadata/-/archive/v1.0.3/mt-metadata-v1.0.3.zip",
19-
"disclaimerURL": "https://code.usgs.gov/gmeg/mt-metadata/-/raw/v1.0.3/DISCLAIMER.md",
18+
"downloadURL": "https://code.usgs.gov/gmeg/mt-metadata/-/archive/v1.0.4/mt-metadata-v1.0.4.zip",
19+
"disclaimerURL": "https://code.usgs.gov/gmeg/mt-metadata/-/raw/v1.0.4/DISCLAIMER.md",
2020
"repositoryURL": "https://code.usgs.gov/gmeg/mt_metadata.git",
2121
"tags": [
2222
"magnetotellurics",

mt_metadata/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
__author__ = """Jared Peacock"""
4141
__email__ = "jpeacock@usgs.gov"
42-
__version__ = "1.0.3"
42+
__version__ = "1.0.4"
4343

4444
# =============================================================================
4545
# Imports

mt_metadata/transfer_functions/io/emtfxml/emtfxml.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,9 @@ def station_metadata(self, station_metadata: Station) -> None:
11931193
self.site.location.latitude = sm.location.latitude
11941194
self.site.location.longitude = sm.location.longitude
11951195
self.site.location.elevation = sm.location.elevation
1196+
self.site.location.declination.value = sm.location.declination.value
1197+
self.site.location.declination.epoch = sm.location.declination.epoch
1198+
self.site.location.declination.model = sm.location.declination.model
11961199
self.site.orientation.angle_to_geographic_north = (
11971200
sm.orientation.angle_to_geographic_north
11981201
if sm.orientation.angle_to_geographic_north is not None

mt_metadata/transfer_functions/io/emtfxml/metadata/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from .data_quality_notes import DataQualityNotes
2828
from .data_quality_warnings import DataQualityWarnings
2929
from .orientation import Orientation
30+
from .location import Location
3031
from .site import Site
3132
from .instrument import Instrument
3233
from .electrode import Electrode
@@ -61,6 +62,7 @@
6162
"DataQualityNotes",
6263
"DataQualityWarnings",
6364
"Orientation",
65+
"Location",
6466
"Site",
6567
"Instrument",
6668
"Electrode",

0 commit comments

Comments
 (0)