From d3e1f99e37785f5ef263dd6e9c84aa570d1671b7 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Fri, 11 Oct 2024 18:47:36 +0200 Subject: [PATCH] Maintenance --- .ci_support/run_docker_linux.sh | 2 +- CMakeLists.txt | 18 +++++++----------- ChangeLog | 4 ++++ VERSION | 2 +- distro/debian/changelog | 2 +- distro/rpm/otsvm.spec | 2 +- python/doc/_templates/class.rst_t | 1 + python/doc/conf.py.in | 8 +++++++- python/src/__init__.py | 2 +- 9 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.ci_support/run_docker_linux.sh b/.ci_support/run_docker_linux.sh index 42c6c82..52a2e02 100755 --- a/.ci_support/run_docker_linux.sh +++ b/.ci_support/run_docker_linux.sh @@ -8,7 +8,7 @@ cmake -DCMAKE_INSTALL_PREFIX=~/.local \ -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32 \ -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -D_GLIBCXX_ASSERTIONS --coverage" \ -DSWIG_COMPILE_FLAGS="-O1 -Wno-unused-parameter" \ - -DSPHINX_FLAGS="-W -T -j4" \ + -DUSE_SPHINX=ON -DSPHINX_FLAGS="-W -T -j4" \ /io make install make tests diff --git a/CMakeLists.txt b/CMakeLists.txt index df804fe..2c2f406 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 3.13) option (BUILD_PYTHON "Build the python module for the library" ON) -option (USE_SPHINX "Use sphinx for documentation" ON) +option (USE_SPHINX "Use sphinx for documentation" OFF) option (BUILD_SHARED_LIBS "Build shared libraries" ON) option (USE_EXTERNAL_LIBSVM "Use internal LibSVM" OFF) @@ -30,9 +30,6 @@ endif() find_package (OpenTURNS CONFIG REQUIRED) message (STATUS "Found OpenTURNS: ${OPENTURNS_ROOT_DIR} (found version \"${OPENTURNS_VERSION_STRING}\")") -if (NOT DEFINED OPENTURNS_PYTHON_MODULE_PATH) - set (OPENTURNS_PYTHON_MODULE_PATH ${OPENTURNS_PYTHON3_MODULE_PATH}) -endif () if (USE_EXTERNAL_LIBSVM) find_package (LibSVM 3.24 REQUIRED) @@ -57,16 +54,14 @@ set (OTSVM_DATA_PATH ${CMAKE_INSTALL_DATAROOTDIR}) set (OTSVM_CONFIG_CMAKE_PATH ${CMAKE_INSTALL_LIBDIR}/cmake/otsvm) set (OTSVM_DOC_PATH ${CMAKE_INSTALL_DOCDIR}) -set (CMAKE_CXX_STANDARD 11) - if (BUILD_PYTHON) find_package (SWIG 3) include (${SWIG_USE_FILE}) - if (CMAKE_VERSION VERSION_LESS 3.24) - find_package (Python 3.5 COMPONENTS Interpreter Development) + if (CMAKE_VERSION VERSION_LESS 3.28) + find_package (Python 3.6 COMPONENTS Interpreter Development) else () - find_package (Python 3.5 COMPONENTS Interpreter Development.Module) + find_package (Python 3.6 COMPONENTS Interpreter Development.Module Development.SABIModule) endif () if (Python_FOUND) @@ -80,7 +75,8 @@ if (BUILD_PYTHON) find_program (SPHINX_EXECUTABLE NAMES sphinx-build DOC "Sphinx Documentation Builder (sphinx-doc.org)") find_python_module (numpydoc) find_python_module (sphinx_gallery) - if (SPHINX_EXECUTABLE AND NUMPYDOC_FOUND AND SPHINX_GALLERY_FOUND AND MATPLOTLIB_FOUND) + find_python_module (sphinx_copybutton) + if (SPHINX_EXECUTABLE AND NUMPYDOC_FOUND AND SPHINX_GALLERY_FOUND AND SPHINX_COPYBUTTON_FOUND AND MATPLOTLIB_FOUND) find_python_module (sphinx) endif () if (NOT SPHINX_FOUND) @@ -137,7 +133,7 @@ endmacro ( ot_add_current_dir_to_include_dirs ) set ( CPACK_PACKAGE_NAME ${PACKAGE_NAME} ) set ( CPACK_PACKAGE_VERSION_MAJOR 0 ) -set ( CPACK_PACKAGE_VERSION_MINOR 14 ) +set ( CPACK_PACKAGE_VERSION_MINOR 15 ) set ( CPACK_PACKAGE_VERSION_PATCH ) set ( CPACK_SOURCE_GENERATOR "TGZ;TBZ2" ) set (CPACK_BINARY_STGZ OFF CACHE BOOL "STGZ") diff --git a/ChangeLog b/ChangeLog index 2a32f20..1edc13d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ += 0.15 release (wip) + + * Maintenance release + = 0.14 release (2024-05-02) * Maintenance release diff --git a/VERSION b/VERSION index 948a547..2856407 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.14 +0.15 diff --git a/distro/debian/changelog b/distro/debian/changelog index 70d3ec9..0f5f796 100644 --- a/distro/debian/changelog +++ b/distro/debian/changelog @@ -1,4 +1,4 @@ -otsvm (0.14-0.1) experimental; urgency=low +otsvm (0.15-0.1) experimental; urgency=low * Initial release. diff --git a/distro/rpm/otsvm.spec b/distro/rpm/otsvm.spec index a2bdbb2..ff5742e 100644 --- a/distro/rpm/otsvm.spec +++ b/distro/rpm/otsvm.spec @@ -20,7 +20,7 @@ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ -DBUILD_SHARED_LIBS:BOOL=ON Name: otsvm -Version: 0.14 +Version: 0.15 Release: 0%{?dist} Summary: OpenTURNS module Group: System Environment/Libraries diff --git a/python/doc/_templates/class.rst_t b/python/doc/_templates/class.rst_t index 0630f29..08f24fe 100644 --- a/python/doc/_templates/class.rst_t +++ b/python/doc/_templates/class.rst_t @@ -4,6 +4,7 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} + :exclude-members: __call__, thisown {% block methods %} .. automethod:: __init__ diff --git a/python/doc/conf.py.in b/python/doc/conf.py.in index 61e1ddc..f6cd3a1 100644 --- a/python/doc/conf.py.in +++ b/python/doc/conf.py.in @@ -67,6 +67,9 @@ imgmath_embed = True extensions.append('matplotlib.sphinxext.plot_directive') +extensions.append('sphinx_copybutton') +copybutton_prompt_text = ">>> " + extensions.append('sphinx_gallery.gen_gallery') sphinx_gallery_conf = { 'examples_dirs': ['examples'], # path to example scripts @@ -78,7 +81,7 @@ sphinx_gallery_conf = { templates_path = ['_templates'] # The suffix of source filenames. -source_suffix = '.rst' +source_suffix = {'.rst': 'restructuredtext'} # The encoding of source files. #source_encoding = 'utf-8-sig' @@ -287,3 +290,6 @@ texinfo_documents = [ # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' + +# If true, Sphinx will warn about all references where the target cannot be found. +nitpicky = True diff --git a/python/src/__init__.py b/python/src/__init__.py index 8469aed..d51b2a1 100644 --- a/python/src/__init__.py +++ b/python/src/__init__.py @@ -22,4 +22,4 @@ from .otsvm import * -__version__ = '0.14' +__version__ = '0.15'