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

[FIX] address flaky tests in CI #3785

Merged
merged 15 commits into from Jun 29, 2023
Merged

[FIX] address flaky tests in CI #3785

merged 15 commits into from Jun 29, 2023

Conversation

Remi-Gau
Copy link
Collaborator

Closes #3784

Changes proposed in this pull request:

  • removes a duplicate tests in the "allegedly" problematic test

Comment on lines -112 to -123
parcellator = Parcellations(method="rena", n_parcels=5, verbose=0)
parcellator.fit(fmri_imgs)

assert parcellator.labels_img_ is not None

parcellator = Parcellations(
method="hierarchical_kmeans", n_parcels=5, verbose=0
)
parcellator.fit(fmri_imgs)

assert parcellator.labels_img_ is not None

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

both rena and hierarchical_kmeans were actually included in the parametrization of this test

@github-actions
Copy link
Contributor

github-actions bot commented Jun 28, 2023

👋 @Remi-Gau Thanks for creating a PR!

Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.

Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.

  • PR has an interpretable title.
  • PR links to Github issue with mention Closes #XXXX (see our documentation on PR structure)
  • Code is PEP8-compliant (see our documentation on coding style)
  • Changelog or what's new entry in doc/changes/latest.rst (see our documentation on PR structure)

For new features:

  • There is at least one unit test per new function / class (see our documentation on testing)
  • The new feature is demoed in at least one relevant example.

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

We will review it as quick as possible, feel free to ping us with questions if needed.

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Merging #3785 (b4e81c4) into main (7d91e88) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3785   +/-   ##
=======================================
  Coverage   91.52%   91.52%           
=======================================
  Files         133      133           
  Lines       15557    15561    +4     
  Branches     3229     3229           
=======================================
+ Hits        14238    14242    +4     
  Misses        772      772           
  Partials      547      547           
Flag Coverage Δ
macos-latest_3.10 91.44% <ø> (?)
macos-latest_3.11 91.44% <ø> (+<0.01%) ⬆️
macos-latest_3.8 91.41% <ø> (?)
macos-latest_3.9 91.41% <ø> (?)
ubuntu-latest_3.10 91.44% <ø> (?)
ubuntu-latest_3.11 91.44% <ø> (?)
ubuntu-latest_3.9 91.41% <ø> (+<0.01%) ⬆️
windows-latest_3.10 ?
windows-latest_3.11 91.38% <ø> (?)
windows-latest_3.8 91.35% <ø> (?)
windows-latest_3.9 91.35% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 13 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ymzayek
Copy link
Member

ymzayek commented Jun 28, 2023

@Remi-Gau can you try skipping the whole file to see if it's actually coming from there? I think you can just add the path to it to collect_ignore in conftest.py

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Jun 28, 2023

@Remi-Gau can you try skipping the whole file to see if it's actually coming from there? I think you can just add the path to it to collect_ignore in conftest.py

Good idea

@Remi-Gau
Copy link
Collaborator Author

OK now will try to only run this file in CI to make speed up the testing

@Remi-Gau
Copy link
Collaborator Author

Seems to be coming from one of the 3 test I silenced.
Will refactor them to see if we can better isolate the problem.

@Remi-Gau Remi-Gau marked this pull request as ready for review June 29, 2023 09:42
@Remi-Gau
Copy link
Collaborator Author

@ymzayek

I am sort of doubting that this PR actually fixed the issue given that the failures seem to have stopped now from other PRs.

But worst case this PR is some tiny update and refactor of tests and we will open another PR if this problem comes back

@Remi-Gau Remi-Gau requested a review from ymzayek June 29, 2023 09:45
@bthirion
Copy link
Member

But CI is green for the first time, right ?

@Remi-Gau
Copy link
Collaborator Author

But CI is green for the first time, right ?

yup but also on main but given that the fail was flaky it is hard to tell what is happening and whose "fault" it was
-https://github.com/nilearn/nilearn/actions/runs/5409956560/jobs/9830757289

@ymzayek
Copy link
Member

ymzayek commented Jun 29, 2023

I am sort of doubting that this PR actually fixed the issue given that the failures seem to have stopped now from other PRs.

But worst case this PR is some tiny update and refactor of tests and we will open another PR if this problem comes back

Ok agreed. The changes are good nonetheless

@Remi-Gau Remi-Gau merged commit 089a1a0 into nilearn:main Jun 29, 2023
28 checks passed
@Remi-Gau Remi-Gau deleted the ci_fix branch June 29, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky CI failures
3 participants