acheck.checks

acheck.checks.file

class acheck.checks.file.CSVFormatCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Checks whether the given annotation file has a valid csv format

Options:
  • sniffer_size:

    Size parameter for reading the file and determine the csv dialect (e.g. “file_size=4096”)

  • columns:

    Number of columns in the csv file

  • quotechar:

    Quotechar of the csv file

  • delimiter:

    Delimiter char of the csv file

columns = 2
delimiter = ','
quotechar = '|'
run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

sniffer_size = 1024
class acheck.checks.file.CharacterCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Checks if there are any characters that are not allowed

Options:
  • regex_characters:

    The regular expression that matches all allowed characters for the whole annotation

  • regex_time:

    The regular expression that matches all allowed characters plus the punctuation mark period

regex_characters = '[^a-zA-Z0-9,_-]'
regex_time = '[^0-9.-]'
run(annotation_file, domain_file, problem_file, line_limit: int = -1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

class acheck.checks.file.ReadFileCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Checks if there are any issues during reading the file by opening it

run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

acheck.checks.objects

class acheck.checks.objects.ActionCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Check for actions that are not part of the model description

e.g. the action in “hold-manual-both” is hold

run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

class acheck.checks.objects.WorldObjectsCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Check for objects that are not part of the model description

e.g. the objects in “hold-manual-both” are manual and both

run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

acheck.checks.signature

class acheck.checks.signature.SignatureCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Check for the occurring of multiple different signature descriptions for the same action

As a fix you can select one signature as the right one and only all other descriptions will give you an error e.g.

“hold-manual-both” -> hold takes two arguments -> signature of 2 “hold-manual-both-right” -> hold takes three arguments -> signature of 3

If you select a signature of 2 for hold, “hold-manual-both-right” and all different signatures will give you an error.

run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

acheck.checks.spelling

class acheck.checks.spelling.SpellCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Checks whether the given annotation has spelling mistakes

Options:
  • language:

    Supported languages if installed correctly: en_US, en_GB, de_DE

language = 'en_US'
run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

acheck.checks.structure

class acheck.checks.structure.ExpressionStructureCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Checks if the structure of the annotation lines have a given pattern

Options:
  • regex_expressions_structure:

    The regular expression that matches every line of the annotation

regex_expressions_structure = '[a-zA-Z0-9]+(_[a-zA-Z0-9]+)*(-[a-zA-Z0-9]+(_[a-zA-Z-0-9]+)*)*'
run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

class acheck.checks.structure.TimeAscendingCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Checks whether the given annotation has incrementing timestamps

Options:
  • strict:

    Check for real ascending timestamps, otherwise following equal timestamps are allowed

run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

strict = False
class acheck.checks.structure.TimeIsNumberCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Check if the first column of the csv line is a number

run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

acheck.checks.validating

class acheck.checks.validating.PDDLSyntaxCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Checks the model files for pddl syntax errors

Options:
  • timeout:

    Time after which the validator terminates if it does not receive a response

run(annotation: Path, domain: Path, problem: Path, line_limit: int = -1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

timeout = 5
class acheck.checks.validating.PlanValidationCheck(tool_meta: ToolObjectsMeta, group: CheckGroup, displayed_name: str | None = None, active: bool = True, disabled: bool = False, options: Dict[str, str | bool | int | float] | None = None)[source]

Bases: Check

Do a plan validation based on the given annotation

Options:
  • timeout:

    Time after which the validator terminates if it does not receive a response

run(annotation_file, domain_file, problem_file, line_limit=-1) List[Error][source]

Start the check. All checks must inherit from this abstract class and need to implement their own run() method.

Parameters:
  • annotation (Path) – Path of the annotation file

  • problem (Path) – Path of the domain file

  • domain (Path) – Path of the problem file

  • line_limit (int) – Limits the check of the annotation up to a certain line. Defaults to “-1”.

Returns:

A list containing all the errors that were found during the check.

Return type:

List[Error]

timeout = 5