Skip to content

Keep a data-sharing results section from posing as the data statement - #207

Merged
thesanogoeffect merged 1 commit into
mainfrom
claude/project-thread-7fdr9l
Oct 18, 2026
Merged

thesanogoeffect merged 1 commit into
mainfrom
claude/project-thread-7fdr9l

Conversation

@thesanogoeffect

@thesanogoeffect thesanogoeffect commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Requested by Jakub · project thread

Before: on a meta-science paper (#204, a study of data and code sharing in computational communication science), data_availability held the paper's results section on how other studies share data ("As shown in Figure 6, the large majority of publications did not share any data …"). The paper's own statement, "The codebook, data, and analysis code are available in this OSF repository: https://osf.io/teubg/overview.", was not recognised in any mode, so active mode returned nothing at all.

After: both the default shadow mode and active mode return the paper's own OSF sentence.

Two causes. In the default (shadow) mode, any section typed as open data was copied whole. Headings like "Data sharing", "Open science practices" or "Reproducibility" are open-data aliases, and in a meta-science paper they head results. Separately, the declaration grammar only accepted subjects like "the data" or "data and code", so a listed subject ("The codebook, data, and analysis code are …") never counted as a declaration.

How:

  • integrity_statements._legacy_section_is_topical: an open-data section is now treated like the existing "long, possibly mistyped" copies when all three hold: its heading is not a data/code/materials availability heading, it is longer than a compact statement (over 1200 characters or more than 3 paragraphs), and no row declares where the data are. A lexical declaration elsewhere in the paper then wins. With none, the section's opening paragraphs are still kept, as before. Only data_availability is affected.
  • statement_scan._DATA_SUBJECT accepts a list of up to four items around the data/code/materials noun (codebooks, scripts, software and syntax included), and the legacy anchors add "code is/are available".
  • Regression tests in tests/extract/test_integrity_statements.py cover three headings × two modes, listed subjects, and a long section under "Data availability" that is still copied. 11 of the 13 new tests fail without the fix.

Checks: ruff check, ruff format --check, and pytest -m "not slow" pass (14,226 passed). One timing test, test_rate_limiter.py::test_serial_waiters_are_pacing, failed once under full-suite load and passes on its own; this change does not touch it.

The paper itself could not be fetched from this environment, so the reproduction rebuilds its structure from the text in the issue. A run on the real PDF would confirm it.

A meta-science paper's results section on how other studies share data was
copied as the paper's own data_availability in the default shadow mode, and
the paper's real statement ("The codebook, data, and analysis code are
available in this OSF repository: ...") was not recognised in any mode.

A long open-data section under a heading other than an availability heading
that never declares where the data are now yields to a declaration elsewhere
in the paper, and a declaration whose subject lists several items is
recognised.

Fixes #204
@thesanogoeffect thesanogoeffect self-assigned this Oct 17, 2026
@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.55%. Comparing base (cd7150a) to head (a4884c9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #207   +/-   ##
=======================================
  Coverage   90.55%   90.55%           
=======================================
  Files         309      309           
  Lines       57282    57289    +7     
  Branches    10374    10376    +2     
=======================================
+ Hits        51873    51880    +7     
  Misses       3450     3450           
  Partials     1959     1959           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thesanogoeffect
thesanogoeffect marked this pull request as ready for review October 17, 2026 10:51
@thesanogoeffect
thesanogoeffect merged commit d2b75ba into main Oct 18, 2026
19 checks passed
@thesanogoeffect
thesanogoeffect deleted the claude/project-thread-7fdr9l branch October 18, 2026 09:12
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.

1 participant