Skip to content

feat: add match as a subclass of event#148

Open
Olen wants to merge 8 commits into
elliot-100:mainfrom
Olen:matches
Open

feat: add match as a subclass of event#148
Olen wants to merge 8 commits into
elliot-100:mainfrom
Olen:matches

Conversation

@Olen

@Olen Olen commented Oct 29, 2024

Copy link
Copy Markdown

Should fix Olen/Spond#112

Not tested, just getting it out of the way for now

@elliot-100 elliot-100 linked an issue Dec 27, 2024 that may be closed by this pull request
@elliot-100

Copy link
Copy Markdown
Owner

Thanks @Olen.

I have added tests based on your example in Olen/Spond#112.

I think the output from Match.__str__ could perhaps be improved. At the moment it is very similar to an Event, e.g:
Match(uid='M1', heading='Match One', start_time: 2021-07-06 06:00:00+00:00, …)

I would think match_info.opponent_name and maybe match_info.team_name and match_info.type should be in there.

But I don't know what heading looks like for a real match.

@Bart274

Bart274 commented Dec 28, 2024

Copy link
Copy Markdown

Looks good

@elliot-100

Copy link
Copy Markdown
Owner

@Olen or @Bart274 do you know if any of these fields aren't always present? e.g. scores for a future match.

If so they should be optional on Match creation.

@elliot-100

Copy link
Copy Markdown
Owner

I've tested with a minimal future match and works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: add support for matches Add support for matches

3 participants