Skip to content

Commit

Permalink
Merge pull request #1381 from fspindle/feat_python_doc_improvement
Browse files Browse the repository at this point in the history
Python doc improvement introducing BUILD_DAILY_DOC environment var
  • Loading branch information
fspindle authored Apr 16, 2024
2 parents c8e3123 + 32b7688 commit 80581ff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion modules/python/doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
import sys
import os

from datetime import date

# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'
Expand Down Expand Up @@ -91,6 +91,14 @@ version = "@VISP_PYTHON_VERSION@"
# The full version, including alpha/beta/rc tags.
release = "@VISP_PYTHON_VERSION@"

BUILD_DAILY_DOC = os.getenv('BUILD_DAILY_DOC')
if BUILD_DAILY_DOC != None:
print("Create doc for daily build")
today = date.today()
release = "@VISP_PYTHON_VERSION@ under development (" + str(today) + ")"
else:
print("Create doc for release")

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
Expand Down
6 changes: 3 additions & 3 deletions modules/python/doc/rst/known_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ Usability
No implicit conversion from ViSP types to Numpy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Numpy array cannot be implicitely converted to a ViSP representation when calling a ViSP function.
Numpy array cannot be implicitly converted to a ViSP representation when calling a ViSP function.


ViSP 3rd party types (such as cv::Mat) cannot be used from Python
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

We do not interface with other bindings (as it is not trivial and may require specific Pybind ABI), and we do not wrap third party types.
Thus, alternatives must be provided by hand into the ViSP API (or wrapped through custom bindings) so that the functionalities can be used from Python
Thus, alternatives must be provided by hand into the ViSP API (or wrapped through custom bindings) so that the functionalities can be used from Python.

Cannot inherit from a ViSP class in Python
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Right now, it is not possible to inherit from a ViSP class with a Python class. Virtual methods cannot be overriden.
To remedy this, trampoline classes should be implemented into the generator, either fully automated (but that is a lot of complexity)
To remedy this, trampoline classes should be implemented into the generator, either fully automated (but that is complex)
or by providing the trampoline by hand and adding a way to reference the trampoline class in the configuration file.

0 comments on commit 80581ff

Please sign in to comment.