Skip to content

Commit

Permalink
Remove dependency upper-caps and update
Browse files Browse the repository at this point in the history
Remove cached-property dep since functionality is provided by functools
in py38

Remove all upper version limits in main dependency block. Where kept,
justification comment is added

Upgraded pvandyken-deprecated dependency, which packages proper typing
support (thus, remove our own typings file)
  • Loading branch information
pvandyken committed Nov 29, 2023
1 parent 43b77f6 commit bef3139
Show file tree
Hide file tree
Showing 6 changed files with 905 additions and 1,061 deletions.
1,790 changes: 886 additions & 904 deletions poetry.lock

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,24 @@ patterns = [
]

[tool.poetry.dependencies]
python = ">=3.8,<3.12"
# upper cap imposed by scipy
python = ">=3.8,<3.13"
# core dep with high breakage potential given plans for redesign, so
# keep upper limit
pybids = "^0.16.0"
snakemake = [
{ version = ">=5.28.0", python = ">=3.8" },
{ version = ">=7.18.2", python = ">=3.11" },
]
PyYAML = "^6"
PyYAML = ">=6"
typing-extensions = ">=3.10.0"
attrs = ">=21.2.0,<24"
attrs = ">=21.2.0"
boutiques = "^0.5.25"
more-itertools = ">=8,<11"
cached-property = "^1.5.2"
pvandyken-deprecated = "0.0.3"
more-itertools = ">=8"
# package developed in complete tandem with snakebids, so no need for a range
pvandyken-deprecated = "0.0.4"
# Need this until py39
importlib-resources = ">=5.12.0,<7"
importlib-resources = ">=5.12.0"

# Below are non-direct dependencies (i.e. dependencies of other depenencies)
# specified to ensure a version with a pre-built wheel is installed depending
Expand Down Expand Up @@ -78,12 +81,9 @@ hypothesis = "^6.34.1"
pytest-benchmark = "^4.0.0"
pyfakefs = "^5.1.0"
pyparsing = "^3.0.9"
# Version 1.1.312-1.1.315 have a false positive handling some nested function
# calls
pathvalidate = "^3.0.0"
# As of pyright==1.1.327 only 1.1.324 is bug free
pyright = "==1.1.324"
ruff = "^0.0.285"
ruff = "^0.0.290"
pytest-xdist = "^3.3.1"
pytest-split = "^0.8.1"
tomli = "^2.0.1"
Expand Down
16 changes: 8 additions & 8 deletions snakebids/core/datasets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import functools as ft
import itertools as it
import textwrap
import warnings
Expand All @@ -11,7 +12,6 @@
import attr
import more_itertools as itx
from bids import BIDSLayout
from cached_property import cached_property
from pvandyken.deprecated import deprecated
from snakemake.io import expand as sn_expand
from typing_extensions import Self, TypedDict
Expand Down Expand Up @@ -654,7 +654,7 @@ def pformat(self, max_width: int | float | None = None, tabstop: int = 4) -> str
]
return "\n".join(output)

@cached_property
@ft.cached_property
@deprecated(
details="""
The behaviour of path will change in an upcoming release, where it will refer
Expand All @@ -670,7 +670,7 @@ def path(self) -> dict[str, str]:
"""
return {key: value.path for key, value in self.items()}

@cached_property
@ft.cached_property
@deprecated(
details="""
The behaviour of zip_lists will change in an upcoming release, where it will
Expand All @@ -687,7 +687,7 @@ def zip_lists(self) -> dict[str, ZipList]:
"""
return {key: value.zip_lists for key, value in self.items()}

@cached_property
@ft.cached_property
@deprecated(
details="""
The behaviour of entities will change in the 1.0 release, where it will refer
Expand All @@ -704,7 +704,7 @@ def entities(self) -> dict[str, MultiSelectDict[str, list[str]]]:
"""
return {key: value.entities for key, value in self.items()}

@cached_property
@ft.cached_property
@deprecated(
details="""
The behaviour of wildcards will change in an upcoming release, where it will
Expand All @@ -721,7 +721,7 @@ def wildcards(self) -> dict[str, MultiSelectDict[str, str]]:
"""
return {key: value.input_wildcards for key, value in self.items()}

@cached_property
@ft.cached_property
def subjects(self) -> list[str]:
"""A list of the subjects in the dataset."""
return [
Expand All @@ -732,7 +732,7 @@ def subjects(self) -> list[str]:
}
]

@cached_property
@ft.cached_property
def sessions(self) -> list[str]:
"""A list of the sessions in the dataset."""
return [
Expand All @@ -743,7 +743,7 @@ def sessions(self) -> list[str]:
}
]

@cached_property
@ft.cached_property
def subj_wildcards(self) -> dict[str, str]:
"""The subject and session wildcards applicable to this dataset.
Expand Down
7 changes: 0 additions & 7 deletions typings/cached_property.pyi

This file was deleted.

19 changes: 0 additions & 19 deletions typings/pvandyken/deprecated/__init__.pyi

This file was deleted.

112 changes: 0 additions & 112 deletions typings/pvandyken/deprecated/deprecated.pyi

This file was deleted.

0 comments on commit bef3139

Please sign in to comment.