Skip to content

Conversation

@ping-e84
Copy link
Collaborator

@ping-e84 ping-e84 commented Dec 30, 2025

Related Issue(s):

Proposed Changes:

  1. added 4 stactask.Task methods:
    • add_fileinfo_to_local_assets (plural) is the expected primary user-facing function - for an Item, derives file size in bytes and checksum for all Assets with a local href.
    • add_fileinfo_to_local_asset (singular) is called by add_fileinfo_to_local_assets as it loops through assets: this is (a) the workhorse method that adds the STAC file extension to the Item and metadata fields to each local asset. It supports all file extension fields, but, since most of the fields are not easily calculated on an automated basis, leaves it up to the user to calculate and pass in directly (only size and checksum are automated).
    • compute_multihash calculates file hash based on sha2-256 (but is flexible and allows for other supported algorithms to be used).
    • _is_local_file is a supporting method that allows the user-facing methods to add file metadata or not (if the asset href is non-local).
  2. adds comprehensive tests

PR Checklist:

  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

Use of AI:

  • changes to source code were human designed with AI guidance
  • additions to task.py were generated by Copilot and human-reviewed and edited
  • Documentation (docstrings) was AI-generated per human specifications and human-edited
  • tests were generated by Copilot and human-reviewed and edited

@ping-e84 ping-e84 requested a review from pjhartzell December 30, 2025 22:59
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