Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull FIELDS_JSON_URL into the codebase on release #1045

Merged
merged 1 commit into from Mar 22, 2023

Conversation

jsignell
Copy link
Member

@jsignell jsignell commented Mar 15, 2023

Related Issue(s):

Description:

This PR adds a step to the release process that pulls the remote file and puts it in a particular location where it can be read from the pystac code and bundled up with the code when packaging.

I did not try to tackle the question of cleaning up the Enum because of the option to pass in custom fields. I don't see an easy way to clean this up without breaking backwards compat.

PR Checklist:

  • pre-commit hooks pass locally
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@jsignell jsignell changed the title Load file Pull FIELDS_JSON_URL into the codebase on release Mar 15, 2023
pystac/summaries.py Outdated Show resolved Hide resolved
scripts/pull-static Show resolved Hide resolved
scripts/pull-static Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.05 ⚠️

Comparison is base (70788e1) 90.34% compared to head (bd3180d) 90.29%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1045      +/-   ##
==========================================
- Coverage   90.34%   90.29%   -0.05%     
==========================================
  Files          47       47              
  Lines        6213     6215       +2     
  Branches      929      929              
==========================================
- Hits         5613     5612       -1     
- Misses        422      424       +2     
- Partials      178      179       +1     
Impacted Files Coverage Δ
pystac/summaries.py 78.88% <100.00%> (-0.89%) ⬇️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gadomski gadomski added this to the 1.8 milestone Mar 15, 2023
@gadomski gadomski linked an issue Mar 15, 2023 that may be closed by this pull request
@jsignell jsignell requested a review from gadomski March 16, 2023 14:45
scripts/pull-static Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@gadomski gadomski modified the milestones: 1.8, 1.7.1 Mar 16, 2023
@jsignell
Copy link
Member Author

Phew 😅 that was a lot of fails in a row, but should be ready for review now.

@jsignell jsignell requested a review from gadomski March 16, 2023 17:43
scripts/pull-static Outdated Show resolved Hide resolved
Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

I took the liberty of updating the CHANGELOG. One note -- when #400 is closed by this PR, we should create an issue to capture the second part of @schwehr's ticket (mixed type enum). I'll update the PR description to include a checkbox for this task.

scripts/pull-static Show resolved Hide resolved
scripts/pull-static Show resolved Hide resolved
@jsignell
Copy link
Member Author

we should create an issue to capture the second part of @schwehr's ticket (mixed type enum)

The reason for the mixed type enum is that there are mixed types in the original fields.json. So the enum is just smoothing over an oddity in the upstream definition. I don't really see how we can do anything about it in pystac itself as long as we still want to accept arbitrary fields json.

@gadomski gadomski enabled auto-merge March 20, 2023 17:18
@gadomski gadomski disabled auto-merge March 20, 2023 17:19
@gadomski gadomski modified the milestones: 1.7.1, 1.8 Mar 20, 2023
@gadomski gadomski self-requested a review March 20, 2023 17:20
pystac/summaries.py Outdated Show resolved Hide resolved
@jsignell jsignell requested a review from gadomski March 20, 2023 20:23
Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

LGTM ... I also re-added FIELDS_JSON_URL as a deprecated field, w/ a plan to remove in v2.

Because we're adding a new module, this is technically a feature-adding, backwards compatible change, so needs to be in v1.8. I'm going to hold off on merging until #1049 lands and we release v1.7.1.

@gadomski gadomski self-requested a review March 20, 2023 23:13
@gadomski gadomski force-pushed the load-file branch 2 times, most recently from 0c798a0 to c43a974 Compare March 22, 2023 11:45
@gadomski gadomski enabled auto-merge March 22, 2023 11:49
@gadomski gadomski added this pull request to the merge queue Mar 22, 2023
@gadomski gadomski merged commit 3be47b2 into stac-utils:main Mar 22, 2023
20 checks passed
@jsignell jsignell deleted the load-file branch March 22, 2023 14:36
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.

Runtime network loading of FIELDS_JSON_URL and mixed type enum
4 participants