Skip to content

Commit 8d25a56

Browse files
feat(OpenGeode): update to v10
1 parent 75bc023 commit 8d25a56

Some content is hidden

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

41 files changed

+29262
-253
lines changed

.github/workflows/CD.yml

Lines changed: 33 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -4,84 +4,41 @@ on:
44
push:
55
tags: 'v*'
66

7-
jobs:
7+
jobs:
88
release-linux:
9-
runs-on: ubuntu-18.04
10-
container: ${{ matrix.config.container }}
11-
strategy:
12-
matrix:
13-
config:
14-
- {container: "geodesolutions/ubuntu", system: "ubuntu", doc: true}
15-
- {container: "geodesolutions/centos", system: "rhel", doc: false}
9+
uses: Geode-solutions/actions/.github/workflows/cd-linux.yml@master
10+
with:
11+
name: OPENGEODE_INSPECTOR
12+
repos: OpenGeode;OpenGeode-IO
13+
secrets:
14+
TOKEN: ${{ secrets.TOKEN }}
15+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1616

17+
release-linux-python:
18+
uses: Geode-solutions/actions/.github/workflows/cd-linux-python.yml@master
19+
with:
20+
name: OPENGEODE_INSPECTOR
21+
repos: OpenGeode;OpenGeode-IO
22+
secrets:
23+
TOKEN: ${{ secrets.TOKEN }}
24+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
25+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
1726

18-
steps:
19-
- uses: actions/checkout@v1
20-
- uses: Geode-solutions/actions/get-release@master
21-
id: opengeode
22-
with:
23-
repository: OpenGeode
24-
file: '-${{ matrix.config.system }}.tar.gz'
25-
token: ${{ secrets.TOKEN }}
26-
- uses: Geode-solutions/actions/get-release@master
27-
id: opengeode-io
28-
with:
29-
repository: OpenGeode-IO
30-
file: '-${{ matrix.config.system }}.tar.gz'
31-
token: ${{ secrets.TOKEN }}
32-
- name: Generate package
33-
id: package
34-
run: |
35-
mkdir -p build
36-
cd build
37-
version="${GITHUB_REF##*/*/}"
38-
echo ::set-output name=version::$version
39-
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH:PATH="${{ steps.opengeode.outputs.path }};${{ steps.opengeode-io.outputs.path }}" -DOPENGEODE_INSPECTOR_WITH_TESTS:BOOL=OFF -DCPACK_PACKAGE_VERSION:STRING=$version -DCPACK_SYSTEM_NAME:STRING=${{ matrix.config.system }} ..
40-
cmake --build . -- -j2
41-
cmake --build . --target package
42-
- name: Upload
43-
uses: softprops/action-gh-release@v1
44-
with:
45-
files: "build/OpenGeode-Inspector-${{ steps.package.outputs.version }}-${{ matrix.config.system }}.tar.gz"
46-
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
- name: Doc
49-
if: matrix.config.doc
50-
run: curl -s https://raw.githubusercontent.com/Geode-solutions/actions/master/doc/doc.sh | bash -s -- ${GITHUB_WORKSPACE}/build
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.TOKEN }}
53-
5427
release-windows:
55-
runs-on: windows-2016
28+
uses: Geode-solutions/actions/.github/workflows/cd-windows.yml@master
29+
with:
30+
name: OPENGEODE_INSPECTOR
31+
repos: OpenGeode;OpenGeode-IO
32+
secrets:
33+
TOKEN: ${{ secrets.TOKEN }}
34+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5635

57-
steps:
58-
- uses: actions/checkout@v1
59-
- uses: Geode-solutions/actions/get-release@master
60-
id: opengeode
61-
with:
62-
repository: OpenGeode
63-
file: '-win64.zip'
64-
token: ${{ secrets.TOKEN }}
65-
- uses: Geode-solutions/actions/get-release@master
66-
id: opengeode-io
67-
with:
68-
repository: OpenGeode-IO
69-
file: '-win64.zip'
70-
token: ${{ secrets.TOKEN }}
71-
- name: Generate package
72-
id: package
73-
run: |
74-
mkdir -p build
75-
cd build
76-
version="${GITHUB_REF##*/*/}"
77-
echo ::set-output name=version::$version
78-
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH:PATH="${{ steps.opengeode.outputs.path }};${{ steps.opengeode-io.outputs.path }}" -DOPENGEODE_INSPECTOR_WITH_TESTS:BOOL=OFF -DCPACK_PACKAGE_VERSION:STRING=$version -DCPACK_SYSTEM_NAME:STRING=win64 ..
79-
cmake --build . --config Release
80-
cmake --build . --target PACKAGE --config Release
81-
shell: bash
82-
- name: Upload
83-
uses: softprops/action-gh-release@v1
84-
with:
85-
files: "build/OpenGeode-Inspector-${{ steps.package.outputs.version }}-win64.zip"
86-
env:
87-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
release-windows-python:
37+
uses: Geode-solutions/actions/.github/workflows/cd-windows-python.yml@master
38+
with:
39+
name: OPENGEODE_INSPECTOR
40+
repos: OpenGeode;OpenGeode-IO
41+
secrets:
42+
TOKEN: ${{ secrets.TOKEN }}
43+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
44+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

.github/workflows/CI.yml

Lines changed: 34 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -8,146 +8,49 @@ on:
88

99
jobs:
1010
format:
11-
runs-on: ubuntu-18.04
12-
13-
steps:
14-
- uses: actions/checkout@v1
15-
- uses: Geode-solutions/actions/clang-format@master
16-
env:
17-
GITHUB_TOKEN: ${{ secrets.TOKEN }}
11+
uses: Geode-solutions/actions/.github/workflows/format.yml@master
12+
secrets:
13+
TOKEN: ${{ secrets.TOKEN }}
1814

1915
build-linux:
20-
runs-on: ubuntu-18.04
21-
container: ${{ matrix.config.container }}
2216
needs: format
23-
strategy:
24-
matrix:
25-
config:
26-
- {container: "geodesolutions/ubuntu", cmake_args: "-DCMAKE_BUILD_TYPE=Debug", system: ubuntu}
27-
- {container: "geodesolutions/ubuntu", cmake_args: "-DCMAKE_BUILD_TYPE=Release -DUSE_BENCHMARK=ON", system: ubuntu}
28-
- {container: "geodesolutions/centos", cmake_args: "-DCMAKE_BUILD_TYPE=Debug", system: rhel}
29-
- {container: "geodesolutions/centos", cmake_args: "-DCMAKE_BUILD_TYPE=Release", system: rhel}
17+
uses: Geode-solutions/actions/.github/workflows/ci-linux.yml@master
18+
with:
19+
repos: OpenGeode;OpenGeode-IO
20+
secrets:
21+
TOKEN: ${{ secrets.TOKEN }}
22+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
3023

24+
build-linux-python:
25+
needs: format
26+
uses: Geode-solutions/actions/.github/workflows/ci-linux-python.yml@master
27+
with:
28+
name: OPENGEODE_INSPECTOR
29+
repos: OpenGeode;OpenGeode-IO
30+
secrets:
31+
TOKEN: ${{ secrets.TOKEN }}
32+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
3133

32-
steps:
33-
- uses: actions/checkout@v1
34-
- uses: Geode-solutions/actions/get-release@master
35-
id: opengeode
36-
with:
37-
repository: OpenGeode
38-
file: '-${{ matrix.config.system }}.tar.gz'
39-
token: ${{ secrets.TOKEN }}
40-
- uses: Geode-solutions/actions/get-release@master
41-
id: opengeode-io
42-
with:
43-
repository: OpenGeode-IO
44-
file: '-${{ matrix.config.system }}.tar.gz'
45-
token: ${{ secrets.TOKEN }}
46-
- name: Compile
47-
run: |
48-
mkdir -p build
49-
cd build
50-
cmake ${{ matrix.config.cmake_args }} -DCMAKE_PREFIX_PATH:PATH="${{ steps.opengeode.outputs.path }};${{ steps.opengeode-io.outputs.path }}" ..
51-
cmake --build . -- -j2
52-
- name: Test
53-
run: |
54-
mkdir -p test
55-
cd test
56-
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_PREFIX_PATH:PATH="$GITHUB_WORKSPACE/build;$GITHUB_WORKSPACE/${{ steps.opengeode.outputs.path }}" ../tests
57-
cmake --build . -- -j2
58-
ctest --output-on-failure
59-
- name: Notify slack
60-
if: failure() && github.ref == 'refs/heads/master'
61-
uses: 8398a7/action-slack@v2
62-
with:
63-
status: failure
64-
env:
65-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
67-
6834
coverage:
69-
runs-on: ubuntu-18.04
7035
needs: format
71-
if: (github.event_name == 'pull_request' || github.ref == 'refs/heads/master')
72-
73-
74-
steps:
75-
- uses: actions/checkout@v1
76-
- uses: Geode-solutions/actions/get-release@master
77-
id: opengeode
78-
with:
79-
repository: OpenGeode
80-
file: '-ubuntu.tar.gz'
81-
token: ${{ secrets.TOKEN }}
82-
- uses: Geode-solutions/actions/get-release@master
83-
id: opengeode-io
84-
with:
85-
repository: OpenGeode-IO
86-
file: '-ubuntu.tar.gz'
87-
token: ${{ secrets.TOKEN }}
88-
- name: Compile
89-
run: |
90-
mkdir -p build
91-
cd build
92-
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH:PATH="${{ steps.opengeode.outputs.path }};${{ steps.opengeode-io.outputs.path }}" ..
93-
cmake --build . -- -j2
94-
- name: Kcov
95-
run: curl -s https://raw.githubusercontent.com/Geode-solutions/actions/master/kcov.sh | bash -s -- ${GITHUB_WORKSPACE}/build/bin
96-
- uses: codecov/[email protected]
97-
with:
98-
token: ${{ secrets.CODECOV_TOKEN }}
99-
file: kcov/kcov-merged/cobertura.xml
100-
- name: Notify slack
101-
if: failure() && github.ref == 'refs/heads/master'
102-
uses: 8398a7/action-slack@v2
103-
with:
104-
status: failure
105-
env:
106-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
36+
uses: Geode-solutions/actions/.github/workflows/coverage.yml@master
37+
with:
38+
repos: OpenGeode;OpenGeode-IO
39+
secrets:
40+
TOKEN: ${{ secrets.TOKEN }}
10841

10942
build-windows:
110-
runs-on: windows-2016
11143
needs: format
112-
strategy:
113-
matrix:
114-
config: [Debug, Release]
115-
116-
steps:
117-
- uses: actions/checkout@v1
118-
- uses: Geode-solutions/actions/get-release@master
119-
id: opengeode
120-
with:
121-
repository: OpenGeode
122-
file: '-win64.zip'
123-
token: ${{ secrets.TOKEN }}
124-
- uses: Geode-solutions/actions/get-release@master
125-
id: opengeode-io
126-
with:
127-
repository: OpenGeode-IO
128-
file: '-win64.zip'
129-
token: ${{ secrets.TOKEN }}
130-
- name: Compile & Test
131-
run: |
132-
mkdir -p build
133-
cd build
134-
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH:PATH="${{ steps.opengeode.outputs.path }};${{ steps.opengeode-io.outputs.path }}" ..
135-
cmake --build . --config ${{ matrix.config }}
136-
ctest -C ${{ matrix.config }} --output-on-failure
137-
- name: Notify slack
138-
if: failure() && github.ref == 'refs/heads/master'
139-
uses: 8398a7/action-slack@v2
140-
with:
141-
status: failure
142-
env:
143-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
44+
uses: Geode-solutions/actions/.github/workflows/ci-windows.yml@master
45+
with:
46+
name: OPENGEODE_INSPECTOR
47+
repos: OpenGeode;OpenGeode-IO
48+
secrets:
49+
TOKEN: ${{ secrets.TOKEN }}
50+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
14551

14652
semantic-release:
147-
runs-on: ubuntu-18.04
148-
needs: [build-linux, coverage, build-windows]
149-
steps:
150-
- uses: actions/checkout@v1
151-
- run: npx semantic-release
152-
env:
153-
GITHUB_TOKEN: ${{ secrets.TOKEN }}
53+
needs: [build-linux, build-linux-python, build-windows]
54+
uses: Geode-solutions/actions/.github/workflows/release.yml@master
55+
secrets:
56+
TOKEN: ${{ secrets.TOKEN }}

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ cmake_minimum_required(VERSION 3.11)
2424
project(OpenGeode-Inspector CXX)
2525

2626
option(OPENGEODE_INSPECTOR_WITH_TESTS "Compile test projects" ON)
27+
option(OPENGEODE_INSPECTOR_WITH_PYTHON "Compile Python bindings" OFF)
2728

2829
# Get OpenGeode-inspector dependencies
2930
find_package(OpenGeode REQUIRED)
30-
find_package(OpenGeode-IO REQUIRED)
3131
find_package(Async++ REQUIRED)
32+
find_package(OpenGeode-IO REQUIRED)
3233

3334
#------------------------------------------------------------------------------------------------
3435
# Configure the OpenGeode-inspector libraries
@@ -47,6 +48,11 @@ if(OPENGEODE_INSPECTOR_WITH_TESTS)
4748
add_subdirectory(tests)
4849
endif()
4950

51+
if(OPENGEODE_INSPECTOR_WITH_PYTHON)
52+
message(STATUS "Configuring OpenGeode-Inspector with Python bindings")
53+
add_subdirectory(bindings/python)
54+
endif()
55+
5056
#------------------------------------------------------------------------------------------------
5157
# Configure CPacks
5258
if(WIN32)

bindings/python/CMakeLists.txt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright (c) 2019 - 2022 Geode-solutions
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in
11+
# all copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
add_subdirectory(src)
22+
23+
if(OPENGEODE_INSPECTOR_WITH_TESTS)
24+
add_subdirectory(tests)
25+
endif()
26+
27+
configure_file(
28+
__init__.py
29+
${PROJECT_BINARY_DIR}/wheel/opengeode_inspector/__init__.py
30+
)
31+
configure_file(
32+
inspector.py
33+
${PROJECT_BINARY_DIR}/wheel/opengeode_inspector/inspector.py
34+
)
35+
configure_file(
36+
setup.py
37+
${PROJECT_BINARY_DIR}/wheel/setup.py
38+
)
39+
execute_process(
40+
COMMAND ${PYTHON_EXECUTABLE} -m pip install --user -r requirements.txt
41+
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
42+
)
43+
add_custom_target(wheel
44+
COMMAND ${CMAKE_COMMAND}
45+
-DSOURCE_DIR="${CMAKE_BINARY_DIR}"
46+
-DDEST_DIR="${CMAKE_BINARY_DIR}/wheel/opengeode_inspector"
47+
-P "${CMAKE_CURRENT_LIST_DIR}/copy_wheel.cmake"
48+
COMMAND ${PYTHON_EXECUTABLE} setup.py bdist_wheel
49+
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/wheel
50+
)

bindings/python/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2019 - 2022 Geode-solutions
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in
11+
# all copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
from .inspector import *

0 commit comments

Comments
 (0)