Skip to content

Commit a3e3015

Browse files
Merge pull request #351 from F2I-Consulting/dev
v2.11.0.0
2 parents 2372715 + 755abd5 commit a3e3015

197 files changed

Lines changed: 2187 additions & 1541 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/github-actions.yml

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
cmake --build . --config Release --target INSTALL
2222
- name: Boost install
2323
run: |
24-
(New-Object System.Net.WebClient).DownloadFile("https://sourceforge.net/projects/boost/files/boost-binaries/1.85.0/boost_1_85_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
24+
(New-Object System.Net.WebClient).DownloadFile("https://boostorg.jfrog.io/artifactory/main/release/1.86.0/binaries/boost_1_86_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
2525
Start-Process -Wait -FilePath "${{ runner.temp }}\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${{ runner.temp }}\boost-install"
2626
- name: CMake build and install
2727
run: |
@@ -70,28 +70,28 @@ jobs:
7070
cmake --build . --config Release --target INSTALL
7171
- name: HDF5 install
7272
run: |
73-
Invoke-WebRequest https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-1.14.3/src/hdf5-1.14.3.zip -OutFile ${{ runner.temp }}\hdf5-1.14.3.zip
73+
Invoke-WebRequest https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/downloads/hdf5-1.14.5.zip -OutFile ${{ runner.temp }}\hdf5-1.14.5.zip
7474
cd ${{ runner.temp }}
75-
Expand-Archive ${{ runner.temp }}\hdf5-1.14.3.zip -DestinationPath ${{ runner.temp }}
75+
Expand-Archive ${{ runner.temp }}\hdf5-1.14.5.zip -DestinationPath ${{ runner.temp }}
7676
mkdir hdf5-build
7777
cd hdf5-build
78-
cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON -DZLIB_INCLUDE_DIR:PATH=${{ runner.temp }}/zlib-install/include -DZLIB_LIBRARY:PATH=${{ runner.temp }}/zlib-install/lib/zlibstatic.lib -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_ENABLE_PARALLEL:BOOL=OFF -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DHDF5_BUILD_EXAMPLES:BOOL=OFF -DHDF5_BUILD_GENERATORS:BOOL=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF -DHDF5_BUILD_UTILS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/hdf5-install ${{ runner.temp }}/hdf5-1.14.3
78+
cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON -DZLIB_INCLUDE_DIR:PATH=${{ runner.temp }}/zlib-install/include -DZLIB_LIBRARY:PATH=${{ runner.temp }}/zlib-install/lib/zlibstatic.lib -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_ENABLE_PARALLEL:BOOL=OFF -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DHDF5_BUILD_EXAMPLES:BOOL=OFF -DHDF5_BUILD_GENERATORS:BOOL=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF -DHDF5_BUILD_UTILS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/hdf5-install ${{ runner.temp }}/hdf5-1.14.5
7979
cmake --build . --config Release -j2
8080
cmake --build . --config Release --target INSTALL
8181
- name: Boost install
8282
run: |
83-
(New-Object System.Net.WebClient).DownloadFile("https://sourceforge.net/projects/boost/files/boost-binaries/1.84.0//boost_1_84_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
83+
(New-Object System.Net.WebClient).DownloadFile("https://boostorg.jfrog.io/artifactory/main/release/1.86.0/binaries/boost_1_86_0-msvc-14.2-64.exe", "${{ runner.temp }}\boost.exe")
8484
Start-Process -Wait -FilePath "${{ runner.temp }}\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${{ runner.temp }}\boost-install"
8585
- name: Swig install
8686
run: |
87-
(New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.2.0.zip", "${{ runner.temp }}\swigwin-4.2.0.zip")
88-
7z x ${{ runner.temp }}\swigwin-4.2.0.zip -o${{ runner.temp }}
87+
(New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.3.0.zip", "${{ runner.temp }}\swigwin-4.3.0.zip")
88+
7z x ${{ runner.temp }}\swigwin-4.3.0.zip -o${{ runner.temp }}
8989
- name: CMake build and install
9090
run: |
9191
cd ${{ github.workspace }}/..
9292
mkdir build
9393
cd build
94-
cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DHDF5_ROOT=${{ runner.temp }}/hdf5-install -DHDF5_USE_STATIC_LIBRARIES=TRUE -DMINIZIP_ROOT=${{ runner.temp }}/minizip-install -DZLIB_ROOT=${{ runner.temp }}/zlib-install -DZLIB_USE_STATIC_LIBS=TRUE -DBoost_INCLUDE_DIR=${{ runner.temp }}/boost-install -DWITH_EXAMPLE=TRUE -DWITH_RESQML2_2=TRUE -DWITH_DOTNET_WRAPPING=TRUE -DSWIG_EXECUTABLE=${{ runner.temp }}/swigwin-4.2.0/swig.exe -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install ${{ github.workspace }}
94+
cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DHDF5_ROOT=${{ runner.temp }}/hdf5-install -DHDF5_USE_STATIC_LIBRARIES=TRUE -DMINIZIP_ROOT=${{ runner.temp }}/minizip-install -DZLIB_ROOT=${{ runner.temp }}/zlib-install -DZLIB_USE_STATIC_LIBS=TRUE -DBoost_INCLUDE_DIR=${{ runner.temp }}/boost-install -DWITH_EXAMPLE=TRUE -DWITH_RESQML2_2=TRUE -DWITH_DOTNET_WRAPPING=TRUE -DSWIG_EXECUTABLE=${{ runner.temp }}/swigwin-4.3.0/swig.exe -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install ${{ github.workspace }}
9595
cmake --build . --config Release -j2
9696
cmake --build . --config Release --target INSTALL
9797
- name: Add msbuild to PATH
@@ -166,12 +166,9 @@ jobs:
166166
with:
167167
name: ubuntu-20.04-${{ matrix.cxx }}
168168
path: ${{ runner.temp }}/fesapi-install
169-
build_wheels:
170-
name: Build wheels on ${{ matrix.os }}
171-
runs-on: ${{ matrix.os }}
172-
strategy:
173-
matrix:
174-
os: [ubuntu-latest]
169+
build_wheels_linux:
170+
name: Build wheels on ubuntu-latest
171+
runs-on: ubuntu-latest
175172
steps:
176173
- uses: actions/checkout@v4
177174
- name: Stub `setup.py` check
@@ -212,7 +209,54 @@ jobs:
212209
output-dir: wheelhouse
213210
- uses: actions/upload-artifact@v4
214211
with:
215-
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
212+
name: cibw-wheels-ubuntu-latest
213+
path: ./wheelhouse/*.whl
214+
build_wheels_mac:
215+
name: Build wheels on macos-14
216+
runs-on: macos-14
217+
steps:
218+
- uses: actions/checkout@v4
219+
- name: Stub `setup.py` check
220+
# It will be generated during CMake run
221+
# https://github.com/pypa/cibuildwheel/issues/1139
222+
run: touch python/setup.py
223+
- name: Build wheels
224+
uses: pypa/cibuildwheel@v2.19.2
225+
env:
226+
CIBW_BUILD: cp38-macosx_* cp39-macosx_* cp310-macosx_* cp311-macosx_* cp312-macosx_* cp313-macosx_*
227+
CIBW_ARCHS: auto64
228+
CIBW_BEFORE_ALL: >
229+
brew install boost swig &&
230+
git clone https://github.com/F2I-Consulting/Minizip.git ${{ github.workspace }}/../minizip &&
231+
cd ${{ github.workspace }}/.. &&
232+
mkdir minizip-build &&
233+
cd minizip-build &&
234+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/../minizip-install ${{ github.workspace }}/../minizip &&
235+
cmake --build . -j2 --config Release &&
236+
cmake --install . &&
237+
cd ${{ github.workspace }}/.. &&
238+
wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.5/hdf5-1.14.5.tar.gz &&
239+
tar xf hdf5-1.14.5.tar.gz &&
240+
mkdir hdf5-build &&
241+
cd hdf5-build &&
242+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF -DHDF5_BUILD_EXAMPLES:BOOL=OFF -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX:STRING=${{ github.workspace }}/../hdf5-install ../hdf5-1.14.5 &&
243+
cmake --build . -j2 --config Release &&
244+
cmake --install . &&
245+
mkdir ${{ github.workspace }}/../build &&
246+
cd ${{ github.workspace }}/../build &&
247+
cmake -DCMAKE_BUILD_TYPE=Release -DMINIZIP_ROOT=${{ github.workspace }}/../minizip-install -DHDF5_ROOT=${{ github.workspace }}/../hdf5-install -DHDF5_USE_STATIC_LIBRARIES=TRUE -DWITH_PYTHON_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX:STRING=${{ github.workspace }}/../fesapi-install ${{ github.workspace }} &&
248+
cmake --build . -j2 --config Release &&
249+
cmake --install .
250+
# See https://cibuildwheel.pypa.io/en/stable/faq/#macos-passing-dyld_library_path-to-delocate
251+
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
252+
DYLD_LIBRARY_PATH=${{ github.workspace }}/../fesapi-install/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
253+
CIBW_TEST_COMMAND: python ${{ github.workspace }}/python/example/example.py
254+
with:
255+
package-dir: ./python
256+
output-dir: wheelhouse
257+
- uses: actions/upload-artifact@v4
258+
with:
259+
name: cibw-wheels-macos-14
216260
path: ./wheelhouse/*.whl
217261
ubuntu-20-mpi:
218262
runs-on: ubuntu-20.04
@@ -235,8 +279,8 @@ jobs:
235279
cmake --install .
236280
- name: Run example
237281
run: mpiexec -n 2 ${{ runner.temp }}/fesapi-install/example
238-
ubuntu-20-valgrind-unitTest:
239-
runs-on: ubuntu-20.04
282+
ubuntu-latest-valgrind-unitTest:
283+
runs-on: ubuntu-latest
240284
steps:
241285
- uses: actions/checkout@v4
242286
- name: APT install
@@ -249,7 +293,7 @@ jobs:
249293
mkdir build
250294
cd build
251295
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_EXAMPLE=TRUE -DWITH_RESQML2_2=TRUE -DWITH_TEST=TRUE -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install ${{ github.workspace }}
252-
cmake --build . -j2
296+
cmake --build . -j2 --config Debug
253297
cmake --install .
254298
- name: Run Valgrind on example
255299
run: |

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ set (FESAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
1212

1313
# version mechanism
1414
set (Fesapi_VERSION_MAJOR 2)
15-
set (Fesapi_VERSION_MINOR 10)
16-
set (Fesapi_VERSION_PATCH 1)
15+
set (Fesapi_VERSION_MINOR 11)
16+
set (Fesapi_VERSION_PATCH 0)
1717
set (Fesapi_VERSION_TWEAK 0)
1818

1919
set (Fesapi_VERSION ${Fesapi_VERSION_MAJOR}.${Fesapi_VERSION_MINOR}.${Fesapi_VERSION_PATCH}.${Fesapi_VERSION_TWEAK})
@@ -30,7 +30,9 @@ IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
3030
set (CMAKE_INSTALL_PREFIX ${FESAPI_BINARY_DIR}/install CACHE PATH "FesapiCpp install prefix" FORCE)
3131
ENDIF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
3232

33-
set(CMAKE_CXX_STANDARD 11)
33+
if (NOT DEFINED CMAKE_CXX_STANDARD)
34+
set(CMAKE_CXX_STANDARD 11)
35+
endif()
3436
set(CMAKE_CXX_STANDARD_REQUIRED ON)
3537
set(CMAKE_CXX_EXTENSIONS OFF)
3638
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)

cmake/setup.py.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ setup (name = 'fesapi',
1717

1818
### Examples
1919

20-
A Python script and a Jupyter Notebook are available [here](https://github.com/F2I-Consulting/fesapi/tree/dev/python/example).
20+
A Python script and a Jupyter Notebook are available [here](https://github.com/F2I-Consulting/fesapi/tree/master/python/example).
2121

2222
### Credits
2323
This software was developed with :

cmake/swigPythonInclude.i.in

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,21 @@ namespace COMMON_NS
2626
swig_type_info * const outtype = [&] {
2727
if (result != nullptr)
2828
{
29-
const std::string cppNs = [&] {
29+
const std::string xmlTag = result->getXmlTag();
30+
if (xmlTag == "EpcExternalPartReference") {
31+
return SWIG_TypeQuery("eml2::EpcExternalPartReference *");
32+
}
33+
const std::string cppNs = [&result] {
3034
const std::string xmlNs(result->getXmlNamespace());
31-
if (xmlNs == "eml20") return "${FESAPI_EML2_0_NS}";
32-
else if (xmlNs == "eml23") return "${FESAPI_EML2_3_NS}";
33-
else if (xmlNs == "resqml20") return "${FESAPI_RESQML2_0_1_NS}";
35+
if (xmlNs == "resqml20") return "${FESAPI_RESQML2_0_1_NS}";
3436
else if (xmlNs == "resqml22") return "${FESAPI_RESQML2_2_NS}";
3537
else if (xmlNs == "witsml21") return "${FESAPI_WITSML2_1_NS}";
3638
else if (xmlNs == "prodml22") return "${FESAPI_PRODML2_2_NS}";
39+
else if (xmlNs == "eml23") return "${FESAPI_EML2_3_NS}";
3740
}();
3841

3942
// Check potential downcasting
40-
return SWIG_TypeQuery((cppNs + "::" + result->getXmlTag() + " *").c_str());
43+
return SWIG_TypeQuery((cppNs + "::" + xmlTag + " *").c_str());
4144
}
4245
else {
4346
return $descriptor;
@@ -49,22 +52,32 @@ namespace COMMON_NS
4952

5053
namespace EML2_NS
5154
{
52-
%typemap(out) Activity*, ActivityTemplate*, EpcExternalPartReference*, PropertyKind*, TimeSeries*
55+
%typemap(out) EpcExternalPartReference*
56+
{
57+
swig_type_info * const outtype = [&] {
58+
return result != nullptr
59+
? SWIG_TypeQuery("eml2::EpcExternalPartReference *")
60+
: $descriptor;
61+
}();
62+
63+
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), outtype, 0);
64+
}
65+
66+
%typemap(out) Activity*, ActivityTemplate*, PropertyKind*, TimeSeries*
5367
#ifdef WITH_RESQML2_2
5468
,GraphicalInformationSet*
5569
#endif
5670
{
5771
swig_type_info * const outtype = [&] {
5872
if (result != nullptr)
5973
{
60-
const std::string cppNs = [&] {
74+
const std::string cppNs = [&result] {
6175
const std::string xmlNs(result->getXmlNamespace());
62-
if (xmlNs == "eml20") return "${FESAPI_EML2_0_NS}";
63-
else if (xmlNs == "eml23") return "${FESAPI_EML2_3_NS}";
64-
else if (xmlNs == "resqml20") return "${FESAPI_RESQML2_0_1_NS}";
76+
if (xmlNs == "resqml20") return "${FESAPI_RESQML2_0_1_NS}";
6577
else if (xmlNs == "resqml22") return "${FESAPI_RESQML2_2_NS}";
6678
else if (xmlNs == "witsml21") return "${FESAPI_WITSML2_1_NS}";
6779
else if (xmlNs == "prodml22") return "${FESAPI_PRODML2_2_NS}";
80+
else if (xmlNs == "eml23") return "${FESAPI_EML2_3_NS}";
6881
}();
6982

7083
// Check potential downcasting
@@ -80,7 +93,7 @@ namespace EML2_NS
8093
}
8194

8295
namespace RESQML2_NS
83-
{
96+
{
8497
%typemap(out) AbstractFeature*, AbstractFeatureInterpretation*, AbstractRepresentation*, AbstractGridRepresentation*, AbstractLocal3dCrs*,
8598
AbstractProperty*, AbstractValuesProperty*,
8699
AbstractStratigraphicOrganizationInterpretation*,
@@ -155,14 +168,10 @@ namespace RESQML2_NS
155168
swig_type_info * const outtype = [&] {
156169
if (result != nullptr)
157170
{
158-
const std::string cppNs = [&] {
171+
const std::string cppNs = [&result] {
159172
const std::string xmlNs(result->getXmlNamespace());
160-
if (xmlNs == "eml20") return "${FESAPI_EML2_0_NS}";
161-
else if (xmlNs == "eml23") return "${FESAPI_EML2_3_NS}";
162-
else if (xmlNs == "resqml20") return "${FESAPI_RESQML2_0_1_NS}";
173+
if (xmlNs == "resqml20") return "${FESAPI_RESQML2_0_1_NS}";
163174
else if (xmlNs == "resqml22") return "${FESAPI_RESQML2_2_NS}";
164-
else if (xmlNs == "witsml21") return "${FESAPI_WITSML2_1_NS}";
165-
else if (xmlNs == "prodml22") return "${FESAPI_PRODML2_2_NS}";
166175
}();
167176

168177
// Check potential downcasting
@@ -186,12 +195,8 @@ namespace RESQML2_NS
186195
{
187196
std::string cppNs;
188197
const std::string xmlNs(result->getXmlNamespace());
189-
if (xmlNs == "eml20") cppNs = "${FESAPI_EML2_0_NS}";
190-
else if (xmlNs == "eml23") cppNs = "${FESAPI_EML2_3_NS}";
191-
else if (xmlNs == "resqml20") cppNs = "${FESAPI_RESQML2_0_1_NS}";
198+
if (xmlNs == "resqml20") cppNs = "${FESAPI_RESQML2_0_1_NS}";
192199
else if (xmlNs == "resqml22") cppNs = "${FESAPI_RESQML2_2_NS}";
193-
else if (xmlNs == "witsml21") cppNs = "${FESAPI_WITSML2_1_NS}";
194-
else if (xmlNs == "prodml22") cppNs = "${FESAPI_PRODML2_2_NS}";
195200

196201
std::string cppClass;
197202
auto geomKind = result->getGeometryKind();

cs/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ set (EXECUTE_COMMAND "${SWIG_EXECUTABLE}")
2626
if (WITH_RESQML2_2)
2727
list (APPEND EXECUTE_COMMAND -DWITH_RESQML2_2)
2828
endif (WITH_RESQML2_2)
29-
if (UNIX)
29+
if (UNIX AND NOT APPLE)
3030
list (APPEND EXECUTE_COMMAND -DSWIGWORDSIZE64)
31-
endif (UNIX)
31+
endif (UNIX AND NOT APPLE)
3232
list (APPEND EXECUTE_COMMAND -v)
3333
list (APPEND EXECUTE_COMMAND -c++)
3434
list (APPEND EXECUTE_COMMAND -csharp)
3535
list (APPEND EXECUTE_COMMAND -dllimport)
36-
list (APPEND EXECUTE_COMMAND ${CPP_LIBRARY_NAME}${CMAKE_RELEASE_POSTFIX}.${Fesapi_VERSION}.dll)
36+
list (APPEND EXECUTE_COMMAND ${CPP_LIBRARY_NAME}${CMAKE_RELEASE_POSTFIX}-${Fesapi_VERSION_MAJOR}.${Fesapi_VERSION_MINOR}.dll)
3737
list (APPEND EXECUTE_COMMAND -namespace)
3838
list (APPEND EXECUTE_COMMAND F2iConsulting.Fesapi)
3939
list (APPEND EXECUTE_COMMAND -o)

0 commit comments

Comments
 (0)