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

[MAINT] Refactor/test utils #3910

Merged
merged 11 commits into from Aug 29, 2023
Merged

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Aug 12, 2023

Changes proposed in this pull request:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 12, 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 Aug 12, 2023

Codecov Report

Merging #3910 (3ea9d0e) into main (9d5409c) will increase coverage by 0.00%.
Report is 2 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3910   +/-   ##
=======================================
  Coverage   91.76%   91.77%           
=======================================
  Files         134      134           
  Lines       15747    15750    +3     
  Branches     3283     3283           
=======================================
+ Hits        14451    14454    +3     
  Misses        752      752           
  Partials      544      544           
Flag Coverage Δ
macos-latest_3.10 91.68% <ø> (+<0.01%) ⬆️
macos-latest_3.11 91.68% <ø> (+<0.01%) ⬆️
macos-latest_3.8 91.64% <ø> (+<0.01%) ⬆️
macos-latest_3.9 91.64% <ø> (+<0.01%) ⬆️
ubuntu-latest_3.10 91.68% <ø> (+<0.01%) ⬆️
ubuntu-latest_3.11 91.68% <ø> (+<0.01%) ⬆️
ubuntu-latest_3.8 91.64% <ø> (+<0.01%) ⬆️
ubuntu-latest_3.9 91.64% <ø> (+<0.01%) ⬆️
windows-latest_3.10 91.62% <ø> (+<0.01%) ⬆️
windows-latest_3.11 91.62% <ø> (+<0.01%) ⬆️
windows-latest_3.8 91.59% <ø> (+<0.01%) ⬆️
windows-latest_3.9 91.59% <ø> (+<0.01%) ⬆️

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

see 4 files with indirect coverage changes

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

@Remi-Gau Remi-Gau marked this pull request as ready for review August 12, 2023 17:35
@Remi-Gau Remi-Gau marked this pull request as draft August 12, 2023 17:35
Copy link
Member

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM so far.

nilearn/_utils/tests/test_numpy_conversions.py Outdated Show resolved Hide resolved
@Remi-Gau Remi-Gau marked this pull request as ready for review August 24, 2023 15:53
Copy link
Member

@ymzayek ymzayek left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple of comments


#######
def test_check_niimg_wildcards_one_file_name(img_3d_zeros_eye):
tmp_dir = tempfile.tempdir + os.sep
Copy link
Member

Choose a reason for hiding this comment

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

should we replace with tmp_path fixture?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tried the most obvious ways and they did not work

thinking that maybe we could improve / fixturize 'testing.write_tmp_imgs', but that would be for another PR

Copy link
Member

Choose a reason for hiding this comment

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

Ok agreed

@Remi-Gau
Copy link
Collaborator Author

OK it seems that 244f0f3 does not play well with testing on windows

Copy link
Member

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM, thx.

Copy link
Member

@ymzayek ymzayek left a comment

Choose a reason for hiding this comment

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

Thx @Remi-Gau

@ymzayek ymzayek merged commit 56f33f3 into nilearn:main Aug 29, 2023
29 checks passed
@Remi-Gau Remi-Gau deleted the refactor/test_utils branch August 29, 2023 09:44
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.

None yet

3 participants