Skip to content

Commit e7da07c

Browse files
committed
- Move .data into tests/.data, clarifying its usage
-- Update logic and tests to handle this directory -- Update gitignore to stop tracking temporary folders (`tests/.data` and `.pipelines/*/`) Changes to be committed: deleted: .data/ztbeMA28ILtxhTRp_mnCXhJYSARd/fc2yNy-pQG2J5fqcRs99tA/generate_c11_c12_dataset/run_calculations/6245/input.gjf deleted: .data/ztbeMA28ILtxhTRp_mnCXhJYSARd/fc2yNy-pQG2J5fqcRs99tA/generate_c11_c12_dataset/run_calculations/6245/input_smiles.txt deleted: .data/ztbeMA28ILtxhTRp_mnCXhJYSARd/fc2yNy-pQG2J5fqcRs99tA/generate_c11_c12_dataset/run_calculations/6245/molecule.mol deleted: .data/ztbeMA28ILtxhTRp_mnCXhJYSARd/manifest.json modified: .gitignore modified: src/parse_patrol/databases/nomad/utils.py modified: tests/example_integration_test.py modified: tests/test_nomad_integration.py
1 parent caf0b67 commit e7da07c

8 files changed

Lines changed: 11 additions & 167 deletions

File tree

.data/ztbeMA28ILtxhTRp_mnCXhJYSARd/fc2yNy-pQG2J5fqcRs99tA/generate_c11_c12_dataset/run_calculations/6245/input.gjf

Lines changed: 0 additions & 79 deletions
This file was deleted.

.data/ztbeMA28ILtxhTRp_mnCXhJYSARd/fc2yNy-pQG2J5fqcRs99tA/generate_c11_c12_dataset/run_calculations/6245/input_smiles.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.data/ztbeMA28ILtxhTRp_mnCXhJYSARd/fc2yNy-pQG2J5fqcRs99tA/generate_c11_c12_dataset/run_calculations/6245/molecule.mol

Lines changed: 0 additions & 79 deletions
This file was deleted.

.data/ztbeMA28ILtxhTRp_mnCXhJYSARd/manifest.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# Repo
2-
.data
1+
# Project folders
2+
.pipelines/data
3+
.pipelines/resources
4+
.pipelines/scripts
5+
tests/.data
36

47
# VS Code
58
.vscode/

src/parse_patrol/databases/nomad/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,18 @@ def nomad_search_entries(
178178
raise Exception(f"Failed to query NOMAD API: {str(e)}")
179179

180180

181-
def nomad_get_raw_files(entry_id: str) -> str:
182-
"""Download and extract NOMAD raw files to .data directory.
181+
def nomad_get_raw_files(entry_id: str, data_root: str='tests/.data') -> str:
182+
"""Download and extract NOMAD raw files.
183183
184184
Args:
185185
entry_id: NOMAD entry ID
186+
data_root: Optional root directory for downloads. Defaults to tests/.data if not specified.
186187
187188
Returns:
188189
Path to extracted files directory
189190
"""
190191
# Create entry-specific directory
191-
data_dir = Path(".data") / entry_id
192+
data_dir = Path(data_root) / entry_id
192193
data_dir.mkdir(parents=True, exist_ok=True)
193194

194195
# Check if files already downloaded

tests/example_integration_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_simple_download_and_parse():
144144
# Clean up
145145
try:
146146
import shutil
147-
data_dir = Path(".data")
147+
data_dir = Path("tests/.data")
148148
if data_dir.exists():
149149
shutil.rmtree(data_dir)
150150
print(" 🧹 Cleaned up downloaded files")

tests/test_nomad_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def cleanup(self):
9090
shutil.rmtree(self.temp_dir)
9191

9292
# Also clean up .data directory entries we created
93-
data_dir = Path(".data")
93+
data_dir = Path("tests/.data")
9494
if data_dir.exists():
9595
for entry_id in self.downloaded_entries:
9696
entry_path = data_dir / entry_id

0 commit comments

Comments
 (0)