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

Dev jojomale #85

Merged
merged 26 commits into from
Dec 11, 2024
Merged

Dev jojomale #85

merged 26 commits into from
Dec 11, 2024

Conversation

PeterMakus
Copy link
Owner

jojomale and others added 23 commits November 6, 2024 10:33
Replace `or` by `|` in union types.
- Introduce `waveform.Local_store_client` to access existing sds data base
- introduce additional input parameters `stationxml_file`,  `sds_dir`, `sds_fmtstr` to allow for datafiles to be in different locations on the computer and to have different filenames than the standard sds-pattern.
- `Correlator` can be called without providing an externally defined client. In this case, it creates a Local_store_client from the parameter file.
original requirements caused UserWarnings with h5py and mpi4py/openmpi upon import, although the execution of seismic didn't seem to suffer.
The updated package versions were obtained by uninstalling and reinstalling the respective packages without version restriction in the same conda environment.
commit 17593c649bcdc7b65af19336564eee4c4815d26c
Author: jojomale <jlehr@gfz-potsdam.de>
Date:   Wed Dec 4 15:10:06 2024 +0100

    Update tests to new Correlator and config parameters.

commit f4f882a01480512a89d690770e68db80fdac6ea5
Author: jojomale <jlehr@gfz-potsdam.de>
Date:   Wed Dec 4 14:56:47 2024 +0100

    Update documentation to new Correlator and config parameters.

commit 695068ab0551ba3561f3d2375843937f8718332d
Author: jojomale <jlehr@gfz-potsdam.de>
Date:   Wed Dec 4 14:11:54 2024 +0100

    Change order of input params in Correlator.

    With the new Local_Store_Client, there is no need to have a download
    client at all. Thus it is more intuitive to
    have the store_client as an optional
    argument. The local store client will
    be initiated with the Correlator from
    the configs.
…tories

1. default directories
If parameters `sds_fmtstr`, `stationxml_fie` or `sds_dir` is not set in  config-dict, a default value is added.

2. The previous Local_Store_Client could not be initiated if e.g. the inventory directory was empty or did not exist. This condition is tested during init of the parent class. It may notably occur if the default values are not provided. The AttributeError is now caught and an empty Inventory returned.

3. Added tests for Local_Store_Client.
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 97.05882% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.84%. Comparing base (97057c5) to head (9c956dc).
Report is 21 commits behind head on dev.

Files with missing lines Patch % Lines
src/seismic/trace_data/waveform.py 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #85      +/-   ##
==========================================
+ Coverage   69.55%   69.84%   +0.29%     
==========================================
  Files          18       18              
  Lines        3889     3983      +94     
  Branches      860      792      -68     
==========================================
+ Hits         2705     2782      +77     
- Misses       1047     1057      +10     
- Partials      137      144       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

jojomale added 3 commits December 11, 2024 11:02
The tests for the Local_Store_Client failed on Windows because directory paths were not equal. The reference path did not contain backward-slashes. Now, both os.path.normpath is operated on both paths to ensure correct separators.
@PeterMakus PeterMakus merged commit aefc8de into dev Dec 11, 2024
4 checks passed
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.

1 participant