File tree Expand file tree Collapse file tree 6 files changed +11
-35
lines changed Expand file tree Collapse file tree 6 files changed +11
-35
lines changed Original file line number Diff line number Diff line change 1
- from modelspec import *
1
+ from modelspec . BaseTypes import *
2
2
from modelspec .utils import *
3
3
4
4
# Example showing how to create a model of a document and use it to create/serialise instances
Original file line number Diff line number Diff line change 9
9
DICT_FORMAT = "dict"
10
10
11
11
12
+ class EvaluableExpression (str ):
13
+ def __init__ (self , expr ):
14
+ self .expr = expr
15
+
16
+
17
+
12
18
def print_ (text , print_it = False ):
13
19
"""
14
20
Print a message preceded by modelspec, only if print_it=True
Original file line number Diff line number Diff line change 1
- import collections
2
1
3
- __version__ = "0.1.1"
4
-
5
-
6
- from modelspec .BaseTypes import Base
7
- from modelspec .BaseTypes import BaseWithId
8
- from modelspec .BaseTypes import NetworkReader
9
-
10
-
11
- class EvaluableExpression (str ):
12
- def __init__ (self , expr ):
13
- self .expr = expr
14
-
15
-
16
- if __name__ == "__main__" :
17
-
18
- net = Network (id = "net" )
19
- doc = net .generate_documentation (format = "markdown" )
20
- print (doc )
21
- with open ("../docs/README.md" , "w" ) as d :
22
- d .write (doc )
23
-
24
- import json
25
- import yaml
26
-
27
- doc = net .generate_documentation (format = "dict" )
28
- doc = {"version" : "NeuroMLlite v%s" % __version__ , "specification" : doc }
29
- with open ("../docs/NeuroMLlite_specification.json" , "w" ) as d :
30
- d .write (json .dumps (doc , indent = 4 ))
31
- with open ("../docs/NeuroMLlite_specification.yaml" , "w" ) as d :
32
- d .write (yaml .dump (doc , indent = 4 , sort_keys = False ))
2
+ __version__ = "0.1.2"
Original file line number Diff line number Diff line change 1
- from modelspec import *
1
+ from modelspec . BaseTypes import *
2
2
from modelspec .utils import *
3
3
4
4
import pickle
Original file line number Diff line number Diff line change 1
- from modelspec import *
1
+ from modelspec . BaseTypes import *
2
2
from modelspec .utils import *
3
3
4
4
from modelspec .utils import _val_info
Original file line number Diff line number Diff line change 7
7
import numpy as np
8
8
9
9
from modelspec .BaseTypes import print_v , print_
10
- from modelspec import EvaluableExpression
10
+ from modelspec . BaseTypes import EvaluableExpression
11
11
12
12
verbose = False
13
13
You can’t perform that action at this time.
0 commit comments