pycontw / pycon.tw

PyCon TW Proposal System & Backend Server
https://tw.pycon.org/prs
MIT License
94 stars 107 forks source link

Refactoring model options from models.py (issue#1119) #1131

Closed Ritabear closed 1 year ago

Ritabear commented 1 year ago

Types of changes

Thanks for sending a pull request! Please fill in the following content to let us know better about this change.
Please put an x in the box that applies

Description

Describe what the change is
You don't need to explain HOW you change the code. Your code, including comments in the code should explicitly
self-describe enough about how you change the code.

  1. rename migrations(del willing_to)
  2. rename some columns, having the string "willing_to"
  3. add choices.py
  4. move the string from core/models.py to core/choices.py ( the string = CATEGORY_CHOICES)
  5. For i18n, I make the commend makemessages.

Steps to Test This Pull Request

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.
Refacting the file.

Related Issue

If applicable, refernce to the issue related to this pull request.
#1119

More Information

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here. You may also want to refer
to [how to wirte the perfect pull request](https://github.blog/2015-01-21-how-to-write-the-perfect-pull-request/)

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.24 :tada:

Comparison is base (b99a224) 69.49% compared to head (3be480d) 69.74%.

:mega: 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 ```diff @@ Coverage Diff @@ ## master #1131 +/- ## ========================================== + Coverage 69.49% 69.74% +0.24% ========================================== Files 82 85 +3 Lines 3357 3378 +21 ========================================== + Hits 2333 2356 +23 + Misses 1024 1022 -2 ``` | [Impacted Files](https://codecov.io/gh/pycontw/pycon.tw/pull/1131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw) | Coverage Δ | | |---|---|---| | [src/proposals/forms/mixins.py](https://codecov.io/gh/pycontw/pycon.tw/pull/1131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL3Byb3Bvc2Fscy9mb3Jtcy9taXhpbnMucHk=) | `100.00% <ø> (ø)` | | | [src/proposals/forms/proposals.py](https://codecov.io/gh/pycontw/pycon.tw/pull/1131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL3Byb3Bvc2Fscy9mb3Jtcy9wcm9wb3NhbHMucHk=) | `100.00% <ø> (ø)` | | | [src/pycontw2016/urls.py](https://codecov.io/gh/pycontw/pycon.tw/pull/1131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL3B5Y29udHcyMDE2L3VybHMucHk=) | `85.71% <ø> (ø)` | | | [src/core/choices.py](https://codecov.io/gh/pycontw/pycon.tw/pull/1131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL2NvcmUvY2hvaWNlcy5weQ==) | `100.00% <100.00%> (ø)` | | | [src/core/models.py](https://codecov.io/gh/pycontw/pycon.tw/pull/1131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL2NvcmUvbW9kZWxzLnB5) | `95.71% <100.00%> (-0.44%)` | :arrow_down: | | [src/proposals/api/urls.py](https://codecov.io/gh/pycontw/pycon.tw/pull/1131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL3Byb3Bvc2Fscy9hcGkvdXJscy5weQ==) | `100.00% <100.00%> (ø)` | | | [src/proposals/api/views.py](https://codecov.io/gh/pycontw/pycon.tw/pull/1131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL3Byb3Bvc2Fscy9hcGkvdmlld3MucHk=) | `100.00% <100.00%> (ø)` | | | [src/reviews/models.py](https://codecov.io/gh/pycontw/pycon.tw/pull/1131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL3Jldmlld3MvbW9kZWxzLnB5) | `86.66% <0.00%> (+2.66%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw)

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

josix commented 1 year ago

LGTM! Thanks @Ritabear and @mattwang44 for working on this!