Skip to content

Commit 46825ee

Browse files
authored
[BACKPORT] [MAINT] Use major-minor branch for data with pooch (#141) (#148)
1 parent fe9e3be commit 46825ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/pybispectra/utils/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from multiprocessing import cpu_count
44
from typing import Callable
55
from warnings import warn
6+
from packaging.version import Version
67

78
import pooch
89
import numpy as np
@@ -452,6 +453,10 @@ def set_precision(precision: str) -> None:
452453

453454
DATASETS = {alias: filename for alias, filename, _ in _DATA_ALIAS_FILE_HASH}
454455

456+
if "dev" not in version:
457+
version = Version(version)
458+
version = f"{version.major}.{version.minor}" # take data from maj.min branch
459+
455460
_pooch = pooch.create(
456461
path=pooch.os_cache("PyBispectra"),
457462
base_url="https://github.com/braindatalab/PyBispectra/raw/{version}/data/",

0 commit comments

Comments
 (0)