Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDESK-7462] - Events, Planning & History resource, service and REST API #2162

Merged
merged 14 commits into from
Jan 7, 2025

Conversation

BrianMwangi21
Copy link

@BrianMwangi21 BrianMwangi21 commented Dec 17, 2024

Purpose

This PR creates new async events and planning history resources and services and exposes their rest API by :

  • Implementing a base history service async resource service class
  • Implementing Event History resource model, resource config and service
  • Implementing Planning History resource model, resource config and service
  • Registering these new resources with the Planning module

Solves: SDESK-7462

Copy link
Collaborator

@MarkLark86 MarkLark86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would also be good if you can add types to function signatures, which enables type checking by mypy and autocomplete/error checking from within IDs

server/planning/types/event_history.py Outdated Show resolved Hide resolved
server/planning/history_async_service.py Outdated Show resolved Hide resolved
server/planning/history_async_service.py Outdated Show resolved Hide resolved
server/planning/events/module.py Show resolved Hide resolved
server/planning/planning/module.py Show resolved Hide resolved
server/planning/planning/planning_history_async_service.py Outdated Show resolved Hide resolved
server/planning/types/planning_history.py Outdated Show resolved Hide resolved
@MarkLark86
Copy link
Collaborator

Good job @BrianMwangi21 Just a few small things

@MarkLark86
Copy link
Collaborator

There are mypy/type errors, please check those out as well

Copy link
Collaborator

@MarkLark86 MarkLark86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a couple improvements to the types. Please check wherever you're using just Any and replace with dict[str, Any], so type checking/IDE knows the type of the variable

server/planning/events/events_history_async_service.py Outdated Show resolved Hide resolved
server/planning/history_async_service.py Outdated Show resolved Hide resolved
@BrianMwangi21 BrianMwangi21 added this to the 3.0 milestone Dec 23, 2024
Copy link

@eos87 eos87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few minor comments.

server/planning/events/events_history_async_service.py Outdated Show resolved Hide resolved
server/planning/events/events_service.py Outdated Show resolved Hide resolved
server/planning/history_async_service.py Outdated Show resolved Hide resolved
server/planning/planning/planning_history_async_service.py Outdated Show resolved Hide resolved
server/planning/planning/planning_history_async_service.py Outdated Show resolved Hide resolved
@BrianMwangi21 BrianMwangi21 requested a review from eos87 January 6, 2025 08:17
Copy link
Collaborator

@MarkLark86 MarkLark86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@BrianMwangi21 BrianMwangi21 merged commit a011e9b into superdesk:async Jan 7, 2025
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants