Skip to content

Commit 21da0d4

Browse files
committed
ENH: include core indices in the github release package
1 parent e4d3bd9 commit 21da0d4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/external-indices.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
- name: Execute SQL Query and Generate Parquet Files
4848
run: |
49-
python scripts/python/external-indices.py
49+
python scripts/python/generate-indices.py
5050
env:
5151
PROJECT_ID: ${{ env.GCP_PROJECT }}
5252

scripts/python/external-indices.py renamed to scripts/python/generate-indices.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def main():
1111
project_id = os.getenv("PROJECT_ID")
1212
manager = IDCIndexDataManager(project_id=project_id)
1313
scripts_dir = Path(__file__).resolve().parent.parent
14+
1415
assets_dir = scripts_dir.parent / "assets"
1516

1617
# Collecting all .sql files from sql_dir and assets_dir
@@ -21,6 +22,15 @@ def main():
2122
index_df, output_basename = manager.execute_sql_query(file_path)
2223
index_df.to_parquet(f"{output_basename}.parquet")
2324

25+
core_indices_dir = scripts_dir.parent / "scripts" / "sql"
26+
27+
sql_files = [f for f in os.listdir(core_indices_dir) if f.endswith(".sql")]
28+
29+
for file_name in sql_files:
30+
file_path = core_indices_dir / file_name
31+
index_df, output_basename = manager.execute_sql_query(file_path)
32+
index_df.to_parquet(f"{output_basename}.parquet")
33+
2434

2535
if __name__ == "__main__":
2636
main()

0 commit comments

Comments
 (0)