badges / badges/shields

Refactor and unit test Python version from classifier code

Open
#3,048 0 comments 0 reactions 0 assignees View on GitHub
service-badge
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

There are service tests which cover the functionality, however you can't tell what they are doing from looking at the code. See https://github.com/badges/shields/pull/3014#discussion_r for an example that conveys the intent.

All the remaining classifier functionality could be extracted to helper functions, as we've done with with `getLicenses` and `getPackageFormats` in `pypi-helpers.js`.

Contributor guide

Open the contributing guide

Research direction

Review the existing service tests and pypi-helpers.js, then read the linked pull request discussion for an example of the intended test clarity. Done means the remaining classifier functionality is extracted into helper functions and covered by unit tests that make each behavior's intent clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
backend, testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.