Skip to content

Remove duplicate read_text without orjson #348

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

Merged
merged 2 commits into from
May 20, 2021
Merged

Remove duplicate read_text without orjson #348

merged 2 commits into from
May 20, 2021

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented May 19, 2021

Related Issue(s): None

Description: If orjson was not present, the _json_loads method on StacIO would try to read the text again, which would lead to the read text method being called with json (bad). This slipped through CI because one of the requirements-dev.txt dependencies installs orjson, so the non-orjson case wasn't being tested. This commit also includes a new build job to install+test without requirements-dev.txt to try and protect against regression.

Also includes a scripts comment fix to s/yapf/black, and a comment to make pylance ignore a missing orjson import. I didn't update the docs re the yapf->black switch b/c @lossyrob said that some other folks were working on the docs upgrades.

PR Checklist:

  • Code is formatted (run scripts/format)
  • Tests pass (run scripts/test)
  • 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.

If orjson was not present, the `_json_loads` method on `StacIO` would
try to read the text again, which would lead to the read text method
being called with json (bad). This slipped through CI because one of the
requirements-dev.txt dependencies installs orjson, so the non-orjson
case wasn't being tested. This commit also includes a new build job to
install+test without requirements-dev.txt to try and protect against
regression.

Also includes a scripts comment fix to s/yapf/black, and a comment to
make pylance ignore a missing orjson import. I didn't update the docs re
the yapf->black switch b/c @lossyrob said that some other folks were
working on the docs upgrades.
@codecov-commenter
Copy link

codecov-commenter commented May 19, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@5158a4c). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #348   +/-   ##
=======================================
  Coverage        ?   88.58%           
=======================================
  Files           ?       36           
  Lines           ?     4625           
  Branches        ?        0           
=======================================
  Hits            ?     4097           
  Misses          ?      528           
  Partials        ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5158a4c...9deb0f7. Read the comment docs.

@duckontheweb
Copy link
Contributor

I didn't update the docs re the yapf->black switch b/c @lossyrob said that some other folks were working on the docs upgrades.

Thanks @gadomski, I'm planning on tackling that in the next few days.

@duckontheweb duckontheweb merged commit 7846520 into stac-utils:main May 20, 2021
@gadomski gadomski deleted the fix/read-file branch May 20, 2021 18:43
gadomski added a commit to stac-utils/stactools that referenced this pull request May 21, 2021
TODO:
- Wait for the next beta release to get
  stac-utils/pystac#348 and any other bugfixes
- Landsat is borked
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.

4 participants