def run_autodoc(_): import synapse.tools.autodoc as s_autodoc s_autodoc.main(['--doc-model', '--savefile', 'synapse/datamodel.rst']) import synapse import subprocess abssynf = os.path.abspath(synapse.__file__) synbd = os.path.split(abssynf)[0] # Split off __init__ synpd = os.path.split(synbd)[0] # split off the synapse module directory args = [ 'python', '-m', 'synapse.tools.autodoc', '--configable-opts', '--savefile', 'docs/synapse/configables.rst' ] subprocess.check_call(args, cwd=synpd)
def test_tools_autodoc(self): with self.getTestDir() as path: save = os.path.join(path, 'model.rst') outp = self.getTestOutp() argv = ['--doc-model', '--savefile', save] self.eq(s_autodoc.main(argv, outp=outp), 0)
def test_tools_autodoc_configable(self): with self.getTestDir() as path: save = os.path.join(path, 'configables.rst') outp = self.getTestOutp() argv = ['--configable-opts', '--savefile', save] self.eq(s_autodoc.main(argv, outp=outp), 0) with open(save, 'rb') as fd: rst = fd.read().decode() self.true('Synapse Configable Classes' in rst)
def test_tools_autodoc(self): with self.getTestDir() as path: save = os.path.join(path, 'model.rst') outp = self.getTestOutp() argv = ['--doc-model', '--savefile', save] self.eq(s_autodoc.main(argv, outp=outp), 0) with open(save, 'rb') as fd: rst = fd.read().decode() self.true('inet:ipv4:asn = <inet:asn> (default: -1)' in rst)
def test_tools_autodoc_configable(self): with self.getTestDir() as path: save = os.path.join(path, 'configables.rst') outp = self.getTestOutp() argv = ['--configable-opts', '--savefile', save] self.eq(s_autodoc.main(argv, outp=outp), 0) with open(save, 'rb') as fd: rst = fd.read().decode() self.true('Synapse Configable Classes' in rst) # Some cell configs which are comming in from @staticmethod and initConfDefs() self.true('axon:mapsize' in rst) self.true('The TCP port the Cell binds to (defaults to dynamic)' in rst) self.true('The TCP port the Neuron binds to' in rst)
def run_autodoc(_): import synapse.tools.autodoc as s_autodoc s_autodoc.main(['--doc-model','--savefile','synapse/datamodel.rst'])
def run_autodoc(_): import synapse.tools.autodoc as s_autodoc s_autodoc.main(['--doc-model', '--savefile', 'synapse/datamodel.rst']) s_autodoc.main(['--configable-opts', '--savefile', 'synapse/configables.rst'])