-
-
Notifications
You must be signed in to change notification settings - Fork 595
Add documentation_url to the Package Class #4099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Asim kumar <aktech701@gmail.com>
Signed-off-by: Asim kumar <aktech701@gmail.com>
I’ve raised a pull request addressing the issue “add documentation_url to the Package class”. The changes include:
Thank you! 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asimchoudhary Thanks for the PR.
- Please read the contribution docs: https://scancode-toolkit.readthedocs.io/en/stable/contribute/contrib_dev.html#running-tests you have info on how to regenerate tests to pass tests after you added changes.
- Please read the original issue properly: Consider adding new documentation_url to Package model #4092 (comment) you also have to collect this field in the respective datafilehandlers for manifests where this is present (and review others from the reference URLs for the spec)
See also comments for specific feedback
@@ -1633,10 +1639,11 @@ def to_package_data(self): | |||
mapping.pop('package_uid', None) | |||
mapping.pop('datafile_paths', None) | |||
mapping.pop('datasource_ids', None) | |||
mapping.pop('documentation_url', None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not required. Please remove
return PackageData.from_dict(mapping) | ||
|
||
@classmethod | ||
def from_package_data(cls, package_data, datafile_path=None, package_only=False): | ||
def from_package_data(cls, package_data, datafile_path=None, package_only=False , documentation_url=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are not correct, please remove. You have to make the changes in the individual datafile handlers, this is a generic function used to create top-level Package objects from PackageData. All common attributes are inherited automatically
Fixes #4092
Tasks
Run tests locally to check for errors.