Skip to content
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

Update test_examples job dependencies, unskip surface_timeseries_.py and update some examples validations #5716

Merged
merged 6 commits into from May 2, 2023

Conversation

dalthviz
Copy link
Member

@dalthviz dalthviz commented Apr 12, 2023

Fixes/Closes

Closes #5611

Description

This enables testing the surface_timeseries_.py example on the CI and adds some validations and comments to inform better why some examples can't be run/dependencies needed for running them

Type of change

  • Bug-fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

How has this been tested?

  • all tests pass with my change

Final checklist:

  • My PR is the minimum possible work for the desired functionality
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@dalthviz dalthviz changed the title Update test_examples job dependencies, unskip some examples and update some examples validations Update test_examples job dependencies, unskip surface_timeseries_.py and update some examples validations Apr 12, 2023
@github-actions github-actions bot added the tests Something related to our tests label Apr 12, 2023
@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #5716 (b4b8fb7) into main (9fb9fbe) will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #5716      +/-   ##
==========================================
+ Coverage   89.84%   89.87%   +0.03%     
==========================================
  Files         614      614              
  Lines       52196    52196              
==========================================
+ Hits        46893    46913      +20     
+ Misses       5303     5283      -20     
Impacted Files Coverage Δ
napari/_tests/test_examples.py 37.83% <ø> (ø)

... and 9 files with indirect coverage changes

@psobolewskiPhD psobolewskiPhD added the bugfix PR with bugfix label Apr 30, 2023
Copy link
Contributor

@GenevieveBuckley GenevieveBuckley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this a lot, thank you @psobolewskiPhD!

One very small change requested below.

from packaging.version import parse
except ModuleNotFoundError:
raise ModuleNotFoundError(
"You must have packaging installed to run this example."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it when error messages have the format: something went wrong, here's how you might fix it

Can this error include a suggestion to use "pip install packaging" (and/or conda)

if parse(np.__version__) >= parse("1.24"):
raise RuntimeError(
"Incompatible numpy version. "
"You must have numpy <1.24 for nilearn to work and download the example data"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two suggestions:

  1. Replace the < symbol with with the words "less than" (because people skim read, and very often these types of error messages are encouraging people to upgrade their versions, not downgrade like we are asking them to do here)
  2. Write down which version(s) of nilearn this is currently true for, i.e. nilearn version 0.10.1 and below (because this info is hard to find easily the more time has gone by, and possibly newer version s of nilearn that are compatible might be released)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nilearn PR that could fix this problem is open here: nilearn/nilearn#3644
It's still under development but once a fix is in and a new version published, we'll probably require that as the minimum nilearn version (and remove the numpy version warning) for this example script.

@github-actions github-actions bot added the task label May 1, 2023
Copy link
Contributor

@GenevieveBuckley GenevieveBuckley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@GenevieveBuckley GenevieveBuckley merged commit d91f4ee into napari:main May 2, 2023
33 checks passed
@Czaki Czaki mentioned this pull request Jun 7, 2023
@psobolewskiPhD psobolewskiPhD added maintenance PR with maintance changes, and removed bugfix PR with bugfix labels Jun 8, 2023
@psobolewskiPhD psobolewskiPhD added this to the 0.4.18 milestone Jun 8, 2023
Czaki pushed a commit that referenced this pull request Jun 19, 2023
…py` and update some examples validations (#5716)

# Fixes/Closes
Closes #5611 

# Description
This enables testing the `surface_timeseries_.py` example on the CI and
adds some validations and comments to inform better why some examples
can't be run/dependencies needed for running them

## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)

# How has this been tested?
- [x] all tests pass with my change

## Final checklist:
- [x] My PR is the minimum possible work for the desired functionality
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Czaki pushed a commit that referenced this pull request Jun 21, 2023
…py` and update some examples validations (#5716)

# Fixes/Closes
Closes #5611 

# Description
This enables testing the `surface_timeseries_.py` example on the CI and
adds some validations and comments to inform better why some examples
can't be run/dependencies needed for running them

## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)

# How has this been tested?
- [x] all tests pass with my change

## Final checklist:
- [x] My PR is the minimum possible work for the desired functionality
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Czaki pushed a commit that referenced this pull request Jun 21, 2023
…py` and update some examples validations (#5716)

# Fixes/Closes
Closes #5611 

# Description
This enables testing the `surface_timeseries_.py` example on the CI and
adds some validations and comments to inform better why some examples
can't be run/dependencies needed for running them

## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)

# How has this been tested?
- [x] all tests pass with my change

## Final checklist:
- [x] My PR is the minimum possible work for the desired functionality
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Czaki pushed a commit that referenced this pull request Jun 21, 2023
…py` and update some examples validations (#5716)

# Fixes/Closes
Closes #5611 

# Description
This enables testing the `surface_timeseries_.py` example on the CI and
adds some validations and comments to inform better why some examples
can't be run/dependencies needed for running them

## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)

# How has this been tested?
- [x] all tests pass with my change

## Final checklist:
- [x] My PR is the minimum possible work for the desired functionality
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PR with maintance changes, task tests Something related to our tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in example script surface_timeseries_.py
3 participants