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-commenter commented Mar 15, 2023

Codecov Report

Attention: Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 90.24%. Comparing base (f7398bc) to head (32113bc).
Report is 251 commits behind head on main.

Files with missing lines Patch % Lines
pystac/summaries.py 62.50% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1045       /-   ##
==========================================
- Coverage   90.34%   90.24%   -0.11%     
==========================================
  Files          47       47              
  Lines        6213     6220        7     
  Branches      929      931        2     
==========================================
  Hits         5613     5613              
- Misses        422      427        5     
- Partials      178      180        2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@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
@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