stencila / encoda

↔️ A format converter for Stencila documents
https://stencila.github.io/encoda/
Apache License 2.0
35 stars 9 forks source link

feat(JATS): Read permissions element from figures #968

Closed rgieseke closed 3 years ago

rgieseke commented 3 years ago

Here is an attempt at reading the permissions/license of a figure in JATS analogous to the main article license.

I'm not entirely sure how a figure with multiple images and diverging licenses should be handled:

Contents of Permissions: The sub-elements of are repeatable. If multiple values are applicable (such as multiple copyright years), they should be tagged separately rather than as multiple values within a single element. Repeated values do not describe the source of the material, they describe the current Intellectual Property for the article or object.

https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/permissions.html

On https://jats4r.org/permissions there are examples with repeated <permissions> elements:

I would think however that it's better in such a case to attach the different licenses the individual <graphic> elements.

Handling multiple <permissions> could probably be added to encoda but handling only one license doesn't require much code changes :slightly_smiling_face: (I tried for a bit but not sure if it's worth adding.)

codecov-commenter commented 3 years ago

Codecov Report

Merging #968 (e6bec3f) into master (8ad10b5) will increase coverage by 0.00%. The diff coverage is 100.00%.

:exclamation: Current head e6bec3f differs from pull request most recent head ab8be66. Consider uploading reports for the commit ab8be66 to get more accurate results Impacted file tree graph

@@           Coverage Diff           @@
##           master     #968   +/-   ##
=======================================
  Coverage   88.32%   88.32%           
=======================================
  Files          80       80           
  Lines        7586     7587    +1     
  Branches     2455     2455           
=======================================
+ Hits         6700     6701    +1     
  Misses        859      859           
  Partials       27       27           
Impacted Files Coverage Δ
src/codecs/jats/index.ts 95.87% <100.00%> (+<0.01%) :arrow_up:

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 8ad10b5...ab8be66. Read the comment docs.

nokome commented 3 years ago

Thanks, @rgieseke this looks great. I'm going to merge as is and if needs be we can tackle the more complicated scenario of a figure with multiple images and diverging licenses some time later.

stencila-ci commented 3 years ago

:tada: This PR is included in version 0.118.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: