Rules
Single Rule Logic¶
DeprecatedRule ¶
A specific rule that checks if the package is deprecated.
Source code in searchv2/rules.py
Config ¶
Config class for ScoreRule. Enables validation on assignment.
Source code in searchv2/rules.py
DescriptionRule ¶
A specific rule that checks if the package has a description.
Source code in searchv2/rules.py
Config ¶
Config class for ScoreRule. Enables validation on assignment.
Source code in searchv2/rules.py
DownloadsRule ¶
A specific rule that scores based on the number of PyPi downloads.
Source code in searchv2/rules.py
Config ¶
Config class for ScoreRule. Enables validation on assignment.
Source code in searchv2/rules.py
ForkRule ¶
A specific rule that scores based on the number of repository forks.
Source code in searchv2/rules.py
Config ¶
Config class for ScoreRule. Enables validation on assignment.
Source code in searchv2/rules.py
UsageCountRule ¶
A specific rule that scores based on the usage count of the package.
Source code in searchv2/rules.py
Config ¶
Config class for ScoreRule. Enables validation on assignment.
Source code in searchv2/rules.py
WatchersRule ¶
A specific rule that scores based on the number of watchers of the package's repository.
Source code in searchv2/rules.py
Config ¶
Config class for ScoreRule. Enables validation on assignment.
Source code in searchv2/rules.py
Group Rule Logic¶
ScoreRuleGroup ¶
A group of rules, which checks a package by applying each rule in the group, and returns a normalized total score and a combined message from all checks.
Attributes:
Name | Type | Description |
---|---|---|
rules |
list[ScoreRule]
|
A list of ScoreRule objects in this group. |
Methods:
Name | Description |
---|---|
check |
Checks the given package against each scoring rule in this group, and returns a CheckResult instance with the normalized total score and a combined message. |
Source code in searchv2/rules.py
Config ¶
Config class for ScoreRule. Enables validation on assignment.