From 2bc4f28e4abf179c946eddd9ab65455868086ad7 Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Tue, 2 Sep 2025 10:18:29 +1000 Subject: [PATCH 1/5] added 'arch' optional arg to miniconda template to enable the specification of non x86 binaries --- neurodocker/templates/miniconda.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neurodocker/templates/miniconda.yaml b/neurodocker/templates/miniconda.yaml index b95ef8b9..f401ef1b 100644 --- a/neurodocker/templates/miniconda.yaml +++ b/neurodocker/templates/miniconda.yaml @@ -5,8 +5,8 @@ name: miniconda url: https://docs.conda.io/projects/miniconda/en/latest/ binaries: urls: - latest: https://repo.continuum.io/miniconda/Miniconda3-{{ self.version }}-Linux-x86_64.sh - '*': https://repo.continuum.io/miniconda/Miniconda3-{{ self.version }}-Linux-x86_64.sh + latest: https://repo.continuum.io/miniconda/Miniconda3-{{ self.version }}-Linux-{{ self.arch }}.sh + '*': https://repo.continuum.io/miniconda/Miniconda3-{{ self.version }}-Linux-{{ self.arch }}.sh env: CONDA_DIR: '{{ self.install_path }}' PATH: '{{ self.install_path }}/bin:$PATH' @@ -34,6 +34,7 @@ binaries: pip_opts: '' yaml_file: '' mamba: 'false' + arch: 'x86_64' instructions: | {% if not self.installed.lower() in ["true", "y", "1"] -%} {{ self.install_dependencies() }} From edd2b62a85273119b2b965204ccfbebd0fa76e08 Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Tue, 2 Sep 2025 10:29:09 +1000 Subject: [PATCH 2/5] fixing up type annotations for mypy --- neurodocker/cli/generate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neurodocker/cli/generate.py b/neurodocker/cli/generate.py index d670d319..3bc5eb12 100644 --- a/neurodocker/cli/generate.py +++ b/neurodocker/cli/generate.py @@ -9,6 +9,7 @@ import json as json_lib import sys +import typing as ty from pathlib import Path from typing import IO, Any, Optional, Type, cast @@ -28,6 +29,9 @@ from neurodocker.reproenv.template import Template from neurodocker.reproenv.types import allowed_pkg_managers +if ty.TYPE_CHECKING: + from click.parser import ParsingState + class GroupAddCommonParamsAndRegisteredTemplates(click.Group): """Subclass of `click.Group` that adds parameters common to `reproenv generate` @@ -137,7 +141,7 @@ def __init__(self, *args, **kwargs): self._eat_all_parser = None def add_to_parser(self, parser, ctx): - def parser_process(value, state: click.parser.ParsingState): + def parser_process(value, state: ParsingState): # method to hook to the parser.process done = False value = [value] From 9c8fa88aed3263ca9a5666f7456a0e805b3f4017 Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Tue, 2 Sep 2025 10:31:16 +1000 Subject: [PATCH 3/5] ignoring mypy errors in private click parser --- neurodocker/cli/generate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neurodocker/cli/generate.py b/neurodocker/cli/generate.py index 3bc5eb12..1ae4e6aa 100644 --- a/neurodocker/cli/generate.py +++ b/neurodocker/cli/generate.py @@ -146,12 +146,12 @@ def parser_process(value, state: ParsingState): done = False value = [value] # grab everything up to the next option - while state.rargs and not done: + while state.rargs and not done: # type: ignore[attr-defined] for prefix in self._eat_all_parser.prefixes: - if state.rargs[0].startswith(prefix): + if state.rargs[0].startswith(prefix): # type: ignore[attr-defined] done = True if not done: - value.append(state.rargs.pop(0)) + value.append(state.rargs.pop(0)) # type: ignore[attr-defined] value = tuple(value) # call the actual process self._previous_parser_process(value, state) From ccc604ae7cd9ad154e010c0fb36243abaa9055bd Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Tue, 2 Sep 2025 10:35:11 +1000 Subject: [PATCH 4/5] formatting changes for precommit compliance --- neurodocker/templates/ants.yaml | 1 - neurodocker/templates/miniconda.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/neurodocker/templates/ants.yaml b/neurodocker/templates/ants.yaml index 53349565..e2124473 100644 --- a/neurodocker/templates/ants.yaml +++ b/neurodocker/templates/ants.yaml @@ -10,7 +10,6 @@ binaries: optional: install_path: /opt/ants-{{ self.version }} urls: - # Official binaries are provided as of 2.4.1 (https://github.com/ANTsX/ANTs/releases) 2.6.2: https://github.com/ANTsX/ANTs/releases/download/v2.6.2/ants-2.6.2-centos7-X64-gcc.zip 2.6.1: https://github.com/ANTsX/ANTs/releases/download/v2.6.1/ants-2.6.1-centos7-X64-gcc.zip diff --git a/neurodocker/templates/miniconda.yaml b/neurodocker/templates/miniconda.yaml index f401ef1b..6b72ddde 100644 --- a/neurodocker/templates/miniconda.yaml +++ b/neurodocker/templates/miniconda.yaml @@ -34,7 +34,7 @@ binaries: pip_opts: '' yaml_file: '' mamba: 'false' - arch: 'x86_64' + arch: x86_64 instructions: | {% if not self.installed.lower() in ["true", "y", "1"] -%} {{ self.install_dependencies() }} From 06ba8cb4f3916fb963ffb746f73b9b7d7f9075b4 Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Thu, 4 Sep 2025 21:49:03 +1000 Subject: [PATCH 5/5] Removed vscode settings and added .vscode to .gitignore --- .gitignore | 2 ++ .vscode/settings.json | 12 ------------ 2 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 4cf7ecc9..ec61ce3c 100644 --- a/.gitignore +++ b/.gitignore @@ -146,3 +146,5 @@ cython_debug/ # Pycharm .idea/ + +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 0cd39fe4..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "editor.tabSize": 4, - "editor.rulers": [ - 88 - ], - "python.formatting.provider": "black", - "python.linting.enabled": true, - "python.linting.pylintEnabled": false, - "python.linting.flake8Enabled": true, - "python.linting.mypyEnabled": true, - "python.pythonPath": "./venv/bin/python3" -}