Skip to content

Commit 1158e43

Browse files
author
Alexander Ororbia
committed
fixed minor bug in command compiler
1 parent 1ce357d commit 1158e43

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

ngcsimlib/context.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,13 @@ def make_commands(self, path_to_commands_file):
343343
commands = json.load(file)
344344
for c_name, command in commands.items():
345345
if command['class'] == "dynamic_compiled":
346-
self.compile_by_key(
347-
*self.get_components(*command['components']), compile_key=command['compile_key'], name=c_name)
346+
if len(command['components']) > 1:
347+
self.compile_by_key(
348+
*self.get_components(*command['components']), compile_key=command['compile_key'], name=c_name)
349+
else:
350+
self.compile_by_key(
351+
self.get_components(*command['components']), compile_key=command['compile_key'],
352+
name=c_name)
348353
else:
349354
klass = load_from_path(command['class'])
350355
klass(*command['args'], **command['kwargs'], components=self.get_components(*command['components']),
@@ -419,4 +424,4 @@ def wrap_and_add_command(self, command, name=None):
419424
420425
name: The name of the command (default: None)
421426
"""
422-
self.add_command(wrap_command(command), name=name)
427+
self.add_command(wrap_command(command), name=name)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ngcsimlib"
7-
version = "0.2.beta2"
7+
version = "0.3.beta1"
88

99
description = "Simulation software backend for ngc-learn."
1010
authors = [
@@ -13,7 +13,7 @@ authors = [
1313
]
1414
readme = "README.md"
1515
keywords = ['python', 'complex-systems', 'simulation']
16-
requires-python = ">=3.10"
16+
requires-python = ">=3.8"
1717
license = {text = "BSD-3-Clause License"}
1818

1919
[project.urls]

0 commit comments

Comments
 (0)