forked from BlueQuartzSoftware/simplnx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Create unit tests for each python example pipeline (BlueQuartzSo…
…ftware#793) Signed-off-by: Michael Jackson <[email protected]>
- Loading branch information
1 parent
9aa1373
commit 3307b02
Showing
25 changed files
with
1,036 additions
and
335 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 |
---|---|---|
|
@@ -36,14 +36,23 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install sphinx myst-parser sphinx-markdown-tables sphinx_rtd_theme numpy | ||
- name: Add C++ Problem Matcher | ||
uses: ammaraskar/[email protected] | ||
- name: Install Dependencies | ||
- name: Install Dependencies - 2 | ||
run: | | ||
sudo apt-get -y install ninja-build | ||
- name: Install Sphinx | ||
run: | | ||
sudo pip install sphinx myst-parser sphinx-markdown-tables sphinx_rtd_theme numpy | ||
sudo pip3 install sphinx myst-parser sphinx-markdown-tables sphinx_rtd_theme numpy | ||
- name: Setup NuGet Credentials | ||
shell: bash | ||
run: | | ||
|
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 |
---|---|---|
|
@@ -24,10 +24,19 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
submodules: true | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install sphinx myst-parser sphinx-markdown-tables sphinx_rtd_theme numpy | ||
- name: Add C++ Problem Matcher | ||
uses: ammaraskar/[email protected] | ||
- name: Install Dependencies | ||
- name: Install Dependencies - 2 | ||
run: | | ||
brew install ninja | ||
- name: Install Sphinx | ||
|
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
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
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
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,50 @@ | ||
''' module to get build specific directories | ||
This file is generated during the cmake configure phase. This file does *NOT* | ||
however use the standard `cmake_configure_file()` command but instead uses | ||
a custom generation cmake code. If you add new `${}` style variables, you will | ||
need to update those custom CMake codes. | ||
''' | ||
|
||
|
||
import complex as cx | ||
|
||
def check_filter_result(filter: cx.IFilter, result: cx.IFilter.ExecuteResult): | ||
if len(result.warnings) != 0: | ||
print(f'{filter.name()} :: Warnings: {result.warnings}') | ||
|
||
has_errors = len(result.errors) != 0 | ||
if has_errors: | ||
print(f'{filter.name()} :: Errors: {result.errors}') | ||
raise RuntimeError(result) | ||
|
||
print(f"{filter.name()} :: No errors running the filter") | ||
|
||
|
||
def GetBuildDirectory(): | ||
return '${CMAKE_LIBRARY_OUTPUT_DIRECTORY}' | ||
|
||
def GetTestDirectory(): | ||
return '${complex_BINARY_DIR}/Testing' | ||
|
||
def GetTestTempDirectory(): | ||
return '${complex_BINARY_DIR}/Testing/Temporary' | ||
|
||
def GetDataDirectory(): | ||
return '${DREAM3D_DATA_DIR}' | ||
|
||
def GetComplexPythonSourceDir(): | ||
return '${complex_SOURCE_DIR}/wrapping/python' | ||
|
||
def GetComplexSourceDir(): | ||
return '${complex_SOURCE_DIR}' | ||
|
||
def print_all_paths(): | ||
print(f'#### Important Filesystem Paths ####') | ||
print(f' GetBuildDirectory: {GetBuildDirectory()}') | ||
print(f' GetTestDirectory: {GetTestDirectory()}') | ||
print(f' GetTestTempDirectory: {GetTestTempDirectory()}') | ||
print(f' GetDataDirectory: {GetDataDirectory()}') | ||
print(f' GetComplexPythonSourceDir: {GetComplexPythonSourceDir()}') | ||
print(f' GetComplexSourceDir: {GetComplexSourceDir()}') | ||
print('#######################################') |
Oops, something went wrong.