[ENH]: Consistent DataGrabber naming in testing #222

Merged
synchon merged 11 commits from refactor/consistent-dg-naming into main 2023-05-05 10:46:11 +00:00
synchon commented 2023-04-14 08:28:44 +00:00 (Migrated from github.com)
  • description of feature/fix
  • tests added/passed
  • add an entry for the latest changes

This PR renames the datagrabbers to *DataGrabber in junifer.testing to be consistent with the generally available ones in junifer.datagrabber.

* [x] description of feature/fix * [x] tests added/passed * [x] add an entry for the latest changes This PR renames the datagrabbers to `*DataGrabber` in `junifer.testing` to be consistent with the generally available ones in `junifer.datagrabber`.
fraimondo (Migrated from github.com) reviewed 2023-04-14 08:28:44 +00:00
codecov[bot] commented 2023-04-18 15:46:50 +00:00 (Migrated from github.com)

Codecov Report

Merging #222 (e03d4cd) into main (34035fa) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #222   +/-   ##
=======================================
  Coverage   93.60%   93.60%           
=======================================
  Files          80       80           
  Lines        3458     3458           
  Branches      653      653           
=======================================
  Hits         3237     3237           
  Misses        144      144           
  Partials       77       77           
Flag Coverage Δ
docs 100.00% <ø> (ø)
junifer 93.60% <100.00%> (ø)

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

Impacted Files Coverage Δ
junifer/testing/registry.py 100.00% <ø> (ø)
junifer/testing/datagrabbers.py 100.00% <100.00%> (ø)
## [Codecov](https://codecov.io/gh/juaml/junifer/pull/222?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) Report > Merging [#222](https://codecov.io/gh/juaml/junifer/pull/222?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (e03d4cd) into [main](https://codecov.io/gh/juaml/junifer/commit/34035faf072e51967ae498219682cca7ad36839c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (34035fa) will **not change** coverage. > The diff coverage is `100.00%`. [![Impacted file tree graph](https://codecov.io/gh/juaml/junifer/pull/222/graphs/tree.svg?width=650&height=150&src=pr&token=5H21JuZXMw&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)](https://codecov.io/gh/juaml/junifer/pull/222?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #222 +/- ## ======================================= Coverage 93.60% 93.60% ======================================= Files 80 80 Lines 3458 3458 Branches 653 653 ======================================= Hits 3237 3237 Misses 144 144 Partials 77 77 ``` | Flag | Coverage Δ | | |---|---|---| | docs | `100.00% <ø> (ø)` | | | junifer | `93.60% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/juaml/junifer/pull/222?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [junifer/testing/registry.py](https://codecov.io/gh/juaml/junifer/pull/222?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci90ZXN0aW5nL3JlZ2lzdHJ5LnB5) | `100.00% <ø> (ø)` | | | [junifer/testing/datagrabbers.py](https://codecov.io/gh/juaml/junifer/pull/222?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci90ZXN0aW5nL2RhdGFncmFiYmVycy5weQ==) | `100.00% <100.00%> (ø)` | |
github-actions[bot] commented 2023-04-18 17:01:49 +00:00 (Migrated from github.com)
PR Preview Action v0.0.2-48-g32d010d5
Preview removed because the pull request was closed.
2023-05-05 10:51 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v0.0.2-48-g32d010d5 :---: Preview removed because the pull request was closed. 2023-05-05 10:51 UTC <!-- Sticky Pull Request Commentpr-preview -->
LeSasse (Migrated from github.com) requested changes 2023-05-04 08:18:15 +00:00
LeSasse (Migrated from github.com) left a comment

I think there also some changes that could be applied in the tests of the datagrabber module. For example, under junifer/datagrabber/aomic/tests in test_id1000.py there are some functions like test_id1000_datagrabber. Should they be renamed as well? I am not sure since in that instance I guess they don't refer to a class name explicitly, but might be worth reviewing that sub-package. (example here https://github.com/juaml/junifer/blob/main/junifer/datagrabber/aomic/tests/test_id1000.py#L13)

I think there also some changes that could be applied in the tests of the datagrabber module. For example, under `junifer/datagrabber/aomic/tests` in `test_id1000.py` there are some functions like `test_id1000_datagrabber`. Should they be renamed as well? I am not sure since in that instance I guess they don't refer to a class name explicitly, but might be worth reviewing that sub-package. (example here https://github.com/juaml/junifer/blob/main/junifer/datagrabber/aomic/tests/test_id1000.py#L13)
@ -19,0 +17,4 @@
class OasisVBMTestingDataGrabber(BaseDataGrabber):
"""Data Grabber for Oasis VBM testing data.
Wrapper for :func:`nilearn.datasets.fetch_oasis_vbm`
LeSasse (Migrated from github.com) commented 2023-05-04 08:09:15 +00:00

Should there be a whitespace here in the docstring i.e. Data Grabber or DataGrabber?

Should there be a whitespace here in the docstring i.e. `Data Grabber` or `DataGrabber`?
@ -10,3 +9,4 @@
def test_OasisVBMTestingDataGrabber() -> None:
"""Test Oasis VBM Testing datagrabber."""
expected_elements = [
"sub-01",
LeSasse (Migrated from github.com) commented 2023-05-04 08:10:22 +00:00

Should it be DataGrabber in the docstring here?

Should it be `DataGrabber` in the docstring here?
@ -10,3 +9,4 @@
def test_SPMAuditoryTestingDataGrabber() -> None:
"""Test SPM Auditory datagrabber."""
expected_elements = [
"sub001",
LeSasse (Migrated from github.com) commented 2023-05-04 08:11:13 +00:00

datagrabber -> DataGrabber?

`datagrabber` -> `DataGrabber`?
synchon (Migrated from github.com) reviewed 2023-05-04 09:40:03 +00:00
@ -19,0 +17,4 @@
class OasisVBMTestingDataGrabber(BaseDataGrabber):
"""Data Grabber for Oasis VBM testing data.
Wrapper for :func:`nilearn.datasets.fetch_oasis_vbm`
synchon (Migrated from github.com) commented 2023-05-04 09:40:03 +00:00

For consistency in code, maybe it's better to remove the whitespace.

For consistency in code, maybe it's better to remove the whitespace.
synchon (Migrated from github.com) reviewed 2023-05-04 09:40:33 +00:00
@ -10,3 +9,4 @@
def test_OasisVBMTestingDataGrabber() -> None:
"""Test Oasis VBM Testing datagrabber."""
expected_elements = [
"sub-01",
synchon (Migrated from github.com) commented 2023-05-04 09:40:33 +00:00

I see your point, I'll update the docstrings.

I see your point, I'll update the docstrings.
synchon commented 2023-05-04 09:46:43 +00:00 (Migrated from github.com)

I think there also some changes that could be applied in the tests of the datagrabber module. For example, under junifer/datagrabber/aomic/tests in test_id1000.py there are some functions like test_id1000_datagrabber. Should they be renamed as well? I am not sure since in that instance I guess they don't refer to a class name explicitly, but might be worth reviewing that sub-package. (example here https://github.com/juaml/junifer/blob/main/junifer/datagrabber/aomic/tests/test_id1000.py#L13)

I did think about that and that's a fair point. I intentionally kept this PR to junifer.testing and I'll revisit the other ones in a separate PR. :D

> I think there also some changes that could be applied in the tests of the datagrabber module. For example, under `junifer/datagrabber/aomic/tests` in `test_id1000.py` there are some functions like `test_id1000_datagrabber`. Should they be renamed as well? I am not sure since in that instance I guess they don't refer to a class name explicitly, but might be worth reviewing that sub-package. (example here https://github.com/juaml/junifer/blob/main/junifer/datagrabber/aomic/tests/test_id1000.py#L13) I did think about that and that's a fair point. I intentionally kept this PR to `junifer.testing` and I'll revisit the other ones in a separate PR. :D
LeSasse commented 2023-05-05 09:44:46 +00:00 (Migrated from github.com)

I think there also some changes that could be applied in the tests of the datagrabber module. For example, under junifer/datagrabber/aomic/tests in test_id1000.py there are some functions like test_id1000_datagrabber. Should they be renamed as well? I am not sure since in that instance I guess they don't refer to a class name explicitly, but might be worth reviewing that sub-package. (example here https://github.com/juaml/junifer/blob/main/junifer/datagrabber/aomic/tests/test_id1000.py#L13)

I did think about that and that's a fair point. I intentionally kept this PR to junifer.testing and I'll revisit the other ones in a separate PR. :D

In that case, I think I have nothing more to add. LGTM

> > I think there also some changes that could be applied in the tests of the datagrabber module. For example, under `junifer/datagrabber/aomic/tests` in `test_id1000.py` there are some functions like `test_id1000_datagrabber`. Should they be renamed as well? I am not sure since in that instance I guess they don't refer to a class name explicitly, but might be worth reviewing that sub-package. (example here https://github.com/juaml/junifer/blob/main/junifer/datagrabber/aomic/tests/test_id1000.py#L13) > > I did think about that and that's a fair point. I intentionally kept this PR to `junifer.testing` and I'll revisit the other ones in a separate PR. :D In that case, I think I have nothing more to add. LGTM
LeSasse (Migrated from github.com) approved these changes 2023-05-05 09:44:58 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer!222
No description provided.