Skip to content

Commit 89c4ed8

Browse files
Merge pull request #280 from NeuroML/feat/nsg-netpyne
fix(nsgr-netpyne): include model files in NSG zip also
2 parents 43a4044 + ac54066 commit 89c4ed8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pyneuroml/nsgr/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ def run_on_nsg(
177177
generated_files = get_files_generated_after(
178178
start_time, ignore_suffixes=["xml", "nml"]
179179
)
180+
181+
# For NetPyNE, the channels are converted to NEURON mod files, but the
182+
# network and cells are imported from the nml files.
183+
# So we include all the model files too.
184+
if engine == "jneuroml_netpyne":
185+
generated_files.extend(model_file_list)
186+
180187
logger.debug(f"Generated files are: {generated_files}")
181188

182189
logger.info("Generating zip file")
@@ -199,7 +206,11 @@ def run_on_nsg(
199206
if f.endswith("_netpyne.py"):
200207
runner_file = f
201208
fpath = pathlib.Path(f)
202-
moved_path = fpath.rename(nsg_dir / fpath)
209+
moved_path = nsg_dir / fpath
210+
# use os.renames because pathlib.Path.rename does not move
211+
# recursively and so cannot move files within directories
212+
os.renames(fpath, moved_path)
213+
203214
archive.write(str(moved_path))
204215

205216
logger.debug("Printing testParam.properties")

0 commit comments

Comments
 (0)