Skip to content

feat: add check_publication_list_format check - #710

Merged
bendichter merged 2 commits into
devfrom
add-check-publication-list-format
Jun 30, 2026
Merged

feat: add check_publication_list_format check#710
bendichter merged 2 commits into
devfrom
add-check-publication-list-format

Conversation

@bendichter

@bendichter bendichter commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Split out from #651 per @h-mayorquin's review suggestion to merge the non-network check quickly while the DOI-resolution (network-based) check gets more design discussion.

Changes

  • Adds check_publication_list_format, which detects comma-separated DOIs/URLs stuffed into a single related_publications entry (e.g. "https://doi.org/10.1234/abc,https://doi.org/10.5678/def") that should instead be separate list entries.
  • Per review feedback, severity is set to BEST_PRACTICE_VIOLATION (stronger than the original BEST_PRACTICE_SUGGESTION): the related_publications schema defines a 1-D array where each element is one publication reference, so combining multiple into one comma-separated string violates the intended data structure, and there are no obvious false positives.
  • Includes unit tests, CHANGELOG entry, and best-practices documentation.

The network-based check_publication_doi_resolves check from #651 is intentionally not included here; it needs further discussion (offline/firewall/transient-failure false positives, canary-request safeguard).

fix #419

Split out from #651 per review feedback: detect comma-separated DOIs/URLs
in related_publications entries that should be separate list entries.
Severity set to BEST_PRACTICE_VIOLATION as suggested in review.

Refs #419

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread src/nwbinspector/checks/_nwbfile_metadata.py Outdated
Co-authored-by: Ryan Ly <310197+rly@users.noreply.github.com>
@bendichter
bendichter requested a review from rly June 30, 2026 21:26
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.04%. Comparing base (13d0d67) to head (043e3ee).
⚠️ Report is 8 commits behind head on dev.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #710      +/-   ##
==========================================
+ Coverage   79.44%   83.04%   +3.60%     
==========================================
  Files          48       48              
  Lines        1897     1923      +26     
==========================================
+ Hits         1507     1597      +90     
+ Misses        390      326      -64     
Files with missing lines Coverage Δ
src/nwbinspector/checks/__init__.py 100.00% <ø> (ø)
src/nwbinspector/checks/_nwbfile_metadata.py 96.60% <100.00%> (+0.34%) ⬆️

... and 5 files with indirect coverage changes

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

@bendichter
bendichter merged commit fed64ed into dev Jun 30, 2026
25 checks passed
@bendichter
bendichter deleted the add-check-publication-list-format branch June 30, 2026 21:29
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 Check]: Comma-separated entries in releated_publication should be list of entries

3 participants