From bf388bc1464c12a8ba4f904c740db8950c484969 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Fri, 11 Oct 2024 17:27:46 +0200 Subject: [PATCH] Sync --- .ci_support/run_docker_linux.sh | 2 +- CMakeLists.txt | 15 +++++++-------- ChangeLog | 4 ++++ VERSION | 2 +- distro/debian/changelog | 2 +- distro/rpm/otmorris.spec | 2 +- python/doc/_templates/class.rst_t | 2 +- python/doc/conf.py.in | 10 ++++++++-- .../doc/developer_guide/validation/validation.rst | 6 +++--- python/doc/user_manual/user_manual.rst | 1 + python/src/__init__.py | 2 +- 11 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.ci_support/run_docker_linux.sh b/.ci_support/run_docker_linux.sh index 77ed331..07274db 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 -Wshadow -Werror -D_GLIBCXX_ASSERTIONS" \ -DSWIG_COMPILE_FLAGS="-O1 -Wno-unused-parameter -Wno-shadow" \ - -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 cd91871..b60d5a8 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) # By default, build in Release mode. Must appear before project() command @@ -53,16 +53,14 @@ set (OTMORRIS_DATA_PATH ${CMAKE_INSTALL_DATAROOTDIR}) set (OTMORRIS_CONFIG_CMAKE_PATH ${CMAKE_INSTALL_LIBDIR}/cmake/otmorris) set (OTMORRIS_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) @@ -76,7 +74,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) @@ -133,7 +132,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 16 ) +set ( CPACK_PACKAGE_VERSION_MINOR 17 ) 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 e75cee8..7c67ad8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ += 0.17 release (wip) + + * Make bounds argument last to disambiguate constructors + = 0.16 release (2024-05-02) * Maintenance diff --git a/VERSION b/VERSION index 8eac30c..50653ad 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.16 +0.17 diff --git a/distro/debian/changelog b/distro/debian/changelog index 21442e7..a351418 100644 --- a/distro/debian/changelog +++ b/distro/debian/changelog @@ -1,4 +1,4 @@ -otmorris (0.16-0.1) unstable; urgency=low +otmorris (0.17-0.1) unstable; urgency=low * Non-maintainer upload. * Initial release. diff --git a/distro/rpm/otmorris.spec b/distro/rpm/otmorris.spec index 954f3cb..3587e74 100644 --- a/distro/rpm/otmorris.spec +++ b/distro/rpm/otmorris.spec @@ -20,7 +20,7 @@ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ -DBUILD_SHARED_LIBS:BOOL=ON Name: otmorris -Version: 0.16 +Version: 0.17 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..233c04a 100644 --- a/python/doc/_templates/class.rst_t +++ b/python/doc/_templates/class.rst_t @@ -4,9 +4,9 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} + :exclude-members: __call__, thisown {% block methods %} .. automethod:: __init__ {% endblock %} - diff --git a/python/doc/conf.py.in b/python/doc/conf.py.in index 08f1066..07511b6 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' @@ -88,7 +91,7 @@ master_doc = 'index' # General information about the project. project = u'OTMORRIS' -copyright = u'2015, Airbus-EDF-IMACS-Phimeca' +copyright = u'2015-2024, Airbus-EDF-IMACS-Phimeca' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -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/doc/developer_guide/validation/validation.rst b/python/doc/developer_guide/validation/validation.rst index e702aca..99fcaa5 100644 --- a/python/doc/developer_guide/validation/validation.rst +++ b/python/doc/developer_guide/validation/validation.rst @@ -36,9 +36,9 @@ We plot hereafter results obtained with the module (left) and those issued from We note that the results seem very close. Indeed, we may note that from a important number of trajectories, we get the same group structure: - - The variables with linear effects (:math:`X_8,\ X_9\ and\ X_{10}`), - - The variables that have significant and non linear (or with interactions) effects (:math:`X_1\ to\ X_7`), - - The group with variables that have negligible seems to be the same with the two tools (the other variables from :math:`X_{11}\ to\ X_{20}`). + - The variables with linear effects (:math:`X_8, X_9` and :math:`X_{10}`), + - The variables that have significant and non linear (or with interactions) effects (:math:`X_1` to :math:`X_7`), + - The group with variables that have negligible seems to be the same with the two tools (the other variables from :math:`X_{11}` to math:`X_{20}`). The results are satisfying. diff --git a/python/doc/user_manual/user_manual.rst b/python/doc/user_manual/user_manual.rst index 3328a3a..253accb 100644 --- a/python/doc/user_manual/user_manual.rst +++ b/python/doc/user_manual/user_manual.rst @@ -102,5 +102,6 @@ Morris function .. currentmodule:: otmorris .. autosummary:: :toctree: _generated/ + :template: class.rst_t MorrisFunction diff --git a/python/src/__init__.py b/python/src/__init__.py index c86a16f..e751ecd 100644 --- a/python/src/__init__.py +++ b/python/src/__init__.py @@ -16,4 +16,4 @@ from .otmorris import * -__version__ = '0.16' +__version__ = '0.17'