Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@gadomski
Copy link
Contributor

@gadomski gadomski commented Apr 13, 2022

Related Issue(s):

Description:
In an effort to refactor this package to easily extend it to support #70, this PR refactors the item creation code to use a new Builder pattern. The builder pattern is defined in a stactools.builder namespace, which yanks code from stac-utils/stactools#268. I think this is a good real-world exercise of the builder pattern, with the hopes that lessons learned here can be moved back to stactools.

This is a non-breaking change, there's no real changes to the generated STAC objects (just a couple of trivial re-orderings of the attributes).

I did deprecate two of the COG-creation functions, since they have been superceded by the builder. The deprecation remarks that the functions will be removed in v0.4.0 (two "major" releases from now).

PR checklist:

  • Code is formatted (run scripts/format).
  • Code lints properly (run scripts/lint).
  • Tests pass (run scripts/test).
  • Documentation has been updated to reflect changes, if applicable.
  • Example STAC Catalog has been updated to reflect changes, if applicable.
  • Changes are added to the CHANGELOG.

@gadomski gadomski added this to the v0.4.0 milestone Apr 13, 2022
@gadomski gadomski requested a review from philvarner April 13, 2022 19:38
@gadomski gadomski marked this pull request as draft April 13, 2022 20:03
@gadomski
Copy link
Contributor Author

Converting to draft while I refactor AssetInfo a bit.

@gadomski gadomski marked this pull request as ready for review April 14, 2022 11:42
@gadomski gadomski force-pushed the builder branch 2 times, most recently from 7462164 to e28b35a Compare April 14, 2022 15:22
@gadomski gadomski marked this pull request as draft April 14, 2022 15:22
@gadomski
Copy link
Contributor Author

Converting to draft, #80 is now a per-requisite for this PR.

@gadomski gadomski marked this pull request as ready for review April 14, 2022 16:50
@gadomski gadomski mentioned this pull request Apr 14, 2022
6 tasks
@gadomski gadomski force-pushed the builder branch 2 times, most recently from 095a1f8 to 12348af Compare April 15, 2022 13:29
@gadomski gadomski modified the milestones: v0.4.0, v0.3.0 Apr 15, 2022
@gadomski gadomski merged commit 0c960bb into main Apr 15, 2022
@gadomski gadomski deleted the builder branch April 15, 2022 15:39
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.