Skip to content

DQ 45 Update Dependency Versions#5

Merged
laura-iris merged 38 commits intomainfrom
dq-45-update-dependencies
Mar 11, 2026
Merged

DQ 45 Update Dependency Versions#5
laura-iris merged 38 commits intomainfrom
dq-45-update-dependencies

Conversation

@laura-iris
Copy link
Collaborator

  • Moves onto python 3.12
  • Updates dependencies and moves off of deprecated methods
    • datetime conversions coming out of sqlite3
    • pandas: off of pd.append, now compiles a list and then concats them together into the dataframe; off of deprecated .ix syntax; only average (etc) on numeric columns now;
    • string matching: added r to match to a raw string literal - to explicitly match on asterisk instead of interpreting \ as an escape
    • kivy: off deprecated allow_stretch and keep_ratio, onto fit_mode
  • Cleans up old commented-out code
  • Updates references away from IRIS and to EarthScope
  • Formatting changes

@gillian-earthscope
Copy link
Collaborator

gillian-earthscope commented Jan 27, 2026

The example file preference_file_IRIS.py needs to be updated. As it is, it doesn't work and returns this error:
Will parse XML using IRIS Traceback (most recent call last): File "/Users/gilliansharer/git_work/quarg/findIssues.py", line 192, in <module> metadataDF = reportUtils.getMetadata( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/gilliansharer/git_work/quarg/reportUtils.py", line 646, in getMetadata DF = parse_XML(metadataSource, df_cols) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/gilliansharer/git_work/quarg/reportUtils.py", line 410, in parse_XML xtree = et.parse(xml_file) ^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/quarg/lib/python3.12/xml/etree/ElementTree.py", line 1204, in parse tree.parse(source, parser) File "/opt/anaconda3/envs/quarg/lib/python3.12/xml/etree/ElementTree.py", line 558, in parse source = open(source, "rb") ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'IRIS'

In preference_file_IRIS.py, when I replace IRIS with metricSource = 'EarthScope' and metadataSource = 'EarthScope', it runs and generates an issue file.

@gillian-earthscope
Copy link
Collaborator

CHANGELOG.txt should be updated, including a warning that previous versions of preference files pointing to IRIS will not work (or can that be grandfathered into the code so that both EarthScope and IRIS works?).

@gillian-earthscope
Copy link
Collaborator

Not sure if this is relevant to the pull request, but when I try to run "Metric Plot", I get an error:
http://service.earthscope.org/mustang/measurements/1/query?metric=sample_mean&net=IU&sta=CCM&loc=10&cha=BHZ&format=text&timewindow=2026-01-19,2026-01-26&orderby=start_asc&nodata=404 Error producing plot. http://service.earthscope.org/mustang/measurements/1/query?metric=percent_availability&net=IU&sta=CCM&loc=10&cha=BHZ&format=text&timewindow=2026-01-19,2026-01-26&orderby=start_asc&nodata=404 Error producing plot.

if there is only one metric value in the timespan, I get an error and an additional warning:
http://service.earthscope.org/mustang/measurements/1/query?metric=sample_mean&net=IU&sta=ADK&loc=00&cha=HHZ&format=text&timewindow=2026-01-19,2026-01-26&orderby=start_asc&nodata=404 Error producing plot. [WARNING] Locator attempting to generate 2253 ticks ([19350.0, ..., 21602.0]), which exceeds Locator.MAXTICKS (1000).

@gillian-earthscope
Copy link
Collaborator

In the report xml, there are 2 links (GOAT/data_available and Seismiquery) that now forward to the 'Seismiquery is disabled' page. Consider removing.

@laura-iris
Copy link
Collaborator Author

I think that I've addressed all of your comments at this point, let me know if any of it seems incomplete or still doesn't work.

@gillian-earthscope
Copy link
Collaborator

Looks good, except debug output should be turned off before merging to main.

@laura-iris laura-iris merged commit 0631f25 into main Mar 11, 2026
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.

2 participants