Skip to content

ETT-1502: collate uses volume directly to determine repeat#182

Merged
aelkiss merged 1 commit into
mainfrom
ETT-1502-collate-repeat
May 5, 2026
Merged

ETT-1502: collate uses volume directly to determine repeat#182
aelkiss merged 1 commit into
mainfrom
ETT-1502-collate-repeat

Conversation

@aelkiss
Copy link
Copy Markdown
Member

@aelkiss aelkiss commented May 5, 2026

Currently in production, we are no longer using LinkedPairtree or LocalPairtree to deposit material. They were responsible for setting is_repeat. Now, collate checks directly.

This points to a sort of mismatch for how for writing to the repository we have abstracted the repository storage, but not for reading what is in the repository. That might be future work to separate out from Volume.

Currently in production, we are no longer using LinkedPairtree or
LocalPairtree to deposit material. They were responsible for setting
is_repeat. Now, collate checks directly.

This points to a sort of mismatch for how for writing to the repository
we have abstracted the repository storage, but not for reading what is
in the repository. That might be future work to separate out from
Volume.
@aelkiss
Copy link
Copy Markdown
Member Author

aelkiss commented May 5, 2026

This removes the tests and functionality for is_repeat from LinkedPairtree and LocalPairtree. We might want to remove those classes entirely, although LocalPairtree could potentially be a base for future functionality around reading from the repository.

There is a test in Collate for the is_repeat functionality which remains the same and should cover this case:

feed/t/collate.t

Lines 163 to 173 in 795e9f1

it "logs a repeat when collated twice" => sub {
my $volume = stage_volume($tmpdirs,'test','test');
my $stage = HTFeed::Stage::Collate->new(volume => $volume);
$stage->run;
# collate same thing again
$stage = HTFeed::Stage::Collate->new(volume => $volume);
$stage->run;
ok($testlog->matches(qw(INFO.*already in repo)));
};

@aelkiss aelkiss requested a review from moseshll May 5, 2026 17:32
@aelkiss
Copy link
Copy Markdown
Member Author

aelkiss commented May 5, 2026

I recommend viewing w/o whitespace changes: https://github.com/hathitrust/feed/pull/182/changes?w=1
since code formatting did a number on it..

Copy link
Copy Markdown
Contributor

@moseshll moseshll left a comment

Choose a reason for hiding this comment

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

Wow, ignoring whitespace definitely helps. I see no issues here, APPROVE

@aelkiss aelkiss merged commit d4f18f3 into main May 5, 2026
1 check 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.

2 participants