Skip to content

Commit

Permalink
Remove timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Dec 9, 2024
1 parent ad14219 commit ea6adc6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/fixtures/integration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Pytest fixtures for integration tests."""

from datetime import datetime
from pathlib import Path

import pooch
Expand Down Expand Up @@ -28,20 +27,15 @@ def pooch_registry() -> dict:
base_url=f"{GIN_TEST_DATA_REPO}/raw/master/test_data",
)

# Download the registry file from GIN
# Force to download it fresh every time by using a timestamped filename
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
# Download only the registry file from GIN
# if known_hash = None, the file is always downloaded.
file_registry = pooch.retrieve(
url=f"{GIN_TEST_DATA_REPO}/raw/master/files-registry.txt",
known_hash=None,
fname=f"files-registry_{timestamp}.txt",
path=Path.home() / ".crabs-exploration-test-data",
)

# Load registry file onto pooch registry
registry.load_registry(file_registry)

# Delete registry file
Path(file_registry).unlink()

return registry

0 comments on commit ea6adc6

Please sign in to comment.