Skip to content

New YAML output review #349

Closed
Closed

Description

@tdruez

Comparing current output from DejaCode:

about_resource: django_rest_hooks-1.5.0-py2.py3-none-any.whl
attribute: true
checksum_md5: 7e37315a6572c6771ba6877392fb18ed
checksum_sha1: 4007c278d712146a6e07acea505afe1ef4ea5941
copyright: Copyright (c) 2016 Zapier Inc.
description: Add webhook subscriptions to your Django app.
download_url: https://pypi.python.org/packages/95/b3/53614fb7dc59fe86f54cdb5366d35f2efea20c54c66a828aa69e8070cc70/django_rest_hooks-1.5.0-py2.py3-none-any.whl#md5=7e37315a6572c6771ba6877392fb18ed
homepage_url: https://github.com/zapier/django-rest-hooks
license_expression: isc
licenses:
-   file: isc.LICENSE
    key: isc
    name: ISC License
name: django-rest-hooks
notice_file: django_rest_hooks-1.5.0-py2.py3-none-any.whl.NOTICE
notice_url: https://github.com/zapier/django-rest-hooks/blob/master/LICENSE.md
owner: Zapier
version: 1.5.0

To the output generated by aboutcode-toolkit About().dumps() version 3.2.2:

about_resource: django_rest_hooks-1.5.0-py2.py3-none-any.whl
attribute: yes
checksum_md5: 7e37315a6572c6771ba6877392fb18ed
checksum_sha1: 4007c278d712146a6e07acea505afe1ef4ea5941
copyright: Copyright (c) 2016 Zapier Inc.
description: >-
    Add webhook subscriptions to your Django app.
download_url:
    - https://pypi.python.org/packages/95/b3/53614fb7dc59fe86f54cdb5366d35f2efea20c54c66a828aa69e8070cc70/django_rest_hooks-1.5.0-py2.py3-none-any.whl#md5=7e37315a6572c6771ba6877392fb18ed
homepage_url:
    - https://github.com/zapier/django-rest-hooks
license_expression: isc
licenses:
    -   file: isc.LICENSE
        key: isc
        name: ISC License
name: django-rest-hooks
notice_file: django_rest_hooks-1.5.0-py2.py3-none-any.whl.NOTICE
notice_url:
    - https://github.com/zapier/django-rest-hooks/blob/master/LICENSE.md
owner:
    - Zapier
redistribute: yes
track_changes: yes
version: 1.5.0

Why are the following field displayed as list: download_url, homepage_url, notice_url, owner?
Also, why the indent for license is - while it's - for other list type field?
Lastly, the field ordering looks alphabetical, is this wanted?

Activity

  1. added this to the version 3.2.0 milestone on Oct 24, 2018
  2. chinyeungli commented on Oct 25, 2018

    @chinyeungli
    Contributor

    for the - vs - , I have no idea why is this as I didn't do any formatting as I'm just using saneyaml.dump(about_data) to dump the data, and that's why it's in alphabetical order. I will investigate a bit. In addition, I was thinking it's possible to have multiple download_urls for the same component/package, but I think this is a super rare case that user wants to include more than one url. I will fix that later.

  3. added a commit that references this issue on Nov 6, 2018
  4. chinyeungli commented on Nov 15, 2018

    @chinyeungli
    Contributor

    re the ordering:

    perhaps the correct ordering ought to be
    about_resource
    name
    version <-- if any

    and the rest is the order from the mapping.config file (if any); otherwise alphabetical order.

  5. added 2 commits that reference this issue on Nov 15, 2018
  6. added 3 commits that reference this issue on Nov 15, 2018
  7. tdruez commented on Nov 15, 2018

    @tdruez
    ContributorAuthor

    @chinyeungli the changes looks good.
    I would suggested to migrate the contact field to a StringField in place of current ListField
    https://github.com/nexB/aboutcode-toolkit/blob/develop/src/attributecode/model.py#L739

    Current output:

    about_resource: aboutcode_toolkit-3.0.2-py2.py3-none-any.whl
    name: AboutCode toolkit
    version: 3.0.2
    attribute: yes
    checksum_md5: 7423e283e7c50979313f225065a5fea5
    checksum_sha1: 789d5d29437a11e8119da354a77218190d597d6d
    contact:
        - http://www.nexb.com/contactus.html
    copyright: Copyright (c) 2013-2017 nexB Inc.
    description: >-
        AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file provides a simple
        way to document the provenance (origin and license) 'about' a software component.
        This is a small text file stored in the codebase side-by-side with the documented
        software component.
    download_url: https://pypi.python.org/packages/11/7c/07b565c8a66f8846dab007ad80e31078f15034981dcb7c5e26dd985e3f4a/aboutcode_toolkit-3.0.2-py2.py3-none-any.whl#md5=7423e283e7c50979313f225065a5fea5
    homepage_url: https://aboutcode.org
    license_expression: apache-2.0
    
  8. reopened this on Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions