Skip to content

Add code snippets for verifying sample data loading#759

Merged
niksirbi merged 8 commits intoneuroinformatics-unit:mainfrom
Edu92337:code_snippets
Feb 9, 2026
Merged

Add code snippets for verifying sample data loading#759
niksirbi merged 8 commits intoneuroinformatics-unit:mainfrom
Edu92337:code_snippets

Conversation

@Edu92337
Copy link
Copy Markdown
Contributor

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Users need a quick way to verify that sample datasets can be fetched and loaded correctly. Currently, there's no documentation showing this workflow, which can leave users uncertain if their data loading is working properly.

What does this PR do?
Adds code snippets to the documentation demonstrating how to verify sample data loading:

  1. Updates fetch_dataset_paths() docstring with a verification example
  2. Adds a "Verifying sample data" subsection to the Adding Data documentation

References

Closes #654

How has this PR been tested?

  • Verified that existing functionality remains unchanged (only documentation was modified)
  • Built documentation locally to confirm proper rendering

Is this a breaking change?

No. This PR only adds documentation and does not modify any existing code functionality.

Does this PR require an update to the documentation?

This PR is a documentation update. No further documentation changes are needed.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (N/A - documentation only)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@niksirbi
Copy link
Copy Markdown
Member

Thanks for opening the PR, @Edu92337!

Just a heads-up that the current CI failures are unrelated to your changes. You can fix them by fetching updates from the main branch. You can either:

  • merge the current main branch into your PR branch, or
  • rebase your branch onto main.

Once that’s done, the CI should pass again (or fail for reasons related to your PR).

The same also applies to your other PRs #765 and #757.

Since you currently have 3 PRs awaiting review, please hold off on opening new ones until we've merged at least some of the existing work.

This helps us in two ways:

  • We can focus on getting your current PRs finished rather than spreading review effort across more submissions
  • Early PRs often surface patterns we'd like to see adjusted. Once those are addressed, subsequent contributions typically require much less back-and-forth

This is not a criticism of your work by the way, the effort you've put into these PRs is appreciated. This is purely about managing our review capacity effectively.

@Edu92337
Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up. I've updated all three PRs with the latest main branch. I'll wait for your review before opening any new PRs.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8f836e6) to head (d460420).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #759   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        34           
  Lines         2118      2118           
=========================================
  Hits          2118      2118           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@sfmig sfmig left a comment

Choose a reason for hiding this comment

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

Hi @Edu92337, thanks for having a go at this issue.

I like the "Verifying sample data" section you drafted. However, I noticed that it is added to the user guide, rather than to the Contributing guide as was originally suggested in the issue. I was wondering if there was a reason? My original suggestion was to include this code snippet + brief text just after the CONTRIBUTION > Adding data section, so that we can quickly check if the data was correctly added to the GIN repository. But let me know if you think otherwise. If you agree, would you mind moving it to the Contributing guide?

Re the added docstring example in the sample_data.py module, I think we should remove it for consistency with the rest of the codebase. I think in all cases we use the examples in the docstrings to demo the function they refer to, and not any other, just for clarity for our users.

Let me know thoughts, thanks again!

@Edu92337
Copy link
Copy Markdown
Contributor Author

thanks for the feedback @sfmig , I misunderstood where this should go. I'll move the "Verifying sample data" section to the Contributing guide and remove the example from the docstring to keep it consistent with the rest of the codebase.

@niksirbi
Copy link
Copy Markdown
Member

niksirbi commented Feb 9, 2026

Hi @Edu92337, the text you've added looks good now. I've had an occasion to 'test' it, as I recently added a new sample dataset. One additional thing to mention: if contributors have also added videos for the sample dataset, they should include with_video=True in the sample_data.fetch_dataset() call so that the linking of the video to the dataset is also tested.

Also, be aware that in PR #764 we've moved the contributing guide to docs/source/community/contributing.md since you opened this PR. You'll need to rebase your branch onto the current main and ensure your changes end up in the new file location. If you're struggling with the rebase, you're also welcome to close this PR and open a fresh one instead—just reference this PR in the new one for context. In either case, the PR will need a more informative title than "Code snippets". PR titles are important for keeping a clear history, because after merging they become the commit messages on the main branch.

@niksirbi niksirbi changed the title Code snippets Add code snippets for verifying sample data loading Feb 9, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 9, 2026

Copy link
Copy Markdown
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

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

Thanks @Edu92337. I've moved the new section to the bottom of the contributing guide and given the PR a more informative name. I will merge this PR as soon as the CI passes.

@niksirbi niksirbi merged commit f741080 into neuroinformatics-unit:main Feb 9, 2026
17 checks passed
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.

Add a snippet to verify the new sample data can be fetched

3 participants