neuronsimulator / nrn-modeldb-ci

NEURON ModelDB CI tools
BSD 3-Clause "New" or "Revised" License
4 stars 3 forks source link

Build only (with no run) for Windows debugging. #31

Closed nrnhines closed 2 years ago

nrnhines commented 2 years ago

I'm playing with the additional option for runmodels

+        --norun                 Compile and link. Success if nrnivmodl succeeds. (Useful for Windows when debugging incomplete g++ toolchain in installer.)

and am at the point where it seemed simplest to force every model to effectively have the yaml property run: null. I tried:

 class ModelRun(dict):
-    def __init__(self, model, working_dir, clean=False):
+    def __init__(self, model, working_dir, clean=False, norun=False):

to merely

-        self._fetch_model()
+        if not norun:
+            self._fetch_model()

but I guess _fetch_model() is getting more than just run. I'm wondering if someone can short circuit my guesswork by suggesting how to effectively replace the run after return from _fetch_model().

olupton commented 2 years ago

@alexsavulescu may have a better idea, but my guess would be that one could add

if norun:
  self["run"] = None

after https://github.com/neuronsimulator/nrn-modeldb-ci/blob/f0fae7dcaca75db46024db45c301658a998f64ce/modeldb/modelrun.py#L49 🤔 -- I'm not sure if I understood the issue though

alexsavulescu commented 2 years ago

It is my understanding that --norun is a global option, so we don't need to tamper with the modeldb-run.yaml. I will draft a PR for this.