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

feat: add proposals api and view #1128

Conversation

baby230211
Copy link
Contributor

@baby230211 baby230211 commented Mar 6, 2023

Types of changes

  • Bugfix
  • New feature
  • Refactoring
  • Breaking change (any change that would cause existing functionality to not work as expected)
  • Documentation Update
  • Other (please describe)

Description

  • add proposals api url
  • add proposals api view

Steps to Test This Pull Request

Steps to reproduce the behavior:

  1. Go to 'http:https://localhost:8000/api/proposals/'

Expected behavior

response will be

  1. num_proposed
  2. num_stage_1_reviews
  3. num_stage_2_reviews

Related Issue

#1127

@mattwang44
Copy link
Member

mattwang44 commented Mar 6, 2023

  • PR 不直接指到 master branch 嗎?
  • flake8 沒過,記得修一下
  • 要不要試著寫一下 api unit test?

@baby230211 baby230211 force-pushed the 1127-provide-an-endpoint-containing-statistics-info-about-the-proposals branch 3 times, most recently from 2810faf to 96395dd Compare March 6, 2023 16:15
@baby230211 baby230211 changed the base branch from 1127-provide-an-endpoint-containing-statistics-info-about-the-proposals to master March 6, 2023 16:16
src/proposals/api/views.py Outdated Show resolved Hide resolved
src/proposals/api/views.py Outdated Show resolved Hide resolved
@baby230211 baby230211 linked an issue Mar 6, 2023 that may be closed by this pull request
@baby230211 baby230211 force-pushed the 1127-provide-an-endpoint-containing-statistics-info-about-the-proposals branch from 96395dd to 7891117 Compare March 6, 2023 16:21
@baby230211 baby230211 force-pushed the 1127-provide-an-endpoint-containing-statistics-info-about-the-proposals branch from 7891117 to 0d39f03 Compare March 6, 2023 16:38
@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.26 🎉

Comparison is base (aeeaa7b) 69.46% compared to head (c076eb5) 69.72%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1128      +/-   ##
==========================================
+ Coverage   69.46%   69.72%   +0.26%     
==========================================
  Files          82       84       +2     
  Lines        3357     3376      +19     
==========================================
+ Hits         2332     2354      +22     
+ Misses       1025     1022       -3     
Impacted Files Coverage Δ
pycontw2016/urls.py 85.71% <0.00%> (ø)
proposals/api/urls.py 100.00% <0.00%> (ø)
proposals/api/views.py 100.00% <0.00%> (ø)
proposals/management/commands/recent_proposals.py 98.76% <0.00%> (+1.23%) ⬆️
reviews/models.py 86.66% <0.00%> (+2.66%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@baby230211 baby230211 force-pushed the 1127-provide-an-endpoint-containing-statistics-info-about-the-proposals branch from bd70a1e to c076eb5 Compare March 7, 2023 05:08
@josix josix requested a review from mattwang44 March 7, 2023 05:23
@baby230211 baby230211 force-pushed the 1127-provide-an-endpoint-containing-statistics-info-about-the-proposals branch from c076eb5 to f8f3948 Compare March 7, 2023 14:22
Copy link
Member

@mattwang44 mattwang44 left a comment

Choose a reason for hiding this comment

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

Nice work!

@josix josix merged commit 9d82a22 into pycontw:master Mar 8, 2023
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.

Provide an endpoint containing statistics info about the proposals
4 participants