-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Python | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
jobs: | ||
test-python: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download libraries | ||
uses: ./.github/composite-actions/download-libraries | ||
with: | ||
download-pybind: true | ||
- name: Configure CMake | ||
run: > | ||
cmake -B ${{github.workspace}}/build | ||
-DCMAKE_C_COMPILER=gcc-10 | ||
-DCMAKE_CXX_COMPILER=g++-10 | ||
-DBOOST_ROOT=${{github.workspace}}/lib/boost | ||
-DCMAKE_BUILD_TYPE=Release | ||
-Dgtest_disable_pthreads=OFF | ||
-DASAN=OFF | ||
-DCOMPILE_PYBIND=ON | ||
-DCOMPILE_TESTS=OFF | ||
-DUNPACK_DATASETS=OFF | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config Release | ||
- name: Test | ||
working-directory: ${{github.workspace}}/build/python_bindings | ||
shell: bash | ||
run: python test_bindings.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from inspect import getmembers, isclass | ||
|
||
import desbordante as desb | ||
|
||
for name, type_ in getmembers(desb, isclass): | ||
# Assumes no classes inherit from algorithms. | ||
if not (type_.__module__ == 'desbordante' and issubclass(type_, desb.FdAlgorithm) | ||
and not type_.__subclasses__()): | ||
continue | ||
algorithm = type_() | ||
algorithm.load_data('WDC_satellites.csv', ',', False) | ||
algorithm.execute() | ||
print(name, algorithm.get_fds()) |