updating sphinx documentation's structure

parent 468f3e3a
......@@ -20,20 +20,23 @@
# * Free Software Foundation, Inc., *
# * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
# ***************************************************************************
from __future__ import print_function
import sys
from subprocess import PIPE, Popen, STDOUT
from .configuration import cfg
from .utils import notif, safe_cd
def callSphinx(current):
cmd = '{0} act lib pyAgrum release'.format(sys.executable)
cmd = '{0} act lib pyAgrum release --no-fun'.format(cfg.python)
notif("Compiling pyAgrum")
if not current['dry_run']:
proc = Popen(cmd + " --no-fun", shell=True, stdout=PIPE, stderr=STDOUT)
proc = Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
out = proc.stdout.readlines()
for line in out:
print(line)
print(line,end="")
else:
notif('[' + cmd + ']')
......@@ -41,13 +44,12 @@ def callSphinx(current):
safe_cd(current, "wrappers")
safe_cd(current, "pyAgrum")
safe_cd(current, "doc")
safe_cd(current, "sphinx")
cmd = 'make html'
cmd = 'make'
if not current['dry_run']:
proc = Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
out = proc.stdout.readlines()
for line in out:
print(line)
print(line,end="")
else:
notif('[' + cmd + ']')
safe_cd(current, "..")
......
......@@ -39,10 +39,10 @@ def parseCommandLine(current):
def getCurrent():
current = {}
try:
shlv = shelve.open(cfg.configFile, writeback=False)
shlv = shelve.open(cfg.configFile, protocol=2,writeback=False)
except:
remove(cfg.configFile)
shlv = shelve.open(cfg.configFile, writeback=False)
shlv = shelve.open(cfg.configFile, protocol=2,writeback=False)
for key in cfg.default: # .iterkeys():
current[key] = cfg.default[key]
......@@ -54,7 +54,7 @@ def getCurrent():
def setCurrent(current):
shlv = shelve.open(cfg.configFile, writeback=True)
shlv = shelve.open(cfg.configFile, protocol=2,writeback=True)
for key in current.keys():
if key not in cfg.non_persistent:
shlv[key] = current[key]
......
......@@ -46,7 +46,7 @@ cfg.__version_minor="1"
cfg.__version = cfg.__version_major+"."+cfg.__version_minor
cfg.modulesFile = "src/modules.txt" # the file to parse to find the modules
cfg.configFile = ".options.act2.py" #
cfg.configFile = ".options.act2_1.py" #
cfg.fixedSeedValue = "10"
cfg.nbr_tests_for_stats = 20
......
DESTDIR=$(shell python -c "import os;import pyAgrum;print(os.path.dirname(pyAgrum.__file__))")
# please check that pyAgrum has been compiled in that direction
# for instance using
# python act lib pyAgrum release
DESTDIR=../../../build/release/wrappers/pyAgrum
run:
swig -c++ -python -outdir $(DESTDIR) -py3 -I../../swig -I../../../src -I../../../build/release -I.. pyAgrum.i
......
......@@ -3,13 +3,12 @@
BayesNet represents a Bayesian Network.
Available constructors:
`BayesNet(name='') -> BayesNet`
`BayesNet(source) -> BayesNet`
Parameters
==========
----------
name: str
the name of the Bayes Net (optional)
source : :class:BayesNet
......@@ -17,13 +16,14 @@ source : :class:BayesNet
"
%feature("docstring") gum::BayesNet::fastPrototype
""
"
"
%feature("docstring") gum::BayesNet::dag
%feature("docstring") gum::BayesNet_double::dag
"
Returns
=======
gum::DAG
Returns the BayesNet's DAG.
-------
pyAgrum.DAG
Returns the topology of the BayesNet as a pyAgrum.DAG.
"
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment