DCPROGS / HJCFIT

Full maximum likelihood fitting of a mechanism directly to the entire sequence of open and shut times, with exact missed events correction.
GNU General Public License v3.0
9 stars 4 forks source link

Problem with Sphinx passing C++ documentation #86

Open jenshnielsen opened 8 years ago

jenshnielsen commented 8 years ago

It looks like a bug in the Sphinx C++ support

On travis: https://travis-ci.org/DCPROGS/HJCFIT/jobs/102307450 and locally.

/home/travis/build/DCPROGS/HJCFIT/documentation/source/api/cpp/approx_survivor.rst:6: WARNING: Type must be either just a name or a typedef-like declaration.
Just a name error: Invalid definition: Expected ">" or "," in template argument list. [error at 31]
  std::function<std::vector<Root>DeterminantEq const &)> DCProgs::ApproxSurvivor::t_RootFinder
  -------------------------------^
Typedef-like expression error: Invalid definition: Expected ">" or "," in template argument list. [error at 31]
  std::function<std::vector<Root>DeterminantEq const &)> DCProgs::ApproxSurvivor::t_RootFinder
  -------------------------------^
/home/travis/build/DCPROGS/HJCFIT/documentation/source/api/cpp/exact_survivor.rst:6: WARNING: Error when parsing function declaration:
If no return type {
Invalid definition: Expected identifier in nested name, got keyword: decltype [error at 8]
  decltype(t_rmatrix::Zero(1,1)) DCProgs::ExactSurvivor::RecursionInterface::zero()
  --------^
} else if return type {
Invalid definition: "decltype(.)" in trailing_type_spec not implemented [error at 8]
  decltype(t_rmatrix::Zero(1,1)) DCProgs::ExactSurvivor::RecursionInterface::zero()
  --------^
}
jenshnielsen commented 8 years ago

@mdavezac Do you remember seeing this before?

mdavezac commented 8 years ago

It wouldn't be Sphinx, IMO. It's just parsing rst.

The API is generated using doxygen and then injected into Sphinx using Breath. You might want to check that doxygen and Breath are up to date and set up for c++11. I do not remember that particular error.

jenshnielsen commented 8 years ago

The warnings are coming out out the sphinx CPP module https://github.com/sphinx-doc/sphinx/blob/master/sphinx/domains/cpp.py

jenshnielsen commented 8 years ago

There are somewhat more issues with Sphinx 1.4 and python 3.5

    /Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/cpp/approx_survivor.rst:6: WARNING: Invalid definition: Expected end of definition. [error at 45]
  std::function<std::vector<Root>DeterminantEq const &)> DCProgs::ApproxSurvivor::t_RootFinder
  ---------------------------------------------^
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/cpp/exact_survivor.rst:6: WARNING: Error when parsing function declaration.
If the function has no return type:
  Error in declarator or parameters and qualifiers
  Invalid definition: Expected identifier in nested name, got keyword: decltype [error at 8]
    decltype(t_rmatrix::Zero(1,1)) DCProgs::ExactSurvivor::RecursionInterface::zero()
    --------^
If the function has a return type:
  Invalid definition: "decltype(.)" in trailing_type_spec not implemented [error at 8]
    decltype(t_rmatrix::Zero(1,1)) DCProgs::ExactSurvivor::RecursionInterface::zero()
    --------^
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python.rst:44: WARNING: error while formatting arguments for dcprogs.likelihood.eig: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python.rst:45: WARNING: error while formatting arguments for dcprogs.likelihood.inv: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python.rst:47: WARNING: error while formatting arguments for dcprogs.likelihood.det: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python.rst:48: WARNING: error while formatting arguments for dcprogs.likelihood.expm: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/approx_survivor.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.ApproxSurvivor.af: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/approx_survivor.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.ApproxSurvivor.fa: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/determinanteq.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.DeterminantEq.__call__: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/exact_survivor.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.ExactSurvivor: ForwardRef must be an expression -- got 'DCProgs::t_real'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/exact_survivor.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.ExactSurvivor.D_af: ForwardRef must be an expression -- got 'DCProgs::t_rmatrix'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/exact_survivor.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.ExactSurvivor.D_fa: ForwardRef must be an expression -- got 'DCProgs::t_rmatrix'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/exact_survivor.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.ExactSurvivor.af: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/exact_survivor.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.ExactSurvivor.fa: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/exact_survivor.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.ExactSurvivor.recursion_af: ForwardRef must be an expression -- got 'DCProgs::t_uint'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/exact_survivor.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.ExactSurvivor.recursion_fa: ForwardRef must be an expression -- got 'DCProgs::t_uint'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/log10likelihood.rst:12: WARNING: error while formatting arguments for dcprogs.likelihood.Log10Likelihood.insert: ForwardRef must be an expression -- got 'PyObject *'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/missed_eventsG.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.MissedEventsG.final_CHS_occupancies: ForwardRef must be an expression -- got 'DCProgs::t_real'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/missed_eventsG.rst:7: WARNING: error while formatting arguments for dcprogs.likelihood.MissedEventsG.initial_CHS_occupancies: ForwardRef must be an expression -- got 'DCProgs::t_real'
/Users/jhn/ucl/dcprogs/HJCFIT/documentation/source/api/python/qmatrix.rst:8: WARNING: error while formatting arguments for dcprogs.likelihood.QMatrix.transpose: ForwardRef must be an expression -- got 'DCProgs::QMatrix'