Closed SebastinSanty closed 6 years ago
Merging #43 into master will increase coverage by
0.45%
. The diff coverage is96.29%
.
@@ Coverage Diff @@
## master #43 +/- ##
==========================================
+ Coverage 95.03% 95.49% +0.45%
==========================================
Files 15 18 +3
Lines 302 355 +53
==========================================
+ Hits 287 339 +52
- Misses 15 16 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/JSONLD/JSONLD_DOI.jl | 100% <100%> (ø) |
|
src/DataDepsGenerators.jl | 91.42% <100%> (ø) |
:arrow_up: |
src/utils.jl | 100% <100%> (+10%) |
:arrow_up: |
src/JSONLD/JSONLD_Web.jl | 90% <90%> (ø) |
|
src/JSONLD/JSONLD.jl | 96.96% <96.96%> (ø) |
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 c0b6dfc...a4929ff. Read the comment docs.
Right, I was thinking of adding kwargs
like multiple arguments for handle_keys
, which can check in the given order till the correct key is found.
which can check in the given order till the correct key is found.
That is what the code I posted does. It recursively peals off the first key until it is found, or until there is no keys left. It just does so via dispatch and splatting
We should probably check that the JSON-LD has the key-value pair
"@context": "http://schema.org",
And if it doesn't erroring out; or at least warn
ing
I believe @context
is JSON-LD for namespaces. Or something like that
So if it doesn't have that we can't know that it is using the names we expect.
On the other hand we could just not worry about it: Garbage-in => garbage out
Kaggle for some reason is down. Will restart the tests once that works.
I am a fan of the
handle_key
method.If you swap there argument order around, if has a really elegant way of writing it, using the splatting arguments. (I think they say varadic function?) (and follows the preferred order of collections before keys)
You can define it as
Demo: