Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v1.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigot committed Jan 23, 2025
2 parents 0901759 + 105161d commit 6415fbf
Show file tree
Hide file tree
Showing 34 changed files with 516 additions and 107 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@

name: pages
on:
push: { branches: [ main, 'v[0-9]+.[0-9]+' ] }
push:
branches: [ main, 'v[0-9]+\.[0-9]+' ]
tags: '[0-9]+\.[0-9]+\.[0-9]+'
pull_request:
jobs:
pages:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Security


## [1.8.1] - 2025-01-23

### Fixed
* Fix the indentation check script
[#515](https://github.com/pdidev/pdi/issues/515)


## [1.8.0] - 2024-11-28

### Added
Expand Down
27 changes: 17 additions & 10 deletions bin/test_indent
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash
#=============================================================================
# Copyright (C) 2024 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# Copyright (c) 2024-2025 Centre national de la recherche scientifique (CNRS)
# Copyright (c) 2024-2025 Commissariat a l'énergie atomique et aux énergies alternatives (CEA)
# Copyright (c) 2024-2025 Institut national de recherche en informatique et en automatique (Inria)
# Copyright (c) 2024-2025 Université Paris-Saclay
# Copyright (c) 2024-2025 Université de Versailles Saint-Quentin-en-Yvelines
#
# All rights reserved.
#
Expand Down Expand Up @@ -53,15 +57,18 @@ then
fi

# Look for a local version
for CLANG_FORMAT in clang-format-17 clang-format17 clang-format
do
CLANG_FORMAT="$(which "${CLANG_FORMAT}")"
if which "${CLANG_FORMAT}" >/dev/null && [ 17 -le "$("${CLANG_FORMAT}" --version | sed 's/.*version\s\+\([0-9]\+\)\..*/\1/')" 2>/dev/null ]
then
RUN_CLANG_FORMAT="python3 vendor/run-clang-format/run-clang-format.py --clang-format-executable ${CLANG_FORMAT}"
break
fi
done
if [ -f vendor/run-clang-format/run-clang-format.py ]
then
for CLANG_FORMAT in clang-format-17 clang-format17 clang-format
do
CLANG_FORMAT="$(which "${CLANG_FORMAT}")"
if which "${CLANG_FORMAT}" >/dev/null && [ 17 -le "$("${CLANG_FORMAT}" --version | sed 's/.*version\s\+\([0-9]\+\)\..*/\1/')" 2>/dev/null ]
then
RUN_CLANG_FORMAT="python3 vendor/run-clang-format/run-clang-format.py --clang-format-executable ${CLANG_FORMAT}"
break
fi
done
fi

if [ "${RUN_CLANG_FORMAT}" = false ]
then
Expand Down
4 changes: 2 additions & 2 deletions cmake/Findyaml.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#--------------------------------------------------------------------------------
# Copyright (c) 2012-2013, Lars Baehren <[email protected]>
# Copyright (C) 2020-2022 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# Copyright (C) 2020-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
Expand All @@ -24,7 +24,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#--------------------------------------------------------------------------------

cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16...3.25)

# - Check for the presence of libyaml
#
Expand Down
4 changes: 2 additions & 2 deletions cmake/SuperBuild.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2015-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand All @@ -22,7 +22,7 @@
# THE SOFTWARE.
################################################################################

cmake_minimum_required(VERSION 3.10...3.25)
cmake_minimum_required(VERSION 3.16...3.25)

include(GNUInstallDirs)
include(ExternalProject)
Expand Down
1 change: 1 addition & 0 deletions example/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Multiple people have contributed to the PDI examples. To show our appreciation
for their public spirit, we list here in alphabetical order a condensed list of
their contributions.


Julien Bigot - CEA ([email protected])
* Maintainer (Dec. 2014 - ...)
* Design and initial implementation
Expand Down
8 changes: 7 additions & 1 deletion example/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Changelog for PDI example project

All notable changes to the example project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
Expand All @@ -20,6 +19,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Security


## [1.8.1] - 2025-01-23

### Fixed
* Stop claiming to support old cmake versions we do not
[#507](https://github.com/pdidev/pdi/issues/507)


## [1.8.0] - 2024-11-28

### Changed
Expand Down
4 changes: 2 additions & 2 deletions example/cmake/DefaultKind.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2015-2019 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand All @@ -22,7 +22,7 @@
# THE SOFTWARE.
################################################################################

cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.16...3.25)

function(get_default_kind TYPE DEFAULT_KIND_VAR)
if(DEFINED "${DEFAULT_KIND_VAR}")
Expand Down
2 changes: 1 addition & 1 deletion example/cmake/FindPython/Support.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# This file is a "template" file used by various FindPython modules.
#

cmake_policy (VERSION 3.5)
cmake_policy (VERSION 3.16...3.25)

#
# Initial configuration
Expand Down
4 changes: 2 additions & 2 deletions example/cmake/FindPython3Path.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2015-2019 Commissariat a l'energie atomique et aux energies
# Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies
# alternatives (CEA)
# All rights reserved.
#
Expand All @@ -23,7 +23,7 @@
# THE SOFTWARE.
################################################################################

cmake_minimum_required(VERSION 3.10...3.25)
cmake_minimum_required(VERSION 3.16...3.25)

include(FindPackageHandleStandardArgs)

Expand Down
21 changes: 16 additions & 5 deletions pdi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,20 @@ and this project adheres to



## [1.8.0] - 2024-11-28
## [1.8.1] - 2025-01-23

### For users

#### Added
* Add the `Context::find()` method.
[#445](https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/445)
* Add the `pybind11::dtype to_python(const std::shared_ptr<const Scalar_datatype>& scalar_type)` helper function.
#### Fixed
* Stop claiming to support old cmake versions we do not
[#507](https://github.com/pdidev/pdi/issues/507)
* Fixed website generation
[#506](https://github.com/pdidev/pdi/issues/506)


## [1.8.0] - 2024-11-28

### For users

#### Changed
* Update the version of dependencies according to our policy: oldest supported
Expand All @@ -73,6 +79,11 @@ and this project adheres to
[#443](https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/443)
* Add the function `scalar_assign` to `Ref_any` to ease setting the value of a
scalar data buffer.
* Add the `Context::find()` method.
[#445](https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/445)
* Add the `pybind11::dtype to_python(const std::shared_ptr<const Scalar_datatype>& scalar_type)`
helper function.


#### Changed
* Replaced the astyle based indentation by a clang-format one, fixes
Expand Down
7 changes: 5 additions & 2 deletions pdi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if("${BUILD_PYTHON}")
set(PYBIND11_PYTHON_VERSION "${Python3_VERSION}" CACHE STRING "Python version to use for compiling modules" FORCE)
find_package(pybind11 2.4.3 REQUIRED) # must match PDIConfig.cmake.in
endif()
if("${BUILD_FORTRAN}")
if("${BUILD_FORTRAN}" OR "${BUILD_DOCUMENTATION}")
add_subdirectory("../vendor/zpp-1.0.16/" "zpp")
endif()

Expand Down Expand Up @@ -309,8 +309,11 @@ endif()

# Fortran API library

if("${BUILD_FORTRAN}")
if("${BUILD_FORTRAN}" OR "${BUILD_DOCUMENTATION}")
zpp_preprocess(OUTPUT PDIF_H SOURCES src/fortran/pdif.h.zpp)
add_custom_target(generated_files_for_doc DEPENDS "${PDIF_H}")
endif()
if("${BUILD_FORTRAN}")
zpp_preprocess(OUTPUT PDI_F90 SOURCES src/fortran/pdi.f90.zpp)
file(MAKE_DIRECTORY "${PDI_BINARY_DIR}/fmoddir")
add_custom_target(mv_zpp_files # we put in in fmoddir because pdif.h is compiler dependant
Expand Down
5 changes: 3 additions & 2 deletions pdi/cmake/DefaultKind.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2015-2019 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand All @@ -22,7 +22,8 @@
# THE SOFTWARE.
################################################################################

cmake_minimum_required(VERSION 3.10...3.25)
cmake_minimum_required(VERSION 3.16...3.25)

list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}")

function(get_default_kind TYPE DEFAULT_KIND_VAR)
Expand Down
3 changes: 2 additions & 1 deletion pdi/cmake/FindGMock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@
#
# add_test(AllTestsInFoo foo)

cmake_minimum_required(VERSION 3.10...3.25)
cmake_minimum_required(VERSION 3.16...3.25)

list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}")

function(__gmock_append_debugs _endvar _library)
Expand Down
2 changes: 1 addition & 1 deletion pdi/cmake/FindPython/Support.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# This file is a "template" file used by various FindPython modules.
#

cmake_policy (VERSION 3.5)
cmake_policy (VERSION 3.16...3.25)

#
# Initial configuration
Expand Down
4 changes: 2 additions & 2 deletions pdi/cmake/FindPython3Path.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2015-2019 Commissariat a l'energie atomique et aux energies
# Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies
# alternatives (CEA)
# All rights reserved.
#
Expand All @@ -23,7 +23,7 @@
# THE SOFTWARE.
################################################################################

cmake_minimum_required(VERSION 3.10...3.25)
cmake_minimum_required(VERSION 3.16...3.25)

include(FindPackageHandleStandardArgs)

Expand Down
4 changes: 2 additions & 2 deletions pdi/cmake/PDIConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2015-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand All @@ -22,7 +22,7 @@
# THE SOFTWARE.
################################################################################

cmake_minimum_required(VERSION 3.5...3.25)
cmake_minimum_required(VERSION 3.16...3.25)

list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}")

Expand Down
64 changes: 16 additions & 48 deletions pdi/docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,66 +29,24 @@

cmake_minimum_required(VERSION 3.16...3.29)

find_package(Doxygen 1.8.17 REQUIRED OPTIONAL_COMPONENTS dot)
find_package(Doxygen 1.8.17 REQUIRED)

add_custom_target(doc ALL)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html")

set(DOXYGEN_AUTOLINK_SUPPORT YES)
set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
set(DOXYGEN_DISABLE_INDEX YES)
set(DOXYGEN_ENUM_VALUES_PER_LINE 1)
set(DOXYGEN_EXAMPLE_PATH "${PDI_SOURCE_DIR}/.." "${PDI_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
set(DOXYGEN_EXPAND_ONLY_PREDEF YES)
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_EXTRACT_LOCAL_CLASSES NO)
set(DOXYGEN_FULL_PATH_NAMES NO)
set(DOXYGEN_GENERATE_TREEVIEW YES)
#set(DOXYGEN_GENERATE_XML YES) # Crashes on Gitlab CI
set(DOXYGEN_HTML_FOOTER "${CMAKE_CURRENT_SOURCE_DIR}/_template/footer.html")
set(DOXYGEN_HTML_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/_template/header.html")
set(DOXYGEN_HTML_STYLESHEET "${CMAKE_CURRENT_SOURCE_DIR}/_template/style.css")
set(DOXYGEN_HTML_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/html")
set(DOXYGEN_HTML_TIMESTAMP YES)
set(DOXYGEN_INCLUDE_GRAPH NO)
set(DOXYGEN_INCLUDE_PATH "${PDI_SOURCE_DIR}/include/" "${PDI_SOURCE_DIR}/src/" "${PDI_BINARY_DIR}")
set(DOXYGEN_INCLUDED_BY_GRAPH NO)
set(DOXYGEN_INLINE_SIMPLE_STRUCTS YES)
set(DOXYGEN_JAVADOC_AUTOBRIEF YES)
set(DOXYGEN_LAYOUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/_template/layout.xml")
set(DOXYGEN_MACRO_EXPANSION YES)
set(DOXYGEN_PREDEFINED "PDI_EXPORT=" "PDI_NO_EXPORT=" "PDI_DEPRECATED_EXPORT=")
set(DOXYGEN_PROJECT_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/_template/logo.png")
set(DOXYGEN_PROJECT_NUMBER "${PDI_VERSION}")
set(DOXYGEN_QT_AUTOBRIEF YES)
set(DOXYGEN_RECURSIVE NO)
set(DOXYGEN_SEARCHENGINE NO)
set(DOXYGEN_SHOW_FILES NO)
set(DOXYGEN_SHOW_INCLUDE_FILES NO)
set(DOXYGEN_SORT_MEMBER_DOCS NO)
set(DOXYGEN_SORT_MEMBERS_CTORS_1ST YES)
set(DOXYGEN_TOC_INCLUDE_HEADINGS 4)
set(DOXYGEN_TYPEDEF_HIDES_STRUCT YES)
set(DOXYGEN_UML_LIMIT_NUM_FIELDS 20)
set(DOXYGEN_UML_LOOK YES)
set(DOXYGEN_WARN_NO_PARAMDOC YES)
set(DOXYGEN_IMAGE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/images")
doxygen_add_docs(doxygen_doc
set(DOXYGEN_INPUT
"${CMAKE_CURRENT_SOURCE_DIR}/About.md"
"${CMAKE_CURRENT_SOURCE_DIR}/Concepts.md"
"${CMAKE_CURRENT_SOURCE_DIR}/FAQ.md"
"${CMAKE_CURRENT_SOURCE_DIR}/First_steps.md"
"${CMAKE_CURRENT_SOURCE_DIR}/How_to_create_plugin.md"
"${CMAKE_CURRENT_SOURCE_DIR}/Installation.md"
"${CMAKE_CURRENT_SOURCE_DIR}/modules.md"
"${CMAKE_CURRENT_SOURCE_DIR}/Plugins.md"
"${CMAKE_CURRENT_SOURCE_DIR}/Specification_tree_ref.md"
"${CMAKE_CURRENT_SOURCE_DIR}/Source_installation.md"
"${CMAKE_CURRENT_SOURCE_DIR}/Using_PDI.md"
"${CMAKE_CURRENT_SOURCE_DIR}/Yaml.md"
"${PDI_BINARY_DIR}/pdi/export.h"
"${PDI_BINARY_DIR}/pdi/version.h"
"${PDI_BINARY_DIR}/fmoddir/pdif.h"
"${PDIF_H}"
"${PDI_SOURCE_DIR}/include/pdi.h"
"${PDI_SOURCE_DIR}/include/pdi/"
"${PDI_SOURCE_DIR}/../example/README.md"
Expand All @@ -102,6 +60,16 @@ doxygen_add_docs(doxygen_doc
"${PDI_SOURCE_DIR}/../plugins/serialize/README.md"
"${PDI_SOURCE_DIR}/../plugins/set_value/README.md"
"${PDI_SOURCE_DIR}/../plugins/json/README.md")
add_subdirectory(First_steps)
add_dependencies(doc doxygen_doc)

file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html")
string(REPLACE ";" " " DOXYGEN_INPUT_SP "${DOXYGEN_INPUT}")
configure_file(Doxyfile "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
add_custom_target(doc ALL
Doxygen::doxygen "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${DOXYGEN_INPUT}
)
add_dependencies(doc generated_files_for_doc)
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "${CMAKE_INSTALL_DOCDIR}/html")

add_subdirectory(First_steps)
Loading

0 comments on commit 6415fbf

Please sign in to comment.