ballet.validation.project_structure.checks module

class ballet.validation.project_structure.checks.IfInitModuleThenIsEmptyCheck(project)[source]

Bases: ballet.validation.project_structure.checks.ProjectStructureCheck

check(diff)[source]

Check that if the new file is __init__.py, then it is empty

class ballet.validation.project_structure.checks.IsAdditionCheck(project)[source]

Bases: ballet.validation.project_structure.checks.ProjectStructureCheck

check(diff)[source]

Check that the diff represents the addition of a new file

class ballet.validation.project_structure.checks.IsPythonSourceCheck(project)[source]

Bases: ballet.validation.project_structure.checks.ProjectStructureCheck

check(diff)[source]

Check that the new file introduced is a python source file

class ballet.validation.project_structure.checks.ModuleNameCheck(project)[source]

Bases: ballet.validation.project_structure.checks.ProjectStructureCheck

check(diff)[source]

Check that the new file introduced has a valid name

The module can either be an __init__.py file or must match feature_[a-zA-Z0-9_]+\.\w+.

class ballet.validation.project_structure.checks.ProjectStructureCheck(project)[source]

Bases: ballet.validation.base.BaseCheck

Base class for implementing new Feature API checks

Parameters

project (Project) – project

class ballet.validation.project_structure.checks.RelativeNameDepthCheck(project)[source]

Bases: ballet.validation.project_structure.checks.ProjectStructureCheck

check(diff)[source]

Check that the new file introduced is at the proper depth

The proper depth is 2 (contrib/user_example/new_file.py)

class ballet.validation.project_structure.checks.SubpackageNameCheck(project)[source]

Bases: ballet.validation.project_structure.checks.ProjectStructureCheck

check(diff)[source]

Check that the name of the subpackage within contrib is valid

The package name must match user_[a-zA-Z0-9_]+.

class ballet.validation.project_structure.checks.WithinContribCheck(project)[source]

Bases: ballet.validation.project_structure.checks.ProjectStructureCheck

check(diff)[source]

Check that the new file is within the contrib subdirectory