Skip to content

Commit b1b74ff

Browse files
authored
Merge branch 'develop' into dev-define-engines-abc
2 parents 6495099 + 138e84a commit b1b74ff

File tree

14 files changed

+2719
-2723
lines changed

14 files changed

+2719
-2723
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
sudo apt update
3131
sudo apt-get install -y libopenslide-dev openslide-tools libopenjp2-7 libopenjp2-tools
3232
python -m pip install --upgrade pip
33-
python -m pip install ruff==0.4.10 pytest pytest-cov pytest-runner
33+
python -m pip install ruff==0.5.0 pytest pytest-cov pytest-runner
3434
pip install -r requirements/requirements.txt
3535
- name: Cache tiatoolbox static assets
3636
uses: actions/cache@v3

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ repos:
6060
- id: rst-inline-touching-normal # Detect mistake of inline code touching normal text in rst.
6161
- repo: https://github.com/astral-sh/ruff-pre-commit
6262
# Ruff version.
63-
rev: v0.4.10
63+
rev: v0.5.0
6464
hooks:
6565
- id: ruff
6666
args: [--fix, --exit-non-zero-on-fix]

benchmarks/annotation_store.ipynb

Lines changed: 2688 additions & 2688 deletions
Large diffs are not rendered by default.

benchmarks/annotation_store_alloc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ def main(
306306
# Skip memray if not installed
307307
return
308308
regex = re.compile(r"Total memory allocated:\s*([\d.]+)MB")
309-
pipe = subprocess.Popen(
310-
[ # noqa: S603
309+
pipe = subprocess.Popen( # noqa: S603
310+
[
311311
sys.executable,
312312
"-m",
313313
"memray",

examples/full-pipelines/slide-graph.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,6 @@
15771577
" loss.backward()\n",
15781578
" optimizer.step()\n",
15791579
"\n",
1580-
" #\n",
15811580
" loss = loss.detach().cpu().numpy()\n",
15821581
" assert not np.isnan(loss) # noqa: S101\n",
15831582
" wsi_labels = wsi_labels.cpu().numpy()\n",

examples/inference-pipelines/slide-graph.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,6 @@
11711171
" loss.backward()\n",
11721172
" optimizer.step()\n",
11731173
"\n",
1174-
" #\n",
11751174
" loss = loss.detach().cpu().numpy()\n",
11761175
" assert not np.isnan(loss) # noqa: S101\n",
11771176
" wsi_labels = wsi_labels.cpu().numpy()\n",

pre-commit/notebook_urls.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
def git_branch_name() -> str:
1515
"""Get the current branch name."""
1616
return (
17-
subprocess.check_output(
18-
["/usr/bin/git", "rev-parse", "--abbrev-ref", "HEAD"], # noqa: S603
17+
subprocess.check_output( # noqa: S603
18+
["/usr/bin/git", "rev-parse", "--abbrev-ref", "HEAD"],
1919
)
2020
.decode()
2121
.strip()
@@ -27,8 +27,8 @@ def git_branch_modified_paths(from_ref: str, to_ref: str) -> set[Path]:
2727
from_to = f"{from_ref}...{to_ref}"
2828
return {
2929
Path(p)
30-
for p in subprocess.check_output(
31-
[ # noqa: S603
30+
for p in subprocess.check_output( # noqa: S603
31+
[
3232
"/usr/bin/git",
3333
"diff",
3434
"--name-only",
@@ -45,8 +45,8 @@ def git_previous_commit_modified_paths() -> set[Path]:
4545
"""Get a set of file paths modified in the previous commit."""
4646
return {
4747
Path(p)
48-
for p in subprocess.check_output(
49-
["/usr/bin/git", "diff", "--name-only", "HEAD~"], # noqa: S603
48+
for p in subprocess.check_output( # noqa: S603
49+
["/usr/bin/git", "diff", "--name-only", "HEAD~"],
5050
)
5151
.decode()
5252
.strip()

pre-commit/requirements_consistency.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def parse_conda(file_path: Path) -> dict[str, Requirement]:
8888
# pip-style dependency
8989
if isinstance(dependency, dict):
9090
pip = parse_pip(lines=dependency["pip"])
91-
for package_name, requirement in pip.items():
92-
packages[package_name] = requirement
91+
packages = dict(pip.items())
92+
9393
continue
9494
requirement = Requirement.parse(dependency)
9595
# Check for duplicate packages

requirements/requirements_dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pytest>=7.2.0
1111
pytest-cov>=4.0.0
1212
pytest-runner>=6.0
1313
pytest-xdist[psutil]
14-
ruff==0.4.10 # This will be updated by pre-commit bot to latest version
14+
ruff==0.5.0 # This will be updated by pre-commit bot to latest version
1515
toml>=0.10.2
1616
twine>=4.0.1
1717
wheel>=0.37.1

tests/models/test_arch_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def test_all() -> None:
2828
)
2929
assert np.sum(_output - output) == 0
3030

31-
#
3231
with pytest.raises(ValueError, match=r".*Unknown.*format.*"):
3332
centre_crop(_output[None, :, :, None], [2, 2], "NHWCT")
3433

0 commit comments

Comments
 (0)