-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/optimization
- Loading branch information
Showing
12 changed files
with
130 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from machinable import Project | ||
|
||
|
||
class TestEnv(Project): | ||
def on_resolve_remotes(self): | ||
return { | ||
"mpi": "url+https://raw.githubusercontent.com/machinable-org/machinable/2670e9626eb548f6ce2301923be1f49642086d8c/docs/examples/mpi-execution/mpi.py", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import pytest | ||
import os | ||
|
||
|
||
@pytest.mark.skipif( | ||
not os.environ.get("MIV_SIMULATOR_TEST_INTERFACE_SRC"), | ||
reason="Environment variables not available.", | ||
) | ||
def test_interface(tmp_path): | ||
from machinable import get | ||
from miv_simulator.mechanisms import compile | ||
|
||
source = os.environ["MIV_SIMULATOR_TEST_INTERFACE_SRC"] | ||
wd = os.path.dirname(__file__) | ||
|
||
debug = True | ||
storage_directory = str(tmp_path / "storage") | ||
if debug: | ||
storage_directory = f"{wd}/_machinable/storage" | ||
|
||
with get("machinable.index", storage_directory), get( | ||
"machinable.project", wd | ||
): | ||
with get("mpi", {"ranks": -1}) as run: | ||
get( | ||
"miv_simulator.interface.network", | ||
{ | ||
"config_filepath": f"{source}/config/Microcircuit.yaml", | ||
"mechanisms_path": compile(f"{source}/mechanisms"), | ||
"template_path": f"{source}/templates", | ||
"morphology_path": f"{source}/morphology", | ||
}, | ||
).launch() | ||
|
||
for component in run.executables: | ||
print(component) | ||
assert component.cached() |