riga / law

Build large-scale task workflows: luigi + job submission + remote targets + environment sandboxing using Docker/Singularity
http://law.readthedocs.io
BSD 3-Clause "New" or "Revised" License
98 stars 41 forks source link

add coffea formatter #94

Closed pfackeldey closed 4 years ago

pfackeldey commented 4 years ago

This PR implements a formatter for coffea files (https://github.com/CoffeaTeam/coffea). It adds a new formatter to law/contrib. I've tested both methods locally with success.

pfackeldey commented 4 years ago

for testing this PR do:

import law
law.contrib.load("coffea")

input_file = law.LocalFileTarget("test.coffea")

# test the loading method:
test_load = input_file.load(formatter="coffea")

# test the dump method:
test_dump = law.LocalFileTarget("test_dump.coffea")

# dump the previous loaded (or any) coffea objects:
test_dump.dump(test_load)

download the test coffea file here. (I could not find a better solution for sharing the test file currently, because github does not support coffea files...)

riga commented 4 years ago

Yep, looks nice!

I think I have push permissions to your branch, right? Will add docs ...