1
0
mirror of https://github.com/badges/shields.git synced 2025-10-22 20:32:32 +03:00

Add dependency badge for Pipenv applications [GithubPipenv] (#4096)

I recently published https://github.com/metabolize/rq-dashboard-on-heroku and want to add badges to show the locked version of Python and rq-dashboard, the main dependency it’s wrapping.

This is along the lines of #2259, which was for package.json-based applications, and also included some discussion of a Python application that used `requirements.txt`. It’s useful for showing the pinned version of any dependency in a Python application that uses a lockfile.

In the future, as an alternative to reading Pipfile.lock, I could see expanding this to read Pipfile. However for my purposes I prefer to show the locked dependency, since that’s the version that a user of my package would actually get if they ran it on Heroku.
This commit is contained in:
Paul Melnikow
2019-10-02 15:24:14 -04:00
committed by GitHub
parent 157a6180b2
commit e8d49f2504
6 changed files with 379 additions and 9 deletions

View File

@@ -3,7 +3,6 @@
const Joi = require('@hapi/joi')
const t = (module.exports = require('../tester').createServiceTester())
// These regexes are the same, but declared separately for clarity.
const isPipeSeparatedPythonVersions = Joi.string().regex(
/^([0-9]+\.[0-9]+(?: \| )?)+$/
)