Commit 9572ffe 1 parent 6cefceb commit 9572ffe Copy full SHA for 9572ffe
File tree 3 files changed +22
-2
lines changed
3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,15 @@ def description(self):
101
101
102
102
@property
103
103
def LICENSE (self ) -> str :
104
- return '\n ' .join ([ds .LICENSE for ds in self .datasets ])
104
+ licenses = []
105
+ for ds in self .datasets :
106
+ if ds .LICENSE is None or ds .LICENSE == "No license information is found." :
107
+ continue
108
+ if isinstance (ds .LICENSE , str ):
109
+ licenses .append (ds .LICENSE )
110
+ if isinstance (ds .LICENSE , list ):
111
+ licenses .extend (ds .LICENSE )
112
+ return '\n ' .join (licenses )
105
113
106
114
@property
107
115
def doi_or_url (self ) -> str :
Original file line number Diff line number Diff line change @@ -164,7 +164,15 @@ def description(self):
164
164
165
165
@property
166
166
def LICENSE (self ) -> str :
167
- return '\n ' .join ([ds .LICENSE for ds in self .datasets ])
167
+ licenses = []
168
+ for ds in self .datasets :
169
+ if ds .LICENSE is None or ds .LICENSE == "No license information is found." :
170
+ continue
171
+ if isinstance (ds .LICENSE , str ):
172
+ licenses .append (ds .LICENSE )
173
+ if isinstance (ds .LICENSE , list ):
174
+ licenses .extend (ds .LICENSE )
175
+ return '\n ' .join (licenses )
168
176
169
177
@property
170
178
def doi_or_url (self ) -> str :
Original file line number Diff line number Diff line change @@ -56,6 +56,10 @@ def id(self) -> str:
56
56
def name (self ) -> str :
57
57
raise NotImplementedError
58
58
59
+ @abstractproperty
60
+ def LICENSE (self ) -> List [str ]:
61
+ raise NotImplementedError
62
+
59
63
@abstractproperty
60
64
def urls (self ) -> List [EbrainsDatasetUrl ]:
61
65
raise NotImplementedError
You can’t perform that action at this time.
0 commit comments