Skip to content

Commit 1d22280

Browse files
committed
refactor 'database' to scans_database
1 parent 75a1aa3 commit 1d22280

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

GEECS-Data-Utils/geecs_data_utils/database/builder.py renamed to GEECS-Data-Utils/geecs_data_utils/scans_database/builder.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Provides utilities to construct partitioned parquet 'scans database'.
2+
Provides utilities to construct partitioned parquet 'scans scans_database'.
33
44
Structured metadata records (`ScanEntry`) are created for each scan.
55
Supports streaming scan metadata to Parquet format for persistent
@@ -30,8 +30,8 @@
3030

3131
from geecs_data_utils.scan_data import ScanData
3232
from geecs_data_utils.utils import ScanTag
33-
from geecs_data_utils.database.entries import ScanEntry, ScanMetadata
34-
from geecs_data_utils.database.database import ScanDatabase
33+
from geecs_data_utils.scans_database.entries import ScanEntry, ScanMetadata
34+
from geecs_data_utils.scans_database.database import ScanDatabase
3535
from geecs_data_utils.type_defs import parse_ecs_dump
3636

3737
logger = logging.getLogger(__name__)
@@ -216,7 +216,7 @@ def build_from_directory(
216216
Returns
217217
-------
218218
ScanDatabase
219-
In-memory database containing all found scan entries.
219+
In-memory scans_database containing all found scan entries.
220220
"""
221221
db = ScanDatabase()
222222
scan_counter = 0
@@ -281,7 +281,7 @@ def stream_to_parquet(
281281
}
282282
except Exception as e:
283283
logger.warning(
284-
f"Could not load existing database for deduplication: {e}"
284+
f"Could not load existing scans_database for deduplication: {e}"
285285
)
286286

287287
buffer = []

GEECS-Data-Utils/geecs_data_utils/database/database.py renamed to GEECS-Data-Utils/geecs_data_utils/scans_database/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Provides a searchable interface to a partitioned scans database stored in Parquet format.
2+
Provides a searchable interface to a partitioned scans scans_database stored in Parquet format.
33
44
This module defines the `ScanDatabase` class, which enables efficient querying of
55
experiment scan metadata stored as a Hive-style partitioned Parquet dataset (partitioned

GEECS-Data-Utils/geecs_data_utils/database/entries.py renamed to GEECS-Data-Utils/geecs_data_utils/scans_database/entries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Scan database entry schema.
2+
Scan scans_database entry schema.
33
44
This module defines structured models for representing scan entries and
55
associated metadata in the GEECS data ecosystem. These models are used
@@ -17,7 +17,7 @@
1717
Notes
1818
-----
1919
These models are primarily intended for use in building and querying a
20-
structured scan database using the `ScanDatabase` class. The models use
20+
structured scan scans_database using the `ScanDatabase` class. The models use
2121
Pydantic for data validation and serialization.
2222
"""
2323

GEECS-Data-Utils/geecs_data_utils/database/filter_models.py renamed to GEECS-Data-Utils/geecs_data_utils/scans_database/filter_models.py

File renamed without changes.

GEECS-Data-Utils/geecs_data_utils/database/filters/scan_filters.yml renamed to GEECS-Data-Utils/geecs_data_utils/scans_database/filters/scan_filters.yml

File renamed without changes.

GEECS-Data-Utils/geecs_data_utils/database/filters/undulator.yml renamed to GEECS-Data-Utils/geecs_data_utils/scans_database/filters/undulator.yml

File renamed without changes.

GEECS-Data-Utils/tests/test_builder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
from pathlib import Path
1515
from datetime import date
1616

17-
from geecs_data_utils.database.builder import ScanDatabaseBuilder
18-
from geecs_data_utils.database.database import ScanDatabase
19-
from geecs_data_utils.database.entries import ScanEntry
17+
from geecs_data_utils.scans_database.builder import ScanDatabaseBuilder
18+
from geecs_data_utils.scans_database.database import ScanDatabase
19+
from geecs_data_utils.scans_database.entries import ScanEntry
2020

2121

2222
TEST_DATA_ROOT = Path("/Volumes/hdna2/data")
@@ -27,7 +27,7 @@ def test_scan_database_builder_runs():
2727
Test building a ScanDatabase from a single scan directory.
2828
2929
This test verifies that:
30-
- The database is built without error.
30+
- The scans_database is built without error.
3131
- A single scan entry is returned.
3232
- The scan entry contains valid metadata, file paths, and devices.
3333

0 commit comments

Comments
 (0)