Skip to content

Commit

Permalink
Revert "Remove get_license() from Submission class"
Browse files Browse the repository at this point in the history
This reverts commit 2cf9046.
  • Loading branch information
GraemeWatt committed Apr 18, 2024
1 parent ec1359d commit d87017d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions hepdata_lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,17 @@ def __init__(self):
"Created with hepdata_lib " + __version__,
"https://doi.org/10.5281/zenodo.1217998")

@staticmethod
def get_license():
"""Return the default license."""
data_license = {}
data_license["name"] = "cc-by-4.0"
data_license["url"] = "https://creativecommons.org/licenses/by/4.0/"
data_license[
"description"] = "The content can be shared and adapted but you must\
give appropriate credit and cannot restrict access to others."
return data_license

def add_table(self, table):
"""Append table to tables list.
Expand Down Expand Up @@ -659,6 +670,7 @@ def create_files(self, outdir=".", validate=True, remove_old=False):

# Write general info about submission
submission = {}
submission["data_license"] = self.get_license()
submission["comment"] = self.comment
if self.related_records:
submission["related_to_hepdata_records"] = self.related_records
Expand Down

0 comments on commit d87017d

Please sign in to comment.