Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

generalize py-pi-versions-from-framework-classifiers? #10248

Open
1ucian0 opened this issue Jun 12, 2024 · 1 comment
Open

generalize py-pi-versions-from-framework-classifiers? #10248

1ucian0 opened this issue Jun 12, 2024 · 1 comment
Labels
service-badge Accepted and actionable changes, features, and bugs

Comments

@1ucian0
Copy link

1ucian0 commented Jun 12, 2024

馃搵 Description

Would it be possible to query requires_dist in https://pypi.python.org/pypi/<pkg>/json (or https://www.wheelodex.org/json/projects/%3Cpkg%3E or similar) to create a badge with the version of a particular dependency?

Some sort of generic py-pi-versions-from-framework-classifiers

For example: https://img.shields.io/pypi/dependency_versions/qiskit/numpy generate numpy compatibility
based on query https://pypi.org/pypi/qiskit/json

@chris48s
Copy link
Member

chris48s commented Jun 14, 2024

PyPI dependency version is a reasonable request. We have this for some other package registries.

One thing that makes this a bit challenging in python is that whereas with npm for example, the dependencies are expressed as an object mapping package names to versions e.g:

{
  "glob": "^10.4.1",
  "global-agent": "^3.0.0",
  "got": "^14.4.1",
  "graphql": "16.8.2"
}

This makes it easy to take a package and return a version range.

With PyPI, requires_dist is an array of strings expressing a package constraint (which may or may not include a version, and may include a bunch of other stuff) e.g:

[
  "python-dateutil>=2.8.0",
  "qiskit[crosstalk-pass,csp-layout-pass,qasm3-import,visualization]; extra == \"all\"",      
  "typing-extensions",
  "importlib-metadata>=4.6; python_version < '3.10'",
  "isort==5.13.2 ; extra == \"dev\""
]

That requires a bit more work to parse correctly.

@chris48s chris48s added the service-badge Accepted and actionable changes, features, and bugs label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

No branches or pull requests

2 participants