diff --git a/.travis.yml b/.travis.yml index cd4ea07be1..5f35e8fb78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,8 @@ addons: - python3-pip - doxygen - pandoc + - texlive-base + - dvipng # for Mac builds, we use Homebrew homebrew: packages: @@ -73,11 +75,15 @@ before_install: # Install NMODL dependencies #============================================================================= install: + # there is a bug in m2r if sphinx>2.4.4. There is a pr in m2r to solve the + # issue here: https://github.com/miyakogi/m2r/pull/55 . When it is done + # I will remove the sphinx downgrade. Change setup.py requirements when it + # be the case, Katta - echo "------- Install Dependencies -------" - pip3 install -U pip setuptools - pip3 install Jinja2 PyYAML pytest sympy --user - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - pip3 install -U --user sphinx nbsphinx>=0.3.2 m2r sphinx-rtd-theme jupyter; + pip3 install -U --user sphinx==2.4.4 nbsphinx>=0.3.2 m2r sphinx-rtd-theme jupyter; fi #============================================================================= diff --git a/docs/DoxygenLayout.xml b/docs/DoxygenLayout.xml index 7ad780b56b..258ae9d3b0 100644 --- a/docs/DoxygenLayout.xml +++ b/docs/DoxygenLayout.xml @@ -1,5 +1,6 @@ + @@ -9,26 +10,12 @@ - - - - - - - - - - - - - - @@ -102,13 +89,8 @@ - - - - - @@ -117,8 +99,6 @@ - - @@ -135,16 +115,11 @@ - - - - - @@ -154,8 +129,6 @@ - - @@ -176,8 +149,6 @@ - - @@ -196,8 +167,6 @@ - - diff --git a/docs/conf.py b/docs/conf.py index 80522afaa5..e02ba1793d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,11 +17,17 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # + + + import os import subprocess import sys import textwrap +# The project needs to be built before documentation in the usual build folder +sys.path.insert(0, os.path.abspath('../build/lib/python')) + import nmodl # isort:skip # Run doxygen diff --git a/setup.py b/setup.py index e769a4609f..bfae67e822 100644 --- a/setup.py +++ b/setup.py @@ -100,7 +100,7 @@ def build_extension(self, ext): build_args += ["--", "/m"] else: cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] - build_args += ["--", "-j{}".format(max(1, os.cpu_count() - 1))] + build_args += ["--", "-j{}".format(max(1, os.cpu_count() - 3))] env = os.environ.copy() env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format( @@ -147,7 +147,7 @@ def run(self): ) -install_requirements = ["jinja2>=2.9", "PyYAML>=3.13", "sympy>=1.3"] +install_requirements = ["jinja2>=2.9.3", "PyYAML>=3.13", "sympy>=1.3"] setup( name="NMODL", @@ -167,7 +167,7 @@ def run(self): buildhtml=get_sphinx_command, ), zip_safe=False, - setup_requires=["nbsphinx>=0.3.2", "m2r", "sphinx-rtd-theme", "sphinx>=2.0"] + setup_requires=["nbsphinx>=0.3.2", "mistune<2.0", "m2r", "sphinx-rtd-theme", "sphinx>=2.0", "sphinx<3.0"] + install_requirements, install_requires=install_requirements, tests_require=["pytest>=3.7.2"], diff --git a/src/codegen/codegen_c_visitor.hpp b/src/codegen/codegen_c_visitor.hpp index 62515f5af6..39105aad29 100644 --- a/src/codegen/codegen_c_visitor.hpp +++ b/src/codegen/codegen_c_visitor.hpp @@ -1785,7 +1785,7 @@ class CodegenCVisitor: public visitor::AstVisitor { * Find unique variable name defined in nmodl::utils::SingletonRandomString by the * nmodl::visitor::SympySolverVisitor * @param original_name Original name of variable to change - * @return std::string Unique name produced as _ + * @return std::string Unique name produced as [original_name]_[random_string] */ std::string find_var_unique_name(const std::string& original_name); diff --git a/src/language/templates/ast/ast.hpp b/src/language/templates/ast/ast.hpp index a8378df45a..3b62cf74a8 100644 --- a/src/language/templates/ast/ast.hpp +++ b/src/language/templates/ast/ast.hpp @@ -333,7 +333,7 @@ struct Ast: public std::enable_shared_from_this { * returning a raw pointer may create less problems that the * shared_from_this from the parent. * - * \ref Check Ast::parent for more information + * Check \ref Ast::parent for more information */ virtual Ast* get_parent() const; @@ -345,7 +345,7 @@ struct Ast: public std::enable_shared_from_this { * we set children parents directly in the parent constructor using * set_parent_in_children() * - * \ref Check Ast::parent for more information + * Check \ref Ast::parent for more information */ virtual void set_parent(Ast* p); }; diff --git a/src/language/templates/visitors/checkparent_visitor.hpp b/src/language/templates/visitors/checkparent_visitor.hpp index 83dfc68bb7..9c71a09d95 100644 --- a/src/language/templates/visitors/checkparent_visitor.hpp +++ b/src/language/templates/visitors/checkparent_visitor.hpp @@ -17,7 +17,7 @@ * \brief Auto generated visitors * * \file - * \brief \copybrief nmodl::visitor::CheckParentVisitor + * \brief \copybrief nmodl::visitor::test::CheckParentVisitor */ #include "visitors/ast_visitor.hpp" diff --git a/src/visitors/sympy_solver_visitor.cpp b/src/visitors/sympy_solver_visitor.cpp index f0e2d29df4..aa97fd3913 100644 --- a/src/visitors/sympy_solver_visitor.cpp +++ b/src/visitors/sympy_solver_visitor.cpp @@ -159,7 +159,7 @@ std::string SympySolverVisitor::suffix_random_string(const std::string& original auto singleton_random_string_class = nmodl::utils::SingletonRandomString<4>::instance(); // Check if there is a variable defined in the mod file as original_string and if yes // try to use a different string for the matrices created by sympy in the form - // _ + // "original_string"_"random_string" while (vars.find(new_string) != vars.end()) { random_string = singleton_random_string_class->reset_random_string(original_string); new_string = original_string; diff --git a/src/visitors/sympy_solver_visitor.hpp b/src/visitors/sympy_solver_visitor.hpp index b2d066191c..ecfa8422e2 100644 --- a/src/visitors/sympy_solver_visitor.hpp +++ b/src/visitors/sympy_solver_visitor.hpp @@ -109,7 +109,7 @@ class SympySolverVisitor: public AstVisitor { const std::string& original_string, const std::string& substitution_string) const; - /// Return a std::string in the form _, where + /// Return a std::string in the form "original_string"_"random_string", where /// random_string is a string defined in the nmodl::utils::SingletonRandomString /// for the original_string std::string suffix_random_string(const std::string& original_string) const;