Project

Profile

Help

Story #1882

closed

Rebuild model to support all package types

Added by amacdona@redhat.com over 8 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
2.13.0
Target Release - Python:
2.0.0
Groomed:
No
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Quarter:

Description

The python model is currently built from the PKG-INFO file. It's unit key is (name, version) which is a problem for wheels because there can be many files for each name and version. Filename is a better key because name, version, platform, pyversion, and filetype are all present in a predictable, collision proof way defined in https://www.python.org/dev/peps/pep-0427/ for wheels. The other formats should only have one file each (double check this).

The new model must:

  • be able to be instantiated (and later saved to support lazy) from the JSON
  • be able to update fields that are unavailable from JSON which can be populated from format (except .exe) using twine at download_success time
  • can be instantiated from a package metadata (necessary for upload).

Additionally, it is important to consider that there are multiple versions of python metadata currently supported on pypi (1.0, 1.1, and 2.0). I have written a script to pull down packages and list the metadata keys (including the nested keys for each file) for each metadata version, the results are below.

To complete this task:

  • Determine which fields are necessary for sync
  • determine which fields may not play nice with all package types
  • implement the model
  • implement instantiation from a package
  • add twine to requirements
{   u'1.0': set([   u'author',
                    u'author_email',
                    u'classifiers',
                    u'comment',
                    u'description',
                    u'download_url',
                    u'filetype',
                    u'home_page',
                    u'keywords',
                    u'license',
                    u'maintainer',
                    u'maintainer_email',
                    u'md5_digest',
                    u'metadata_version',
                    u'name',
                    u'obsoletes',
                    u'obsoletes_dist',
                    u'platform',
                    u'project_urls',
                    u'provides',
                    u'provides_dist',
                    u'pyversion',
                    u'requires',
                    u'requires_dist',
                    u'requires_external',
                    u'requires_python',
                    u'summary',
                    u'supported_platform',
                    u'version']),
    u'1.1': set([   u'author',
                    u'author_email',
                    u'classifiers',
                    u'comment',
                    u'description',
                    u'download_url',
                    u'filetype',
                    u'home_page',
                    u'keywords',
                    u'license',
                    u'maintainer',
                    u'maintainer_email',
                    u'md5_digest',
                    u'metadata_version',
                    u'name',
                    u'obsoletes',
                    u'obsoletes_dist',
                    u'platform',
                    u'project_urls',
                    u'provides',
                    u'provides_dist',
                    u'pyversion',
                    u'requires',
                    u'requires_dist',
                    u'requires_external',
                    u'requires_python',
                    u'summary',
                    u'supported_platform',
                    u'version']),
    u'2.0': set([   u'author',
                    u'author_email',
                    u'classifiers',
                    u'comment',
                    u'description',
                    u'download_url',
                    u'filetype',
                    u'home_page',
                    u'keywords',
                    u'license',
                    u'maintainer',
                    u'maintainer_email',
                    u'md5_digest',
                    u'metadata_version',
                    u'name',
                    u'obsoletes',
                    u'obsoletes_dist',
                    u'platform',
                    u'project_urls',
                    u'provides',
                    u'provides_dist',
                    u'pyversion',
                    u'requires',
                    u'requires_dist',
                    u'requires_external',
                    u'requires_python',
                    u'summary',
                    u'supported_platform',
                    u'version']),
    'json': set([   u'_pypi_hidden',
                    u'_pypi_ordering',
                    u'author',
                    u'author_email',
                    u'bugtrack_url',
                    u'cheesecake_code_kwalitee_id',
                    u'cheesecake_documentation_id',
                    u'cheesecake_installability_id',
                    u'classifiers',
                    u'comment_text',
                    u'description',
                    u'docs_url',
                    u'download_url',
                    u'downloads',
                    u'filename',
                    u'has_sig',
                    u'home_page',
                    u'keywords',
                    u'license',
                    u'maintainer',
                    u'maintainer_email',
                    u'md5_digest',
                    u'name',
                    u'package_url',
                    u'packagetype',
                    u'path',
                    u'platform',
                    u'python_version',
                    u'release_url',
                    u'requires_dist',
                    u'requires_python',
                    u'size',
                    u'summary',
                    u'upload_time',
                    u'url',
                    u'version'])}

Files

keys_tester.py (3.37 KB) keys_tester.py amacdona@redhat.com, 04/29/2016 11:47 PM

Related issues

Blocks Python Support - Story #1883: As a user, I can sync and publish all package typesCLOSED - CURRENTRELEASEamacdona@redhat.com

Actions
Blocks Python Support - Story #1884: As a user, I can lazily sync python packagesMODIFIEDCodeHeeler

Actions

Also available in: Atom PDF