Skip to content

Commit

Permalink
Merge branch 'dev' into cb_clean_code
Browse files Browse the repository at this point in the history
  • Loading branch information
camillebrianceau authored Mar 19, 2024
2 parents bd7afde + 8dd81d9 commit 6177223
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
7 changes: 4 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.11"
jobs:
post_create_environment:
# Install Poetry
- pip install poetry
# Install Poetry 1.7
# TODO: Investigate why pipeline is broken with 1.8
- pip install poetry==1.7.1
# Do not use virtual environments
- poetry config virtualenvs.create false
# Install docs group of dependencies
Expand Down
2 changes: 1 addition & 1 deletion clinicadl/generate/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def generate_trivial_dataset(
try:
mask_path_tar = fetch_file(FILE1, cache_clinicadl)
tar_file = tarfile.open(mask_path_tar)
print("File: " + mask_path_tar)
print(f"File: {mask_path_tar}")
try:
tar_file.extractall(cache_clinicadl)
tar_file.close()
Expand Down
6 changes: 3 additions & 3 deletions clinicadl/random_search/random_search_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def get_space_dict(launch_directory: Path) -> Dict[str, Any]:
# Default of specific options of random search
space_dict.setdefault("d_reduction", "MaxPooling")
space_dict.setdefault("network_normalization", "BatchNorm")
space_dict.setdefault("channels_limit", "512")
space_dict.setdefault("n_conv", "1")
space_dict.setdefault("wd_bool", "True")
space_dict.setdefault("channels_limit", 512)
space_dict.setdefault("n_conv", 1)
space_dict.setdefault("wd_bool", True)

train_default = build_train_dict(toml_path, space_dict["network_task"])

Expand Down
7 changes: 4 additions & 3 deletions clinicadl/utils/clinica_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,20 +1138,21 @@ def _sha256(path: Path):
return sha256hash.hexdigest()


def fetch_file(remote: RemoteFileStructure, dirname: Optional[Path]) -> Path:

def fetch_file(remote: RemoteFileStructure, dirname: Path) -> Path:
"""Download a specific file and save it into the resources folder of the package.
Parameters
----------
remote : RemoteFileStructure
Structure containing url, filename and checksum.
dirname : str
dirname : Path
Absolute path where the file will be downloaded.
Returns
-------
file_path : str
file_path : Path
Absolute file path.
"""

Expand Down
2 changes: 1 addition & 1 deletion clinicadl/utils/maps_manager/maps_manager_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,4 @@ def remove_unused_tasks(
# toml_dict[key] = value.as_posix()
# if isinstance(value, Path):
# toml_dict[key] = value.as_posix()
# return toml_dict
# return toml_dict

0 comments on commit 6177223

Please sign in to comment.