-
Notifications
You must be signed in to change notification settings - Fork 52
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
[MAINT] Remove conda from CI Linux Workflows #794
Conversation
.github/workflows/unit_tests.yml
Outdated
brew install open-mpi | ||
echo "MPI_LIB_NRN_PATH=/opt/homebrew/lib/libmpi.dylib" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not what we recommend for the users though ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to any suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conda does not work? It seems to work on my mac and 2 other macs we tried on today ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Linux build in the CI is failing because conda is installing a version of neuron without MPI support. Removing conda solves this issue in Linux, but it affects the mac-os build. This PR helps giving support to both systems without conda.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you read the parallel backend guide:
https://jonescompneurolab.github.io/hnn-core/stable/parallel.html
? You should use conda for mac but pip for linux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split the os build and test on different workflows
.github/workflows/unit_tests.yml
Outdated
activate-environment: test | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
id: cp310 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is cp310?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an id to refer the action in further steps. We dont need this anymore, I removed it.
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #794 +/- ##
==========================================
+ Coverage 92.33% 92.49% +0.16%
==========================================
Files 27 27
Lines 5059 5343 +284
==========================================
+ Hits 4671 4942 +271
- Misses 388 401 +13 ☔ View full report in Codecov by Sentry. |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [3.8,3.9] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support for python 3.8 will end by the end of this year. Should we consider also testing more recent' versions of python in the matrix? At some point do we plan to stop testing for older versions? How do we currently communicate with users which python versions are actually supported by hnn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps let's add up to 3.11
until we figure out what's going on with 3.12
?
Also in terms of communication, perhaps we can explicitly state in the install instructions which versions of python we have listed in the unit tests here. Something like "HNN-core has been tested on python versions 3.8 - 3.11. Other versions may work but we do not explicitly test against them".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hollandjg Do you recall how autora does this? I thought there was a badge with tested python versions at one point, I don't see it anymore. Do they have a methodology for supporting versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me! Perhaps we can try adding 3.10 and 3.11 to the list and see if the unit tests still pass?
Looks like |
I believe the test |
@gtdang @ntolley @jasmainak |
@gtdang @ntolley @jasmainak It seems 3.11 and 3.12 fail at the same point, but I can take care of it on another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great @kmilo9999!! Thanks a bunch for taking care of this. Definitely agree to focus on 3.11 and 3.12 in a separate PR.
Happy to merge if it's all set on your end
Btw, in mne-python etc., we make our CIs fail if there are deprecation warnings ... it catches these issues early. |
Looks good. What is your thought on two separate runner scripts vs a single one? A common code path (with if-else in appropriate places) would reduce likelihood of bugs ... |
@gtdang @ntolley @jasmainak I removed the |
Beautiful, thanks @kmilo9999 !! |
* removed conda from ci pipeline * MAINT: Switching to ubuntu 22.04 * MAINT: Added conditionals to install openmpi according to matrix.os * MAINT: moving macos MPI_LIB_NRN_PATH env variable assigment * MAINT: Removing comments and additional test in unit_test.yml * MAINT: Moving linux CI to a separate workflow * STY: fixed flake8 errors * STY: fixed flake8 errors in gui.py * MAINT: Removing linux commands from macos CI workflow * TST: Adding python 3.10 and 3.11 to the tests * TST: Adding quotes to python version 3.10 * TST: Adding double quotes for macos python 3.10 build * MAINT: removing python 3.11 from CI tests * MAINT: Testing Ifs in workflow to test multiple OS * MAINT: Fixed checkout@v4 statement * MAINT: Adding python 3.9 and 3.10 to multi porpuse workflow * MAINT: Removed linux workflow file. Moved logic to unix_unit_tests.yml
The Linux build in the CI is failing because conda is installing a version of neuron without MPI support. Removing conda solves this issue for the linux CI workflow.
Solves #780