Skip to content

Add documentation_url to the Package Class - #4099

Open
asimchoudhary wants to merge 2 commits into
aboutcode-org:developfrom
asimchoudhary:develop
Open

Add documentation_url to the Package Class#4099
asimchoudhary wants to merge 2 commits into
aboutcode-org:developfrom
asimchoudhary:develop

Conversation

@asimchoudhary

Copy link
Copy Markdown

Fixes #4092

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: Asim kumar <aktech701@gmail.com>
Signed-off-by: Asim kumar <aktech701@gmail.com>
@asimchoudhary

Copy link
Copy Markdown
Author

@pombredanne

I’ve raised a pull request addressing the issue “add documentation_url to the Package class”. The changes include:

  • Initialization of the documentation_url field.
  • Serialization and deserialization logic for the new field.
  • Could you please review the PR when you get the chance? I’d appreciate your feedback on the
    implementation. Let me know if any additional changes are needed.

Thank you! 😊

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Copy link
Copy Markdown
Member

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.

  1. 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.
  2. Please read the original issue properly: #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

mapping.pop('package_uid', None)
mapping.pop('datafile_paths', None)
mapping.pop('datasource_ids', None)
mapping.pop('documentation_url', None)

Copy link
Copy Markdown
Member

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


@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):

Copy link
Copy Markdown
Member

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

@AyanSinhaMahapatra AyanSinhaMahapatra mentioned this pull request Apr 4, 2025
6 tasks
@AyanSinhaMahapatra

Copy link
Copy Markdown
Member

Gentle ping @asimchoudhary would be nice to merge this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider adding new documentation_url to Package model

2 participants