From 12252af821b3be4acea5a907fd187f867bb0b828 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 08:28:06 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#117) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.9...v0.2.0) - [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- bg_atlasgen/atlas_scripts/allen_mouse.py | 2 +- bg_atlasgen/atlas_scripts/example_mouse.py | 2 +- bg_atlasgen/atlas_scripts/kim_mouse.py | 2 +- bg_atlasgen/atlas_scripts/osten_mouse.py | 2 +- bg_atlasgen/metadata_utils.py | 1 + bg_atlasgen/validate_atlases.py | 1 - bg_atlasgen/volume_utils.py | 1 + 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2dac3f5..d773348 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,12 +15,12 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.9 + rev: v0.2.0 hooks: - id: ruff args: [ --config=pyproject.toml ] - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black args: [--config=pyproject.toml] diff --git a/bg_atlasgen/atlas_scripts/allen_mouse.py b/bg_atlasgen/atlas_scripts/allen_mouse.py index 1de0f46..8d903bb 100644 --- a/bg_atlasgen/atlas_scripts/allen_mouse.py +++ b/bg_atlasgen/atlas_scripts/allen_mouse.py @@ -30,7 +30,7 @@ def create_atlas(working_dir, resolution): manifest=download_dir_path / "manifest.json", # downloaded files are stored relative to here resolution=resolution, - reference_space_key="annotation/ccf_2017" + reference_space_key="annotation/ccf_2017", # use the latest version of the CCF ) diff --git a/bg_atlasgen/atlas_scripts/example_mouse.py b/bg_atlasgen/atlas_scripts/example_mouse.py index 5f757a0..57fb25d 100644 --- a/bg_atlasgen/atlas_scripts/example_mouse.py +++ b/bg_atlasgen/atlas_scripts/example_mouse.py @@ -30,7 +30,7 @@ def create_atlas(working_dir, resolution): manifest=download_dir_path / "manifest.json", # downloaded files are stored relative to here resolution=RES_UM, - reference_space_key="annotation/ccf_2017" + reference_space_key="annotation/ccf_2017", # use the latest version of the CCF ) diff --git a/bg_atlasgen/atlas_scripts/kim_mouse.py b/bg_atlasgen/atlas_scripts/kim_mouse.py index 63e78bb..569a103 100644 --- a/bg_atlasgen/atlas_scripts/kim_mouse.py +++ b/bg_atlasgen/atlas_scripts/kim_mouse.py @@ -72,7 +72,7 @@ def create_atlas(working_dir, resolution): manifest=download_dir_path / "manifest.json", # downloaded files are stored relative to here resolution=resolution, - reference_space_key="annotation/ccf_2017" + reference_space_key="annotation/ccf_2017", # use the latest version of the CCF ) diff --git a/bg_atlasgen/atlas_scripts/osten_mouse.py b/bg_atlasgen/atlas_scripts/osten_mouse.py index bd9e97a..1079fd7 100644 --- a/bg_atlasgen/atlas_scripts/osten_mouse.py +++ b/bg_atlasgen/atlas_scripts/osten_mouse.py @@ -69,7 +69,7 @@ def create_atlas(working_dir, resolution): manifest=download_dir_path / "manifest.json", # downloaded files are stored relative to here resolution=resolution, - reference_space_key="annotation/ccf_2017" + reference_space_key="annotation/ccf_2017", # use the latest version of the CCF ) diff --git a/bg_atlasgen/metadata_utils.py b/bg_atlasgen/metadata_utils.py index f6c985f..57b125c 100644 --- a/bg_atlasgen/metadata_utils.py +++ b/bg_atlasgen/metadata_utils.py @@ -3,6 +3,7 @@ . structures.csv . README.txt """ + import json import re from datetime import datetime diff --git a/bg_atlasgen/validate_atlases.py b/bg_atlasgen/validate_atlases.py index 503883f..d993c5c 100644 --- a/bg_atlasgen/validate_atlases.py +++ b/bg_atlasgen/validate_atlases.py @@ -1,6 +1,5 @@ """Script to validate atlases""" - import os from pathlib import Path diff --git a/bg_atlasgen/volume_utils.py b/bg_atlasgen/volume_utils.py index d2e2234..a00c04e 100644 --- a/bg_atlasgen/volume_utils.py +++ b/bg_atlasgen/volume_utils.py @@ -2,6 +2,7 @@ Code useful for dealing with volumetric data (e.g. allen annotation volume for the mouse atlas) extracting surfaces from volumetric data .... """ + try: from vedo import Volume except ModuleNotFoundError: