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

Feature/count service unit by division #294

Merged
merged 5 commits into from
Aug 4, 2023

Conversation

juuso-j
Copy link

@juuso-j juuso-j commented Jul 19, 2023

Count service units by division

Allow unit counting by service and division.

Enable extra output with GET-parameter: "include= unit_count_per_division"
Add divisions with: GET-parameter: "division=<division_id>"

Example query: http://127.0.0.1:8000/api/v2/service/?include=unit_count_per_division,fds&division=ocd-division/country:fi/kunta:raisio

Trello #438


Breakdown:

Files changed

  1. services/api.py
    • Count service units by division
  2. specification.swagger.yaml
    • Add include and division params to /service endpoint

@juuso-j juuso-j added the enhancement New feature or request label Jul 19, 2023
@juuso-j juuso-j requested a review from ezkat July 19, 2023 09:48
@juuso-j juuso-j self-assigned this Jul 19, 2023
@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Patch coverage: 30.30% and project coverage change: -0.02 ⚠️

Comparison is base (5aebd57) 66.76% compared to head (3f8a7bc) 66.75%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #294      +/-   ##
===========================================
- Coverage    66.76%   66.75%   -0.02%     
===========================================
  Files          221      221              
  Lines        12899    12915      +16     
  Branches      1654     1657       +3     
===========================================
+ Hits          8612     8621       +9     
- Misses        3911     3917       +6     
- Partials       376      377       +1     
Impacted Files Coverage Δ
services/api.py 53.00% <30.30%> (+0.06%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@juuso-j juuso-j merged commit 3c7bb97 into develop Aug 4, 2023
7 checks passed
@juuso-j juuso-j mentioned this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants