-
Notifications
You must be signed in to change notification settings - Fork 2
Add test for challenger and warning #14
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
Merged
Merged
Changes from 74 commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
f24d515
Add test to check challenger's functionality
NimaSarajpoor 8b494c6
add warning to catch issue when function cannot be imported
NimaSarajpoor 5549abf
rename file to reflect expanded scope
NimaSarajpoor cf79b9a
move functions to utils.py
NimaSarajpoor a761bc6
testing all modules
NimaSarajpoor c8efd4c
removed unnecssary import
NimaSarajpoor 69226bb
minor fix
NimaSarajpoor d0b3324
catch the name of module when there is error
NimaSarajpoor b1e443a
Merge branch 'main' into add_test
NimaSarajpoor 461fdf6
rename files
NimaSarajpoor f60b215
remove unnecessary imports and minor changes
NimaSarajpoor c0008ca
enhance test functions
NimaSarajpoor e2a097d
minor fixes
NimaSarajpoor 64fc128
Improve msg when assetion fails
NimaSarajpoor 667da6c
add test.sh and other files and clean up scripts
NimaSarajpoor 164e061
add requirements file and github-actions
NimaSarajpoor e0788b5
Empty commit
NimaSarajpoor cf607dd
add pytest installation to github actions
NimaSarajpoor 0334788
To run github actions on push on any branch
NimaSarajpoor 6c6058c
minor fix
NimaSarajpoor 8342667
Add pyFFTW to requirements
NimaSarajpoor ef517dd
Removed python 3.9 and OpenMP
NimaSarajpoor e43758a
change file mode
NimaSarajpoor 0b1f7f7
fix shape of irfft output
NimaSarajpoor 0c578d3
clean up cache in sdp/
NimaSarajpoor 1570538
change push branch in github-actions
NimaSarajpoor 34b1c93
fix python version in Github Action
NimaSarajpoor 2355ebe
empty commit
NimaSarajpoor f6f817d
revert a change in github actions
NimaSarajpoor d5ae710
Add brackets to fix bash script
NimaSarajpoor aaa062f
temporarily hardcoded python version
NimaSarajpoor 4f6cb91
temporarily
NimaSarajpoor d4b0c0b
set python version based on the output of a shell script
NimaSarajpoor f58f8ab
remove leading dash for run
NimaSarajpoor 1751dc4
fixed running shell script
NimaSarajpoor c27d50f
revised flow to directly assign output to python version variable
NimaSarajpoor 8e90ad5
clean up output
NimaSarajpoor d180987
minor change
NimaSarajpoor fc3516e
check version in bash
NimaSarajpoor 031a49f
add python version to GITHUB_ENV in two steps
NimaSarajpoor 35c19f5
fixed assigning value
NimaSarajpoor dcb8b09
removed echo for python-version
NimaSarajpoor cd9fd38
directly echo using output of shell script
NimaSarajpoor ac760e3
Revert change in github action and update python_version to make it m…
NimaSarajpoor 6fedc8d
Removed flag verbose
NimaSarajpoor 734ba7f
Add different cases for tests
NimaSarajpoor ac940d3
minor changes
NimaSarajpoor dcad2d0
install xmllint on linux
NimaSarajpoor 8483776
Add shell bash
NimaSarajpoor 30a42fe
improve test functions
NimaSarajpoor 94f3835
fixed black format
NimaSarajpoor 595841f
minor fix
NimaSarajpoor 45cb28f
set push-to-branch to main
NimaSarajpoor 8818cbd
empty commit
NimaSarajpoor 70eb9df
revert change in github-action
NimaSarajpoor 789a0a3
minor fix
NimaSarajpoor c246a70
add coverage check
NimaSarajpoor 1e030da
only test for some n_Q
NimaSarajpoor 90da515
improve docstring
NimaSarajpoor 9c08d09
fix black formatting
NimaSarajpoor 17c12cd
remove shell script and move code to Github-Actions
NimaSarajpoor a570f87
Add coverage installation to workflow
NimaSarajpoor 948f7e8
ignore untested lines in coverage
NimaSarajpoor f0ec471
testing for more values of n_Q
NimaSarajpoor 53de511
use conda to install dependencies on Github Actions
NimaSarajpoor 37a024b
update environment.yml and workflow
NimaSarajpoor afc2eb2
Removed requirements.txt
NimaSarajpoor 8671d1d
add test for setup function
NimaSarajpoor 9a67f19
including setup for coverage
NimaSarajpoor 4077e08
update gitignore
NimaSarajpoor 092a033
change push branch
NimaSarajpoor b14b43d
Removed unnecessary check for ENV VAR
NimaSarajpoor 72f74f4
Removed manipulation of unnecessary env var
NimaSarajpoor aac2bc3
execute instead of sourcing
NimaSarajpoor 93432db
remove test from timing
NimaSarajpoor 7cf868b
minor fix
NimaSarajpoor 279f4ad
revise test_setup
NimaSarajpoor 74e8118
addressed comments
NimaSarajpoor f8da7e7
add comment to describe test_inputs
NimaSarajpoor 2c5c631
fix format
NimaSarajpoor 47bcaf1
change push branches to main
NimaSarajpoor a568ff4
Removed unnecessary step in Github Action
NimaSarajpoor 1ff353a
minor change
NimaSarajpoor 6720f80
improve description of step
NimaSarajpoor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,15 @@ | ||
| [flake8] | ||
| ignore = | ||
| E741, | ||
| W503, | ||
| E203, | ||
| D100, | ||
| D401, | ||
| D200, | ||
| D205, | ||
| D400, | ||
| D301 | ||
| max-line-length = 88 | ||
| docstring-convention=numpy | ||
| per-file-ignores = | ||
| ./test.py:D101,D102,D103 |
This file contains hidden or 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,63 @@ | ||
| name: Tests | ||
| on: | ||
| push: | ||
| branches: add_test | ||
| pull_request: | ||
| branches: main | ||
|
|
||
| jobs: | ||
| unit-testing: | ||
| defaults: | ||
| run: | ||
| # Set default shell to login-bash | ||
| # This is required to properly activate the conda environment | ||
| # https://github.com/conda-incubator/setup-miniconda?tab=readme-ov-file#use-a-default-shell | ||
| shell: bash -el {0} | ||
NimaSarajpoor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
|
||
| steps: | ||
| - name: Install xmllint on Linux | ||
| if: runner.os == 'Linux' | ||
| run: sudo apt-get install libxml2-utils | ||
|
|
||
| - name: Get safe PYTHON_VERSION | ||
| run: echo "PYTHON_VERSION=$(curl --location https://devguide.python.org/versions | xmllint --html --xpath '//section[@id="supported-versions"]//table/tbody/tr[count(//section[@id="supported-versions"]//table/tbody/tr[td[.="security"]]/preceding-sibling::*)]/td[1]/p/text()' - 2> /dev/null)" >> $GITHUB_ENV | ||
|
|
||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Update environment.yml with PYTHON_VERSION | ||
| run: sed 's/python.*/python==${{ env.PYTHON_VERSION }}/' environment.yml > environment_new.yml | ||
NimaSarajpoor marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Display environment_new.yml | ||
| run: cat environment_new.yml | ||
|
|
||
| - name: set up conda and install dependencies | ||
NimaSarajpoor marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| uses: conda-incubator/setup-miniconda@v3 | ||
| with: | ||
| environment-file: environment_new.yml | ||
|
|
||
| - name : Remove environment_new.yml | ||
| run: rm -rf environment_new.yml | ||
|
|
||
| - name : Display Conda Environments | ||
NimaSarajpoor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: conda env list | ||
|
|
||
| - name: Display conda info | ||
NimaSarajpoor marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| run: conda info | ||
|
|
||
| - name: Display conda list | ||
NimaSarajpoor marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| run: conda list | ||
|
|
||
| - name: Display Python Version | ||
| run: python -c "import sys; print(sys.version)" | ||
|
|
||
| - name: Show Full Numba Environment | ||
| run: python -m numba -s | ||
|
|
||
| - name: Run Unit Tests | ||
| run: ./test.sh | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| __pycache__ | ||
| *csv | ||
| .ipynb_checkpoints | ||
| .coverage |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| import numpy as np | ||
| from numba import njit | ||
| import sdp | ||
|
|
||
|
|
||
| @njit(fastmath=True) | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.