Skip to content

Commit

Permalink
Use released version of leap-data-management-utils (#169)
Browse files Browse the repository at this point in the history
* Use released version of leap-data-management-utils

Fixing [broken catalog parsing](https://github.com/leap-stc/cmip6-leap-feedstock/actions/runs/9317854068)

* Update dump_bigquery_to_csv.py

* Update parse_catalog.yaml

* Update dump_bigquery_to_csv.py

* Update parse_catalog.yaml

* Update dump_bigquery_to_csv.py

* Update dump_bigquery_to_csv.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update parse_catalog.yaml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jbusecke and pre-commit-ci[bot] authored May 31, 2024
1 parent 81a41c2 commit a9682b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/parse_catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python-version: "3.9"
- name: Install dependencies
# TODO: base on an actual release
run: python -m pip install gcsfs git+https://github.com/leap-stc/leap-data-management-utils.git@factor-out-cmip
run: python -m pip install gcsfs "leap-data-management-utils[bigquery]==0.0.14"
- name: "Parse catalog"
shell: bash
run: |
Expand Down
6 changes: 5 additions & 1 deletion scripts/dump_bigquery_to_csv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from leap_data_management_utils import CMIPBQInterface
from leap_data_management_utils.bq_interfaces import CMIPBQInterface
from leap_data_management_utils.cmip_catalog import bq_df_to_intake_esm
import os
import gcsfs
Expand Down Expand Up @@ -32,6 +32,10 @@
)

if len(bq_df) > 0:
print(df_all.head().columns)
print(df_all.head().instance_id.tolist())
print(df_all.head().store.tolist())

intake_esm_df = bq_df_to_intake_esm(bq_df)
intake_esm_df.to_csv(filename, index=False)
if fs.exists(path):
Expand Down

0 comments on commit a9682b7

Please sign in to comment.