Closed ItIsJordan closed 7 months ago
This PR is intended to close #245.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.37%. Comparing base (
1f006c8
) to head (2ce0035
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I just noticed the coverage. Sorry, will look into that this week.
@clelange : when testing Jordan's branch, I noticed that hepdata_lib
already defines a default license:
and writes it as data_license
in the first YAML document of the submission.yaml
file:
This has been the behaviour ever since the first hepdata_lib
version from 2018. However, data_license
has never been supported in the relevant additional_info_schema.json
. The JSON schema only support a data_license
in the submission_schema.json
(data tables) or a license
in the additional_resources_schema.json
(additional resources). It would be difficult to modify our database model to support a license for a whole submission rather than just individual tables and resource files. Moreover, the default hepdata_lib
license (CC BY 4.0) is slightly more restrictive than the default HEPData license (CC0).
Therefore, I removed the writing of a default license in commit 2cf90464ec5a05e122504019d37b444da6890e51. We could revert that commit if you disagree with the removal. However, I think it will be confusing if we provide new methods to write license information for data tables and additional resources, but keep a redundant default license for the whole submission that will just be ignored when uploading to HEPData.
@GraemeWatt - I think there should be a default license that is applied, and I agree that this should be CC0 since that's the default stated on the HEPData web page. I don't remember why we chose CC BY 4.0 back then. As part of this PR, I think it would be good to state in the documentation that this license is applied by default and that this is the default for all HEPData records as well as mentioning that users can change to their own license (with the newly added functionality of this PR).
Looks like the CI has started failing when building a wheel for wrapt
v1.12.1, installed by astroid
v2.6.6 via pylint
v2.9.6. One solution might be to address #234 by upgrading pylint
to a more recent version.
I opened a PR #260 that removes the pin on Pylint and fixes the build, so better to wait for that PR to be merged.
Looks like this is now good to go? @ItIsJordan
Should be ready now, yes! @clelange
add_additional_resource()
function.add_data_license()
function to theTable
class.get_license()
function from CC BY 4.0 to CC0.📚 Documentation preview 📚: https://hepdata-lib--257.org.readthedocs.build/en/257/