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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wheel/python-version/python-implementation/status badage for PyPI. #465

Merged
merged 4 commits into from
Jun 7, 2015

Conversation

tonyseek
Copy link
Contributor

@tonyseek tonyseek commented Jun 7, 2015

Please review it. Thanks.

Related Issues: badges/pypipins#39 badges/pypipins#37

<tr><th data-keywords='python'> PyPI: </th>
<td><img src='https://img.shields.io/pypi/status/Django.svg' alt=''/></td>
<td><code>https://img.shields.io/pypi/status/Django.svg</code></td>
</tr>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index.html is auto-generated. Apply modifications to try.html instead.

@tonyseek
Copy link
Contributor Author

tonyseek commented Jun 7, 2015

@espadrine I modified the try.html and reverted the index.html.

} else if (info == 'implementation') {
var implementations = [];
var pattern = /^Programming Language \:\: Python \:\: Implementation \:\: (\S+)$/;
for (var i in data.info.classifiers) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use a regular loop here, please?

for (var i = 0; i < data.info.classifiers.length; i++) {

}

(Yes, I agree, JS is ugly compared to Python ☺.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

@espadrine
Copy link
Member

Thanks a lot for contributing! I hope all is well on @kura's side; even his blog, which I loved, is down.

(As a tiny extra, it would be fantastic if you'd use === instead of ==.)

<td><code>https://img.shields.io/pypi/wheel/Django.svg</code></td>
</tr>
<tr><th data-keywords='python'> PyPI: </th>
<td><img src='/pypi/py_versions/Django.svg' alt=''/></td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using pyversions above. Which do you prefer?

(I have a personal preference to pyversions, but I'm not well-versed in the python community.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry. I forgot it. It will be fixed :-)

@tonyseek
Copy link
Contributor Author

tonyseek commented Jun 7, 2015

@espadrine I pushed new commits.

@espadrine
Copy link
Member

10/10 will merge and prod.

@espadrine espadrine merged commit 59e0a06 into badges:master Jun 7, 2015
@tonyseek
Copy link
Contributor Author

tonyseek commented Jun 7, 2015

Thank you!

@tonyseek tonyseek deleted the pypipins branch June 7, 2015 19:57
espadrine added a commit that referenced this pull request Jun 7, 2015
@espadrine
Copy link
Member

It's live. Try it, tell me if there is a bug we didn't anticipate; I'll update the website in 24h to invite everyone to use it.

@tonyseek
Copy link
Contributor Author

tonyseek commented Jun 7, 2015

👍

Okay, I will.

@josuebrunel
Copy link

Hello guys,

Thanks for what you've already done, but It seems like _py_versions_ isn't working

https://img.shields.io/pypi/py_versions/Django.svg

For my project

https://img.shields.io/pypi/py_versions/myql.svg

PyPI

Thanks

@tonyseek
Copy link
Contributor Author

tonyseek commented Jun 9, 2015

@josuebrunel https://img.shields.io/pypi/pyversions/Django.svg (without the underline) works here.

@josuebrunel
Copy link

@tonyseek thanks a lot. Great job 👍

@tonyseek
Copy link
Contributor Author

tonyseek commented Jun 9, 2015

tonyseek@dee58b4 is a temporary commit :-)

@xflr6
Copy link

xflr6 commented Jun 12, 2015

Great work, thanks.
Any chance to add a replacement for the format badge (somewhat more informative than wheel: yes/no)?
And maybe make the version badge green (red looking like a warning)?

@espadrine
Copy link
Member

@xflr6 yes, that would be great! What did it look like? format | wheel etc.?

@xflr6
Copy link

xflr6 commented Jun 12, 2015

Yes, the best available format from wheel, source, or egg (green, yellow, red).

@tonyseek
Copy link
Contributor Author

In my opinion keeping wheel be standalone may be better, because it is a encouraged format rather than egg(outdated) and source(almost all packages have it). 🐳

@espadrine
Copy link
Member

Further information on how to detect wheel / egg: https://github.com/kura/yarg/blob/master/yarg/package.py#L241

I have a patch.

espadrine added a commit that referenced this pull request Jun 16, 2015
@espadrine
Copy link
Member

@xflr6 this should work: https://img.shields.io/pypi/format/graphviz.svg

As usual, I'll update the website in 24h.

@xflr6
Copy link

xflr6 commented Jun 16, 2015

Great, thanks a lot!

As for the color of the version badge, I just realized that mine are red because I conservatively keep my packages in the 0.x versions. I see the point, but then I would like to second #349 for adding an optional parameter to override the color (at least for the version badge so we have full backwards-compatibility with pypip).

@espadrine
Copy link
Member

@xflr6 I wish to keep backwards-compatibility with pypip. Can you specify the difference between the current state and pypip?

@xflr6
Copy link

xflr6 commented Jun 16, 2015

Sorry this did not come through: The version badge was green regardless of the version (so a color-overriding parameter would make it possible to make the badge look exactly like before).

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.

None yet

4 participants