Skip to content

What does the --model type parameter check? #94

Description

@yulmijoa
  1. -- model_type
    I confirmed that the model type was added to the check file method.
    It appears to simply check assetadministrationshell, submodel, and conceptdescription, respectively. However, when actually checking with the CLI, there's a significant difference between specifying and not specifying the model type.
  • If not specified, it seems to check for metamodel-related issues,
  • but if specified, it's unclear what the intended check is.
  1. Readme issue
    In main.py, you can't specify a model type for aasx files, but the readme shows that it can be applied to aasx files as an example.

  2. typo
    When specifying a model type, it commonly says "Model typ missing." This seems to be a typo.

<parse.py>

def parse_abstract_object(cls: ClassType, adapter: Adapter, result: AasTestResult):
    try:
        discriminator = adapter.get_model_type()
    except AdapterException as e:
        result.append(AasTestResult(f"{e} @ {adapter.path}", level=Level.ERROR))
        return INVALID
    subclass = None
    for subclass in cls.subclasses:
        if subclass.cls.__name__ == discriminator:
            return parse_concrete_object(subclass, adapter, result)
    result.append(
        AasTestResult(
            f"Invalid model type {discriminator} @ {adapter.path}",
            level=Level.ERROR,
        )
    )
    return INVALID

I tried check file with DigitalNameplate 2.0
Thank you for checking

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions