Skip to content

Commit

Permalink
Update station_obj_from_row
Browse files Browse the repository at this point in the history
- make logic depend on mth5 file version
- re-add jupyter notebooks to tests to see if this has any effect there
  • Loading branch information
kkappler committed Jan 27, 2024
1 parent 6eec1df commit 94569c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ jobs:
pip install -e .
conda list
# - name: Install Jupyter and dependencies
# run: |
# pip install jupyter
# pip install ipykernel
# python -m ipykernel install --user --name aurora-test
# # Install any other dependencies you need
- name: Install Jupyter and dependencies
run: |
pip install jupyter
pip install ipykernel
python -m ipykernel install --user --name aurora-test
# Install any other dependencies you need
# - name: Execute Jupyter Notebooks
# run: |
# jupyter nbconvert --to notebook --execute docs/examples/dataset_definition.ipynb
# jupyter nbconvert --to notebook --execute docs/examples/make_cas04_single_station_h5.ipynb
# jupyter nbconvert --to notebook --execute docs/examples/operate_aurora.ipynb
# jupyter nbconvert --to notebook --execute tests/test_run_on_commit.ipynb
# jupyter nbconvert --to notebook --execute tutorials/pole_zero_fitting/lemi_pole_zero_fitting_example.ipynb
# jupyter nbconvert --to notebook --execute tutorials/processing_configuration.ipynb
# jupyter nbconvert --to notebook --execute tutorials/synthetic_data_processing.ipynb
# # Replace "notebook.ipynb" with your notebook's filename
- name: Execute Jupyter Notebooks
run: |
jupyter nbconvert --to notebook --execute docs/examples/dataset_definition.ipynb
jupyter nbconvert --to notebook --execute docs/examples/make_cas04_single_station_h5.ipynb
jupyter nbconvert --to notebook --execute docs/examples/operate_aurora.ipynb
jupyter nbconvert --to notebook --execute tests/test_run_on_commit.ipynb
jupyter nbconvert --to notebook --execute tutorials/pole_zero_fitting/lemi_pole_zero_fitting_example.ipynb
jupyter nbconvert --to notebook --execute tutorials/processing_configuration.ipynb
jupyter nbconvert --to notebook --execute tutorials/synthetic_data_processing.ipynb
# Replace "notebook.ipynb" with your notebook's filename
# - name: Commit changes (if any)
# run: |
Expand Down
9 changes: 4 additions & 5 deletions aurora/pipelines/process_mth5.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,11 @@ def station_obj_from_row(row):
station_obj:
"""
if row.survey == "none":
if row.mth5_obj.file_version == "0.1.0":
station_obj = row.mth5_obj.stations_group.get_station(row.station_id)
else:
station_obj = row.mth5_obj.stations_group.get_station(
row.station_id, survey=row.survey
)
elif row.mth5_obj.file_version == "0.1.0":
survey_group = row.mth5_obj.surveys_group.get_survey(row.survey)
station_obj = survey_group.stations_group.get_station(row.station_id)
return station_obj


Expand Down

0 comments on commit 94569c1

Please sign in to comment.