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

feat: read golden json using fsspec #1088

Merged
merged 3 commits into from
May 1, 2024

Conversation

ikrommyd
Copy link
Contributor

@ikrommyd ikrommyd commented May 1, 2024

This will allow reading golden json over https

@lgray
Copy link
Collaborator

lgray commented May 1, 2024

Please add in tests that use new features!

@ikrommyd
Copy link
Contributor Author

ikrommyd commented May 1, 2024

I don't understand why this works:

import fsspec
import json

with fsspec.open("tests/samples/Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt") as f:
    d = json.load(f)

while this doesn't:

import fsspec
import json

with fsspec.open("https://github.com/CoffeaTeam/coffea/blob/master/tests/samples/Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt") as f:
    d = json.load(f)

it fails with JSONDecodeError: Expecting value: line 7 column 1 (char 6)

@ikrommyd
Copy link
Contributor Author

ikrommyd commented May 1, 2024

nvm I'm stupid. Just needs the raw content

@lgray lgray merged commit 8dc655e into CoffeaTeam:master May 1, 2024
14 checks passed
@ikrommyd ikrommyd deleted the golden-json-loading branch May 1, 2024 22:01
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.

None yet

2 participants