Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.3.1.0 #26

Merged
merged 26 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
bfc7d58
Clean jupyter notebook
philippeVerney Sep 18, 2024
23c6f73
Bug fix when inheriting and setting dataspaceOSDUHandlers in cs and java
philippeVerney Sep 18, 2024
2099438
PyPI documentation now points to examples in main branch
philippeVerney Sep 18, 2024
a0d5e6b
Python wheel now targets FESAPI 2.11.0.0
philippeVerney Sep 19, 2024
69fb8e3
Modify DLL name to contain only SOVERSION as prefix (not all versions)
philippeVerney Oct 2, 2024
66bbb79
Add a "Put Horizon" jupyter notebook
philippeVerney Oct 2, 2024
c52aab2
FesapiHelpers now also support UUID only methods
philippeVerney Oct 7, 2024
4fafc98
Bump CI to Ubuntu 22.04
philippeVerney Oct 24, 2024
cd8bdd4
Fix sourceforge download in CI
philippeVerney Oct 29, 2024
2afc25f
Build wheel for macos in CI
philippeVerney Nov 12, 2024
0c61b35
Allow to specify its own CXX standard version (default set to 11)
philippeVerney Nov 14, 2024
df89e45
Move from setup.py to pyproject.toml
philippeVerney Nov 14, 2024
36378ce
Clean Jupyter Notebooks
philippeVerney Nov 15, 2024
6e48e72
Automatically use multipart request if necessary for AbstractSession:…
philippeVerney Nov 20, 2024
e897781
Add test after wheel building
philippeVerney Nov 21, 2024
2e71203
Bug fix : ETP server URL without any path
philippeVerney Nov 22, 2024
3c21b28
Set default C+ version to 17
philippeVerney Nov 22, 2024
30b062d
Put the Python C/C++ module in the fetpapi package
philippeVerney Nov 22, 2024
e44b275
Add copyDataObjectsByValue new experimental ETP message
philippeVerney Nov 28, 2024
2b4ab41
Now install local vcpkg dependencies at Python wheel building
philippeVerney Nov 28, 2024
7989f29
Bump date.h to version 3.0.3
philippeVerney Nov 28, 2024
62f3e4f
Generate Windows wheels
philippeVerney Nov 28, 2024
adc2aba
Update boost binaries download URL
philippeVerney Jan 10, 2025
48826e6
Bump wheels to FESAPI v2.12.1.0
philippeVerney Jan 13, 2025
98ae973
Allow to set the session of a FESAPI HDF Proxy
philippeVerney Jan 14, 2025
8a2f1d8
Clean Jupyter Notebooks
philippeVerney Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
244 changes: 176 additions & 68 deletions .github/workflows/github-actions.yml

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions .github/workflows/release.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Actions to run when releasing

on:
release:
types: [published]

env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITHUB_REF_NAME: ${{ github.ref_name }}

jobs:
# Remark : https://github.com/orgs/community/discussions/46034
add-checksum:
runs-on: ubuntu-latest
steps:
# It is necessary to checkout the repository for GitHub CLI to know which repository to target
- name: Checkout repository
uses: actions/checkout@v4
- name: ZIP checksum
run: |
gh release download --archive=zip
shasum -a 256 *.zip > fetpapi-${GITHUB_REF_NAME#v}.zip.sha256.txt
gh release upload ${{ github.ref_name }} fetpapi-${GITHUB_REF_NAME#v}.zip.sha256.txt
- name: TAR.GZ checksum
run: |
gh release download --archive=tar.gz
shasum -a 256 *.tar.gz > fetpapi-${GITHUB_REF_NAME#v}.tar.gz.sha256.txt
gh release upload ${{ github.ref_name }} fetpapi-${GITHUB_REF_NAME#v}.tar.gz.sha256.txt

38 changes: 19 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (WIN32)
cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 3.27)
else ()
cmake_minimum_required(VERSION 3.12)
endif (WIN32)
Expand All @@ -16,7 +16,7 @@ set (FETPAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
# version mechanism
set (Fetpapi_VERSION_MAJOR 0)
set (Fetpapi_VERSION_MINOR 3)
set (Fetpapi_VERSION_PATCH 0)
set (Fetpapi_VERSION_PATCH 1)
set (Fetpapi_VERSION_TWEAK 0)

set (Fetpapi_VERSION ${Fetpapi_VERSION_MAJOR}.${Fetpapi_VERSION_MINOR}.${Fetpapi_VERSION_PATCH}.${Fetpapi_VERSION_TWEAK})
Expand All @@ -25,7 +25,9 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/install CACHE PATH "${PROJECT_NAME} install prefix" FORCE)
endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

set(CMAKE_CXX_STANDARD 11)
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
Expand All @@ -51,6 +53,7 @@ target_compile_options(${PROJECT_NAME} PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/bigobj>
$<$<CXX_COMPILER_ID:MSVC>:/MP>
$<$<CXX_COMPILER_ID:MSVC>:/W4>
$<$<CXX_COMPILER_ID:MSVC>:/utf-8> # Necessary for fmt library which AVRO depends on
$<$<CXX_COMPILER_ID:GNU>:-Wall>
$<$<CXX_COMPILER_ID:GNU>:-Wextra>
$<$<CXX_COMPILER_ID:GNU>:-Wcast-qual>
Expand Down Expand Up @@ -108,6 +111,12 @@ endif()
if (WIN32 AND (Boost_VERSION_MAJOR EQUAL 1) AND (Boost_VERSION_MINOR LESS 74) AND (Boost_VERSION_MINOR GREATER 71))
message(WARNING "You may experience min/max issue with this boost version : See https://github.com/boostorg/beast/issues/1980")
endif ()
target_compile_definitions(${PROJECT_NAME} PRIVATE BOOST_ALL_NO_LIB)
if (DEFINED Boost_SYSTEM_LIBRARY)
target_link_libraries (${PROJECT_NAME} PRIVATE Boost::system)
else ()
target_link_libraries (${PROJECT_NAME} PRIVATE Boost::boost)
endif()

# avro DEPENDENCY
find_package(AVRO REQUIRED)
Expand All @@ -122,23 +131,17 @@ if (WITH_FESAPI)
endif (WITH_JAVA_WRAPPING)
endif (WITH_FESAPI)

target_compile_definitions(${PROJECT_NAME} PRIVATE BOOST_ALL_NO_LIB)
target_link_libraries (${PROJECT_NAME} PRIVATE AVRO::AVRO ${CMAKE_THREAD_LIBS_INIT})
if (DEFINED Boost_SYSTEM_LIBRARY)
target_link_libraries (${PROJECT_NAME} PRIVATE ${Boost_SYSTEM_LIBRARY})
endif()
if (WIN32)
target_link_libraries (${PROJECT_NAME} PRIVATE bcrypt.lib)

set_target_properties(${PROJECT_NAME} PROPERTIES
PDB_NAME ${PROJECT_NAME}.${Fetpapi_VERSION}
PDB_NAME_DEBUG ${PROJECT_NAME}${CMAKE_DEBUG_POSTFIX}.${Fetpapi_VERSION}
LINK_FLAGS "/INCREMENTAL:NO /OPT:REF"
RUNTIME_OUTPUT_DIRECTORY ${FETPAPI_BINARY_DIR}
SUFFIX .${Fetpapi_VERSION}.dll
IMPORT_SUFFIX .${Fetpapi_VERSION}.lib
VERSION ${Fetpapi_VERSION_MAJOR}.${Fetpapi_VERSION_MINOR}
)
IMPORT_SUFFIX -${Fetpapi_VERSION_MAJOR}.${Fetpapi_VERSION_MINOR}.lib
DLL_NAME_WITH_SOVERSION TRUE
VERSION ${Fetpapi_VERSION}
SOVERSION ${Fetpapi_VERSION_MAJOR}.${Fetpapi_VERSION_MINOR})
else (WIN32)
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${Fetpapi_VERSION}
Expand Down Expand Up @@ -210,7 +213,7 @@ endif (WITH_FESAPI)

target_sources(${PROJECT_NAME} PRIVATE ${ALL_SOURCES_AND_HEADERS})

target_include_directories(${PROJECT_NAME} SYSTEM PRIVATE ${AVRO_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} SYSTEM PRIVATE ${AVRO_INCLUDE_DIR})
if (WITH_ETP_SSL)
target_include_directories(${PROJECT_NAME} SYSTEM PRIVATE ${OPENSSL_INCLUDE_DIR})
endif ()
Expand Down Expand Up @@ -339,17 +342,14 @@ if (WITH_PYTHON_WRAPPING)
TARGETS ${PROJECT_NAME}
RUNTIME_DEPENDENCY_SET dep-set
)
cmake_path(GET SSL_EAY_RELEASE PARENT_PATH openSslLibPath)
cmake_path(GET openSslLibPath PARENT_PATH openSslPath)
cmake_path(APPEND openSslPath "bin" OUTPUT_VARIABLE openSslBinPath)
install(
RUNTIME_DEPENDENCY_SET dep-set
PRE_EXCLUDE_REGEXES "api-ms-.*" "ext-ms-.*" "[Ff]esapi[Cc]pp.*\\.dll"
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll"
DIRECTORIES ${openSslBinPath}
DIRECTORIES ${CMAKE_BINARY_DIR}
RUNTIME DESTINATION ${CMAKE_SOURCE_DIR}/python/fetpapi/
)
ENDIF (WIN32)
install(CODE "execute_process(COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/setup.py bdist_wheel
install(CODE "execute_process(COMMAND \"${Python3_EXECUTABLE}\" -m build --wheel
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/python)")
endif (WITH_PYTHON_WRAPPING)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
- fetpapi (Git clone this repository into this folder "fetpapi". You should then have a path fetpapiEnv/fetpapi/src)
- dependencies
- The following compilers are known to work (used in CI)
- gcc from version 4.8
- gcc from version 8
- visual studio from version 2019
# Prepare the dependencies
Download (build and install if necessary) third party libraries:
- BOOST : All versions from version 1.66 should be ok but you may experience some [min/max build issues](https://github.com/boostorg/beast/issues/1980) using version 1.72 or 1.73.
- AVRO : https://avro.apache.org/releases.html#Download (starting from version 1.9.0 [except 1.11.1](https://issues.apache.org/jira/browse/AVRO-3601), build it with the above boost library.)
- (OPTIONALLY) OpenSSL : version 1.1 is known to work.
- (OPTIONALLY) [FESAPI](https://github.com/F2I-Consulting/fesapi/releases) : All versions from version 2.7.0.0 should be ok.
- (OPTIONALLY) [FESAPI](https://github.com/F2I-Consulting/fesapi/releases) : All versions from version 2.7.0.0 should be ok but a minimal version of 2.11.0.0 is recommended to automatically recognize FESAPI CMake Variables using CMake find Module and build silently the EtpClient example.

# Configure the build
FETPAPI uses cmake as its build tool. A 3.12 version or later of cmake is required https://cmake.org/download/. We also recommend using cmake-gui (already included in the bin folder of the binary releases of cmake) which provides a graphical user interface on top of cmake. If you want to use cmake in command line, you would find example in [Github Actions file](./.github/workflows/github-actions.yml). Follow the below instructions :
Expand Down
10 changes: 3 additions & 7 deletions cmake/modules/FindFESAPI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,9 @@ list(APPEND _FESAPI_SEARCHES _FESAPI_SEARCH_NORMAL)
# The maximum of ranges are defined totally arbitrarily
set(FESAPI_NAMES FesapiCpp)
set(FESAPI_NAMES_DEBUG FesapiCppd)
foreach(minorVer RANGE 7 15)
foreach(patchVer RANGE 0 5)
foreach(tweakVer RANGE 0 5)
list(APPEND FESAPI_NAMES FesapiCpp.2.${minorVer}.${patchVer}.${tweakVer})
list(APPEND FESAPI_NAMES_DEBUG FesapiCppd.2.${minorVer}.${patchVer}.${tweakVer})
endforeach()
endforeach()
foreach(minorVer RANGE 11 99)
list(APPEND FESAPI_NAMES FesapiCpp-2.${minorVer})
list(APPEND FESAPI_NAMES_DEBUG FesapiCppd-2.${minorVer})
endforeach()

# Try each search configuration.
Expand Down
63 changes: 63 additions & 0 deletions cmake/pyproject.toml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = 'fetpapi'
version = '${Fetpapi_PYTHON_VERSION}'
authors = [
{name = "F2I-CONSULTING"},
]
maintainers = [
{name = "F2I-CONSULTING"},
]
description = "A library for using the Energistics Transfer Protocol"
readme = "README.md"
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Application Frameworks ',
'Topic :: File Formats',
]
keywords = [
"energistics",
"resqml",
"eml",
"witsml",
"prodml",
"osdu",
"rddms",
]
requires-python = ">=3.8"
dependencies = [
'fesapi==2.12.1',
]

[project.urls]
source = "https://github.com/F2I-Consulting/fetpapi/issues"
releasenotes = "https://github.com/F2I-Consulting/fetpapi/releases"
documentation = "https://www.f2i-consulting.com/fetpapi/doxygen/"
issues = "https://github.com/F2I-Consulting/fetpapi/issues"

[tool.setuptools]
packages=['fetpapi']
package-dir={"fetpapi" = "fetpapi"}
ext-modules = [
{name='fetpapi._fetpapi', sources=['swigGeneratedPythonWrapper.cpp'], include-dirs=['${Boost_INCLUDE_DIR}','${AVRO_INCLUDE_DIR}'${FESAPI_INCLUDE_DIR_FOR_SETUP_PY}], library-dirs=['${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}'${AVRO_LIBRARY_DIR_RELEASE}${Boost_LIBRARY_DIR_RELEASE}${FESAPI_LIBRARY_DIR_RELEASE}], libraries=['${ASSEMBLY_NAME}'${AVRO_LIBRARY_RELEASE_WLE}${Boost_LIBRARY_RELEASE_WLE}${FESAPI_LIBRARY_RELEASE_WLE}], ${EXTRA_COMPILE_ARGS}}
]

[tool.setuptools.package-data]
fetpapi = ["*.dll", "*.so", "*.so.*"]
63 changes: 0 additions & 63 deletions cmake/setup_etp.py.in

This file was deleted.

Loading
Loading