64.7 MB
2,756 files
Updated 6 minutes ago
Name
Size
README.md862 Bytes
xet
__init__.py29 Bytes
xet
archived.py718 Bytes
xet
base.py1.52 kB
xet
brands.py1.04 kB
xet
description.py734 Bytes
xet
hacsjson.py1.45 kB
xet
images.py1.13 kB
xet
information.py958 Bytes
xet
integration_manifest.py1.38 kB
xet
issues.py743 Bytes
xet
manager.py2.77 kB
xet
topics.py730 Bytes
xet
README.md

Repository validation

This is where the validation rules that run against the various repository categories live.

Structure

  • There is one file pr. rule.
  • All rule needs tests to verify every possible outcome for the rule.
  • It's better with multiple files than a big rule.
  • All rules uses ActionValidationBase as the base class.
  • Only use validate or async_validate methods to define validation rules.
  • If a rule should fail, raise ValidationException with the failure message.

Example

from .base import (
    ActionValidationBase,
    ValidationBase,
    ValidationException,
)

class SuperAwesomeRepository(ActionValidationBase):
    category = "integration"

    async def async_validate(self):
        if self.repository != "super-awesome":
            raise ValidationException("The repository is not super-awesome")
Total size
64.7 MB
Files
2,756
Last updated
Jul 31
Pre-warmed CDN
US EU US EU

Contributors