• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

badges / shields / 39217188618

18 Oct 2026 11:42PM UTC coverage: 79.763% (-18.4%) from 98.173%
39217188618

push

github

web-flow
Update simple-icons to 16.35.0 (#12233)

Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>

3358 of 3601 branches covered (93.25%)

41381 of 51880 relevant lines covered (79.76%)

50.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.41
/services/python/python-version-from-toml.service.js
1
import Joi from 'joi'
2 ✔
2
import BaseTomlService from '../../core/base-service/base-toml.js'
2 ✔
3
import { queryParams } from '../index.js'
2 ✔
4
import { url } from '../validators.js'
2 ✔
5

2 ✔
6
const queryParamSchema = Joi.object({
2 ✔
7
  tomlFilePath: url,
2 ✔
8
}).required()
2 ✔
9

2 ✔
10
const schema = Joi.object({
2 ✔
11
  project: Joi.object({
2 ✔
12
    'requires-python': Joi.string().required(),
2 ✔
13
  }).required(),
2 ✔
14
}).required()
2 ✔
15

2 ✔
16
const description = `Shows the required python version for a package based on the values in the requires-python field in PEP 621 compliant pyproject.toml \n
2 ✔
17
a URL of the toml is required, please note that when linking to files in github or similar sites, provide URL to raw file, for example:
2 ✔
18

2 ✔
19
Use https://raw.githubusercontent.com/numpy/numpy/main/pyproject.toml \n
2 ✔
20
And not https://github.com/numpy/numpy/blob/main/pyproject.toml
2 ✔
21
`
2 ✔
22

2 ✔
23
class PythonVersionFromToml extends BaseTomlService {
2 ✔
24
  static category = 'platform-support'
2 ✔
25

2 ✔
26
  static route = {
2 ✔
27
    base: '',
2 ✔
28
    pattern: 'python/required-version-toml',
2 ✔
29
    queryParamSchema,
2 ✔
30
  }
2 ✔
31

2 ✔
32
  static openApi = {
2 ✔
33
    '/python/required-version-toml': {
2 ✔
34
      get: {
2 ✔
35
        summary: 'Python Version from PEP 621 TOML',
2 ✔
36
        description,
2 ✔
37
        parameters: queryParams({
2 ✔
38
          name: 'tomlFilePath',
2 ✔
39
          example:
2 ✔
40
            'https://raw.githubusercontent.com/numpy/numpy/main/pyproject.toml',
2 ✔
41
          required: true,
2 ✔
42
        }),
2 ✔
43
      },
2 ✔
44
    },
2 ✔
45
  }
2 ✔
46

2 ✔
47
  static defaultBadgeData = { label: 'python' }
2 ✔
48

2 ✔
49
  static render({ requiresPythonString }) {
2 ✔
50
    // we only show requries-python as is
×
51
    // for more info read the following issues:
×
52
    // https://github.com/badges/shields/issues/9410
×
53
    // https://github.com/badges/shields/issues/5551
×
54
    return {
×
55
      message: requiresPythonString,
×
56
      color: 'blue',
×
57
    }
×
58
  }
×
59

2 ✔
60
  async handle(namedParams, { tomlFilePath }) {
2 ✔
61
    const tomlData = await this._requestToml({ url: tomlFilePath, schema })
×
62
    const requiresPythonString = tomlData.project['requires-python']
×
63

×
64
    return this.constructor.render({ requiresPythonString })
×
65
  }
×
66
}
2 ✔
67

2 ✔
68
export { PythonVersionFromToml }
2 ✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc