junifer 0.0.4.dev587__py3-none-any.whl → 0.0.4.dev594__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
junifer/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.0.4.dev587'
16
- __version_tuple__ = version_tuple = (0, 0, 4, 'dev587')
15
+ __version__ = version = '0.0.4.dev594'
16
+ __version_tuple__ = version_tuple = (0, 0, 4, 'dev594')
junifer/api/functions.py CHANGED
@@ -418,7 +418,10 @@ def _queue_condor(
418
418
  env_name = env["name"]
419
419
  executable = "run_venv.sh"
420
420
  arguments = f"{env_name} junifer"
421
- # TODO: Copy run_venv.sh to jobdir
421
+ exec_path = jobdir / executable
422
+ logger.info(f"Copying {executable} to {exec_path.absolute()!s}")
423
+ shutil.copy(Path(__file__).parent / "res" / executable, exec_path)
424
+ make_executable(exec_path)
422
425
  elif env["kind"] == "local":
423
426
  executable = "junifer"
424
427
  arguments = ""
junifer/api/parser.py CHANGED
@@ -99,4 +99,17 @@ def parse_yaml(filepath: Union[str, Path]) -> Dict:
99
99
  contents["storage"]["uri"] = str(
100
100
  (filepath.parent / uri_path).resolve()
101
101
  )
102
+
103
+ # Allow relative path if queue env kind is venv; same motivation as above
104
+ if "queue" in contents:
105
+ if "env" in contents["queue"]:
106
+ if "venv" == contents["queue"]["env"]["kind"]:
107
+ # Check if the env name is relative
108
+ venv_path = Path(contents["queue"]["env"]["name"])
109
+ if not venv_path.is_absolute():
110
+ # Compute the absolute path
111
+ contents["queue"]["env"]["name"] = str(
112
+ (filepath.parent / venv_path).resolve()
113
+ )
114
+
102
115
  return contents
@@ -1,17 +1,17 @@
1
1
  #!/bin/bash
2
2
 
3
3
  if [ $# -lt 2 ]; then
4
- echo "This script is meant to run a command within a python environment"
4
+ echo "This script is meant to run a command within a conda environment."
5
5
  echo "It needs at least 2 parameters."
6
6
  echo "The first one must be the environment name."
7
- echo "The rest will be the command"
7
+ echo "The rest will be the command."
8
8
  exit 255
9
9
  fi
10
10
 
11
11
  eval "$(conda shell.bash hook)"
12
12
  env_name=$1
13
13
  echo "Activating ${env_name}"
14
- conda activate "$1"
14
+ conda activate "${env_name}"
15
15
  shift 1
16
16
 
17
17
  if [ -f "pre_run.sh" ]; then
@@ -19,5 +19,5 @@ if [ -f "pre_run.sh" ]; then
19
19
  . ./pre_run.sh
20
20
  fi
21
21
 
22
- echo "Running ${*} in virtual environment"
22
+ echo "Running ${*} in conda environment"
23
23
  "$@"
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+
3
+ if [ $# -lt 2 ]; then
4
+ echo "This script is meant to run a command within a Python virtual environment."
5
+ echo "It needs at least 2 parameters."
6
+ echo "The first one must be the virtualenv path."
7
+ echo "The rest will be the command."
8
+ exit 255
9
+ fi
10
+
11
+ env_path=$1
12
+ echo "Activating ${env_path}"
13
+ source "${env_path}"/bin/activate
14
+ shift 1
15
+
16
+ if [ -f "pre_run.sh" ]; then
17
+ echo "Sourcing pre_run.sh"
18
+ . ./pre_run.sh
19
+ fi
20
+
21
+ echo "Running ${*} in Python virtual environment"
22
+ "$@"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: junifer
3
- Version: 0.0.4.dev587
3
+ Version: 0.0.4.dev594
4
4
  Summary: JUelich NeuroImaging FEature extractoR
5
5
  Author-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
6
6
  Maintainer-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
@@ -1,13 +1,14 @@
1
1
  junifer/__init__.py,sha256=x1UR2jUcrUdm2HNl-3Qvyi4UUrU6ms5qm2qcmNY7zZk,391
2
- junifer/_version.py,sha256=jRCAqJ8XX2RVzioqqJ2HfV12Yo7uICU0v_bmiNBLdQs,428
2
+ junifer/_version.py,sha256=Ji34482-PAWG6zwQO7I8NdFGpe6EM1-bfdOTbh3Sv4k,428
3
3
  junifer/stats.py,sha256=sU5IZ2qFZWbzgSutQS_z42miIVItpSGmQYBn6KkD5fA,6162
4
4
  junifer/api/__init__.py,sha256=YILu9M7SC0Ri4CVd90fELH2OnK_gvCYAXCoqBNCFE8E,257
5
5
  junifer/api/cli.py,sha256=T6FTW3vDRlsdkSYerbQD7Q05uA9bV6f8oHvK1jxGUa8,12882
6
6
  junifer/api/decorators.py,sha256=8bnwHPAe7VgzKxl--M_e0umdAlTVSzaJQHEJZ5kof5k,2580
7
- junifer/api/functions.py,sha256=XSliwA2Q9NaplfYFcK9vy6G-B-EZz894ec9LsV2RA-s,23058
8
- junifer/api/parser.py,sha256=a0IBvH3KN1PJaEpF3cnSv8g7VCVpDY1VsCvc8b8FFmE,3849
7
+ junifer/api/functions.py,sha256=ZNB9g7TRy6-r9U087sncKKD8ZGdQAgyplH4RHcZFRdU,23238
8
+ junifer/api/parser.py,sha256=a3SSC2xO-PF1pqXZXFq8Sh9aVd-dmHolJbCkGyOUTAM,4416
9
9
  junifer/api/utils.py,sha256=dyjTdPMwX9qeCrn8SQT2Pjshfnu-y1FEyujV7lCzvm0,3333
10
- junifer/api/res/run_conda.sh,sha256=GerhBGReDw-_fp6RPnaorMHT9IHrp3LRgHJY4mgK4_Y,501
10
+ junifer/api/res/run_conda.sh,sha256=eskIn-fotITOlh--IUQKXh-SBOZkDkK8QvDcdQsyJ0M,509
11
+ junifer/api/res/run_venv.sh,sha256=OF-LOdOdpjCU0JX6Dz1boG4ErPutTiVVD_N7j520Fvk,499
11
12
  junifer/api/res/afni/3dAFNItoNIFTI,sha256=Fsy5S5rwIBb1MepLfl_5FQhE7gv6NDwNyAR_k036NmM,51
12
13
  junifer/api/res/afni/3dRSFC,sha256=MkPtS_nKEoJOHDAT3ZP9IA-SvMdhyzZDiyxObV_XI3g,44
13
14
  junifer/api/res/afni/3dReHo,sha256=Jb5B97iPPPQ14zAz7tK5BVG4jPZyOe9c6kgM6ixKaY8,44
@@ -234,10 +235,10 @@ junifer/utils/logging.py,sha256=T0HgiCI6cS2tp9nbI4cM3nVzMMjiVzgoxuyo5Y1rCyY,9124
234
235
  junifer/utils/tests/test_fs.py,sha256=WQS7cKlKEZ742CIuiOYYpueeAhY9PqlastfDVpVVtvE,923
235
236
  junifer/utils/tests/test_helpers.py,sha256=k5qqfxK8dFyuewTJyR1Qn6-nFaYNuVr0ysc18bfPjyU,929
236
237
  junifer/utils/tests/test_logging.py,sha256=l8oo-AiBV7H6_IzlsNcj__cLeZBUvgIGoaMszD9VaJg,7754
237
- junifer-0.0.4.dev587.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
238
- junifer-0.0.4.dev587.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
239
- junifer-0.0.4.dev587.dist-info/METADATA,sha256=oexdrhEQvCUgBCtdR2W2l0k5IDmyNQzsxMw9P5IfolY,8128
240
- junifer-0.0.4.dev587.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
241
- junifer-0.0.4.dev587.dist-info/entry_points.txt,sha256=DxFvKq0pOqRunAK0FxwJcoDfV1-dZvsFDpD5HRqSDhw,48
242
- junifer-0.0.4.dev587.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
243
- junifer-0.0.4.dev587.dist-info/RECORD,,
238
+ junifer-0.0.4.dev594.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
239
+ junifer-0.0.4.dev594.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
240
+ junifer-0.0.4.dev594.dist-info/METADATA,sha256=ARdjzo_GyiF8LMNkJZ3lnDrF2czE2b44g4ChzZhqjGk,8128
241
+ junifer-0.0.4.dev594.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
242
+ junifer-0.0.4.dev594.dist-info/entry_points.txt,sha256=DxFvKq0pOqRunAK0FxwJcoDfV1-dZvsFDpD5HRqSDhw,48
243
+ junifer-0.0.4.dev594.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
244
+ junifer-0.0.4.dev594.dist-info/RECORD,,