teemtee / tmt

Test Management Tool
MIT License
80 stars 121 forks source link

Move the `contact` key to the `Core` class #2472

Closed jscotka closed 9 months ago

jscotka commented 9 months ago

Hi, I've discovered as plans raised me warning about contact is not proper value inside plan, so that I've looked into doc: https://tmt.readthedocs.io/en/stable/spec/tests.html#contact and found that contact is part specification for tests, not allowed in plans.

My perspective is that it should be in Core specification and valid for everything.

idorax commented 9 months ago

Yes, currently property contact is defined in class Test.

And class Core doesn't have attribute contact. It seems simple to fix this issue, I'll file a PR soon.

jscotka commented 9 months ago

Yes, currently property contact is defined in class Test.

* https://github.com/teemtee/tmt/blob/main/tmt/base.py#L1032
  ```python
  1024    @dataclasses.dataclass(repr=False)
  1025    class Test(
  1026            Core,
  1027            tmt.export.Exportable['Test'],
  1028            tmt.lint.Lintable['Test']):
  1029        """ Test object (L1 Metadata) """
  1030    
  1031        # Basic test information
  1032        contact: List[str] = field(
  1033            default_factory=list,
  1034            normalize=tmt.utils.normalize_string_list
  1035            )
  ```

And class Core doesn't have attribute contact. It seems simple to fix this issue, I'll file a PR soon.

Thank you very much. Regards Honza