Skip to content

Commit

Permalink
Add new rqt_topic models, with tests
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Flynn <[email protected]>
  • Loading branch information
evan-flynn-apexai committed Mar 25, 2024
1 parent fac63a8 commit de5727f
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 472 deletions.
6 changes: 3 additions & 3 deletions rqt_topic/models/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import List

from python_qt_binding.QtGui import QColor
from pydantic import BaseModel, ConfigDict, field_validator
from pydantic import BaseModel, ConfigDict, validator
import re

TOPIC_RE = re.compile(r'^(\/([a-zA-Z0-9_]+))+$')
Expand All @@ -25,12 +25,12 @@ def __str__(self):
return ""
return str(self.content)

@field_validator('topic')
@validator('topic')
def validate_topic(cls, value):
assert TOPIC_RE.match(value) is not None, f'Given topic is not valid: {value}'
return value

@field_validator('timestamp')
@validator('timestamp')
def validate_timestamp(cls, value):
return value

Expand Down
Empty file removed src/rqt_topic/buttons/__init__.py
Empty file.
15 changes: 0 additions & 15 deletions src/rqt_topic/buttons/clear.py

This file was deleted.

36 changes: 0 additions & 36 deletions src/rqt_topic/buttons/hide_timestamps.py

This file was deleted.

11 changes: 0 additions & 11 deletions src/rqt_topic/buttons/resize_columns.py

This file was deleted.

34 changes: 0 additions & 34 deletions src/rqt_topic/buttons/toggle_highlight.py

This file was deleted.

42 changes: 0 additions & 42 deletions src/rqt_topic/buttons/toggle_pause.py

This file was deleted.

Empty file removed src/rqt_topic/views/__init__.py
Empty file.
25 changes: 0 additions & 25 deletions src/rqt_topic/views/message_detail.py

This file was deleted.

49 changes: 0 additions & 49 deletions src/rqt_topic/views/message_list.py

This file was deleted.

41 changes: 0 additions & 41 deletions src/rqt_topic/views/topic_list.py

This file was deleted.

Empty file removed src/rqt_topic/workers/__init__.py
Empty file.
Loading

0 comments on commit de5727f

Please sign in to comment.