Skip to content

Commit 3d38017

Browse files
committed
enh: use csv index only for now
fix minor formatting errors
1 parent 8b4ab7c commit 3d38017

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
id-token: write
4141
runs-on: ubuntu-latest
4242
if: github.event_name == 'release' && github.event.action == 'published'
43+
4344
steps:
4445
- uses: actions/download-artifact@v4
4546
with:

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
strategy:
5151
fail-fast: false
5252
matrix:
53-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
53+
python-version: ["3.8", "3.12"]
5454
runs-on: [ubuntu-latest, macos-latest, windows-latest]
5555

5656
#currently not working on pypi-3.10

scripts/python/idc_index_data_manager.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
class IDCIndexDataManager:
1515
def __init__(self, project_id: str):
1616
"""
17-
Initializes the IDCIndexDataManager.
17+
Initializes the IDCIndexDataManager using the Google Cloud Platform project ID.
1818
19-
Args:
20-
project_id (str): The Google Cloud Platform project ID.
2119
"""
2220
self.project_id = project_id
2321
self.client = bigquery.Client(project=project_id)
@@ -27,9 +25,6 @@ def execute_sql_query(self, file_path: str) -> tuple[pd.DataFrame, str]:
2725
"""
2826
Executes the SQL query in the specified file.
2927
30-
Args:
31-
file_path (str): The path to the file containing the SQL query.
32-
3328
Returns:
3429
Tuple[pd.DataFrame, str]: A tuple containing the DataFrame with query results,
3530
the output basename.
@@ -53,10 +48,6 @@ def generate_index_data_files(
5348
a DataFrame 'index_df'. The DataFrame is then saved as a compressed CSV
5449
and/or a Parquet file, depending on the method arguments.
5550
56-
Args:
57-
generate_compressed_csv (bool): If True, generates a zip compressed CSV file.
58-
generate_parquet (bool): If True, generates a Parquet file.
59-
6051
"""
6152

6253
scripts_dir = Path(__file__).parent.parent
@@ -83,7 +74,7 @@ def generate_index_data_files(
8374

8475
def run(self) -> None:
8576
"""
86-
Runs the IDCIndexDataManager process.
77+
Runs the IDCIndexDataManager to locally generate a index-data file (.czv.zip) by running queries against the Google Cloud Platform IDC project tables.
8778
"""
8879
self.generate_index_data_files(
8980
generate_compressed_csv=True, generate_parquet=False

src/idc_index_data/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
__all__ = [
2020
"__version__",
2121
"IDC_INDEX_CSV_ARCHIVE_FILEPATH",
22-
"IDC_INDEX_PARQUET_FILEPATH",
22+
# "IDC_INDEX_PARQUET_FILEPATH",
2323
]
2424

2525

@@ -35,4 +35,4 @@ def _lookup(path: str) -> Path:
3535

3636

3737
IDC_INDEX_CSV_ARCHIVE_FILEPATH: Path = _lookup("idc_index_data/idc_index.csv.zip")
38-
IDC_INDEX_PARQUET_FILEPATH: Path = _lookup("idc_index_data/idc_index.parquet")
38+
# IDC_INDEX_PARQUET_FILEPATH: Path = _lookup("idc_index_data/idc_index.parquet")

tests/test_package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ def test_version():
1212
def test_filepath():
1313
assert m.IDC_INDEX_CSV_ARCHIVE_FILEPATH.is_file()
1414
assert m.IDC_INDEX_CSV_ARCHIVE_FILEPATH.name == "idc_index.csv.zip"
15-
#assert m.IDC_INDEX_PARQUET_FILEPATH.is_file()
16-
#assert m.IDC_INDEX_PARQUET_FILEPATH.name == "idc_index.parquet"
15+
# assert m.IDC_INDEX_PARQUET_FILEPATH.is_file()
16+
# assert m.IDC_INDEX_PARQUET_FILEPATH.name == "idc_index.parquet"

0 commit comments

Comments
 (0)