from .module_meta_info import ModuleMetadata
-__version__ = '0.6.1'
+__version__ = '0.6.2'
LOG = logging.getLogger(__name__)
# -------------------------------------------------------------------------
@property
def deprecated_for(self):
- """The reason of deprecation of this forge module.."""
+ """The reason of deprecation of this forge module."""
return self._deprecated_for
@deprecated_for.setter
raise ValueError(msg)
self._feedback_score = v
+ # -------------------------------------------------------------------------
+ @property
+ def homepage_url(self):
+ """The homepage URL of this forge module."""
+ return self._homepage_url
+
+ @homepage_url.setter
+ def homepage_url(self, value):
+ if value is None:
+ self._homepage_url = None
+ return
+ v = str(value).strip()
+ if value == '':
+ self._homepage_url = None
+ return
+ self._homepage_url = v
+
+ # -------------------------------------------------------------------------
+ @property
+ def issues_url(self):
+ """The issues URL of this forge module."""
+ return self._issues_url
+
+ @issues_url.setter
+ def issues_url(self, value):
+ if value is None:
+ self._issues_url = None
+ return
+ v = str(value).strip()
+ if value == '':
+ self._issues_url = None
+ return
+ self._issues_url = v
+
+ # -------------------------------------------------------------------------
+ @property
+ def module_group(self):
+ """The module group of this forge module."""
+ return self._module_group
+
+ @module_group.setter
+ def module_group(self, value):
+ if value is None:
+ self._module_group = None
+ return
+ v = str(value).strip()
+ if value == '':
+ self._module_group = None
+ return
+ self._module_group = v
+
+ # -------------------------------------------------------------------------
+ @property
+ def slug(self):
+ """The slug of this forge module."""
+ return self._slug
+
+ @slug.setter
+ def slug(self, value):
+ if value is None:
+ self._slug = None
+ return
+ v = str(value).strip()
+ if value == '':
+ self._slug = None
+ return
+ self._slug = v
+
# -------------------------------------------------------------------------
def as_dict(self, short=True):
res['downloads'] = self.downloads
res['endorsement'] = self.endorsement
res['feedback_score'] = self.feedback_score
+ res['homepage_url'] = self.homepage_url
+ res['issues_url'] = self.issues_url
+ res['module_group'] = self.module_group
+ res['slug'] = self.slug
return res
res['downloads'] = self.downloads
res['endorsement'] = self.endorsement
res['feedback_score'] = self.feedback_score
+ res['homepage_url'] = self.homepage_url
+ res['issues_url'] = self.issues_url
+ res['module_group'] = self.module_group
res['name'] = self.name
+ res['slug'] = self.slug
res['releases'] = []
for release in self.releases:
for prop_name in (
'created_at', 'deprecated_at', 'deprecated_for', 'downloads', 'endorsement',
- 'feedback_score',):
+ 'feedback_score', 'homepage_url', 'issues_url', 'module_group', 'slug'):
if prop_name in js_info and js_info[prop_name]:
setattr(module_info, prop_name, js_info[prop_name])