Skip to content

AP-687 Only download files if local file is older#13

Open
jason-raitz wants to merge 4 commits into
mainfrom
AP-687_only-redownload-changed-images
Open

AP-687 Only download files if local file is older#13
jason-raitz wants to merge 4 commits into
mainfrom
AP-687_only-redownload-changed-images

Conversation

@jason-raitz
Copy link
Copy Markdown
Contributor

  • given a UTC modified datetime string for the requested file, we now check if the file exists locally and has a newer mtime

 - given a UTC modified datetime string for the requested file,
   we now check if the file exists locally and has a newer mtime
@jason-raitz jason-raitz self-assigned this May 22, 2026
@jason-raitz jason-raitz marked this pull request as ready for review May 22, 2026 15:38
Copy link
Copy Markdown
Member

@awilfox awilfox left a comment

Choose a reason for hiding this comment

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

r+wc; minor documentation fixes.

Comment thread CHANGELOG.md
Comment on lines +11 to +12
- Optional parameter to `fetch_file()` with a modified time of the remote file pulled from the TIND API
- `fetch_file()` uses this to avoid unnecessary downloads if a file already exists at the target
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wouldn't this be a single entry in the changelog?

Comment thread tind_client/client.py Outdated
Comment thread tind_client/client.py Outdated
Comment thread tind_client/client.py Outdated
@awilfox
Copy link
Copy Markdown
Member

awilfox commented May 22, 2026

It would be nice to have a test. We should be able to mock stat to return specific dates instead of relying on fixture dates / filesystem stuff.

jason-raitz and others added 3 commits May 26, 2026 11:54
Co-authored-by: Anna Wilcox <AWilcox@Wilcox-Tech.com>
Co-authored-by: Anna Wilcox <AWilcox@Wilcox-Tech.com>
@awilfox
Copy link
Copy Markdown
Member

awilfox commented May 26, 2026

I'm thinking about this and… Should we pass in a datetime instead of a str for modified? It feels very ugly to pass in a str, especially an underspecified string.

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