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

refactor: organize utils #168

Merged
merged 2 commits into from
Jul 24, 2022
Merged

refactor: organize utils #168

merged 2 commits into from
Jul 24, 2022

Conversation

lin594
Copy link
Member

@lin594 lin594 commented Jul 24, 2022

as an example for #165

@lin594 lin594 requested a review from charlie0129 July 24, 2022 17:38
@charlie0129 charlie0129 merged commit 2face99 into e-dialect:develop Jul 24, 2022
lin594 pushed a commit that referenced this pull request Nov 6, 2022
* refactor:create dto music_all (#132)

* refactor:create dto music_all

* refactor:create dto music_all

* ci: fix lint

* test: add test for one music

* test: beautify test config

* test: fix test music

* feat: add MC0105

PUT /music/<int:id>/visibility

* ci: use black instead of pylint

[skip ci]

* style: reformat with black

* chore: update .gitignore

* docs: add LICENSE

[skip ci]

* refactor: create dto character_normal

* refactor: create dto character_all

* style: make some notes in views.py and urls.py

make it easy to find apis

* refactor: make music_normal dto model

this dto model can be used in MC0202 api

* fix: delete "import imp" in views.py

I dont know how it is in the scripts, but it do

* refactor: add dto music_normal (#141)

* style: make some notes in views.py and urls.py

make it easy to find apis

* refactor: make music_normal dto model

this dto model can be used in MC0202 api

* fix: delete "import imp" in views.py

I dont know how it is in the scripts, but it do

Co-authored-by: lll123github <[email protected]>

* fix: update default avatar

* refactor:create dto

create dto
article_all,
article_normal,
comment_normal

* style: make some notes in HinghwaDict/urls.py and word/word.py

make it easy to find apis about word

* refactor: build word2pronunciation.py

move the function word2pronunciation into word2pronunciation.py

* refactor: create dto word_all

create word_all.py and delete function word2pronunciation from the word.py completely, meanwhile import word2pronunciation.py in word.py

* rafactor: create dto word_normal

create dto word_normal in word_normal.py. this model is not used

* refactor: create dto word_quick

this model can be used in WD0201, word.py is modified, too

* refactor: create dto word_simple

create word_simple.py, which has not been used

* style: style urls.py in HinghwaDict

style urls.py in HinghwaDict

* fix: delete "import imp" in views.py

I dont know how it is in the scripts, but it do

* fix: delete import response and Docs (blacked)

we should catch sight on how they appeared

* fix: return response in word_normal and word_simple

linzichuan is not a qualified programer

* fix: delete import User in word_simple.py

delete import User in word_simple.py, which is nothing to explain

* refactor: use word_simple in WD0202

modify woed.py and note in word_simple.py

* fix: delete import Pronunciation from .models

in word.py, which is not used

* refactor: create dto

create dto
pronunciation_normal
pronunciation_all
pronunciation_simple already exists,and this model is not used

* build: change dto used in WD0201 from word_quick to word_all

word_quick will be changed to application_content which will be used with data type Application. the reference will be noted in word_all.py

* style: note in models.py

explain the relation between word and application

* refactor: delete word_quick and make a dto named application_simple

dto application_simple_content is used in application_simple's content

* refactor: make a dto named application_all

application_all_content is used in application_all's content

* fix: return response in application_all.py

return response in application_all.py

* ci: add test word-creation (#161)

* ci: add word-creation

* test: rename some tests

* fix: fix error filed name

* docs: add TESTING.md (#162)

* docs: rename TESTING.md

* docs: update TESTING.md (#164)

* refactor: refactor directories in module word  (#166)

* refactor: create word.character

* refactor: create word.pronunciation

* fix: fix response error

* refactor: create word.word and word.application

* refactor: move translate.py

* fix: fix calling error

* refactor: move word2pronunciation.py

* style: beautify with black

* refactor: refactor MultiApplication (#167)

* feat: add ExceptionMiddleware

* feat: add InvalidTokenException

* fix: import ExceptionMiddleware

* fix: fix CommonException

* fix: fix ExceptionMiddleware

* feat: add token checking

* refactor: adjust output logs

* refactor: refactor MultiApplication

/words/applications

* style: beautify with black

* refactor: organize utils (#168)

* refactor: rename islist

* refactor: move TokenChecking

* test: add new testing for word-creation (#169)

* test: add new testing for word-creation

* test: fix test script

* fix: fix error response

* Update word-creation.json

* Update word-creation.json

* feat: add quiz module (#160)

* feat: add quiz modular

* fix: fix formatting problems

* test: add the test of apifox

* fix: add urls.py

* fix:fix quiz.json

* fix : fix the problem of urls.py

* Update apps.py

* update urls.py、views.py and quiz.json

* Update quiz.json

* fix: the problem of url

* 试一下ci

* 试一下ci

* fix: fix the problems of test

* fix: quiz.json format

* fix: add for migrations

* 加错路径了 尴尬

* Create __init__.py

* fix: optimize code structure

* fix: fix the problem of quiz

* fix: fixed the display problem

Fixed the display problem of background management

Co-authored-by: sheeplin <[email protected]>

* test: add enhancement tests for module quiz (#172)

* ci: add test quiz_401,quiz_404

* fix :fix the format of json

* ci :add test quiz_403

* Update quiz_403.json

* test: update quiz_403.json

* ci: add common user

* ci : update e2e.yml

* ci: add user_test

* ci: fix user_test

Co-authored-by: Charlie Chiang <[email protected]>

* ci: fix single quote

* style: update quiz.json

* style: modify the test folder structure

* Revert "style: modify the test folder structure"

This reverts commit ce38918.

Co-authored-by: sheeplin <[email protected]>
Co-authored-by: Charlie Chiang <[email protected]>

* refactor: refactor music module (#177)

* refactor: refactor music module

* style: fix the problem of test

* fix: fix the token check of MC0105

* style: update the music_403.json

* style: update the music module

* sytle: update the music module

* style: format music_403.json,music_404.json

* feat: check the password valid or not (#173)

* fix: make the length of passwords in wechat program adaptable

make the length of passwords in wechat program adaptable

* feat: add a child exception 400 named InvalidPassword

add a child exception of BadRequestException 400 named InvalidPassword

* feat: create password_validator and class MaximumLengthValidator

create password_validator and class MaximumLengthValidator in password_validation.py

* feat: check the new passwords valid or not

check the new passwords valid or not when retrieving updating or creating passwords

* fix: import user.password_validation

instead of password_validation

* fix: deal with the exception in password_validation

deal with the exception in password_validation

* feat: create UserNotFoundException

in NotFoundException(404)

* style: make a note on updatepassword

make a note on updatepassword

* style: format urls.py

format urls.py

* style: delete "as e" which is not used

when catch error ValidationError

* perf: abolish the exception "WhenUpdatePassword" in WrongPassword

this can be used in normal password  checking

* style: add some explaination on password_validator function

add some explanation on password_validator function

* fix: wrong word: UnauthorizedException

add 'e'

* refactor: new class UpdatePassword

to replace function updatePassword

* refactor: use new class UpdatePassword formally

function updatePassword has been deleted and urls.py has been changed

* style: format views.py with black

format views.py with black

* style:delete some excepting and raising

without any significance

* fix: delete "password" in MaximumLengthValidator(password).validator

delete "password" in MaximumLengthValidator(password).validator

* style: delete "(旧)" in a note

delete "(旧)" in a note

* refactor: arrange code about class UpdatePassword

arrange code about class UpdatePassword

* fix: add "id" in put(self,request)

which is necessary for django

* refactor: simplify code for the limitation of the length of new password

simplify code for the limitation of the length of new password

* fix: add returning CommenException

add returning CommonException

* fix: fix the condition of validating a password

fix the condition of validating a password

* style: move the password_validation to the filter utils and rename it

and delete someting not used in it

* style: black and delete something not used

black and delete something not used in views.py

* ci: update e2e.yml

add a user for test

* style: delete try except in UpdatePassword

which is not useful

* ci: update information about a user for test

update password about a user for test

* test: add two tests

which are about the update-password actions

* style: modify the format of the tests

which are two commited before

* test: try some tests in ci

change the id of the user in tests

* test: try some tests in ci

change the ids of the user in tests

* test: correct the password

which may cause unauthorized occation

* test: try some tests in ci

change the id of the user in tests

* test: try some tests in ci

change the id of the user in tests

* test: try some tests in ci

change the id of the user in tests

* ci: update e2e.yml

update e2e.yml and set the password

Co-authored-by: sheeplin <[email protected]>

* ci: update e2e.yml

add the ids of the users for test

* test: try some tests in ci

change the id of the user in tests

* ci: fix the bug

without checking before

* ci: test somthing

add a space

* test: add the actions after logining

catch tokens

* test: add actions after logining

catch ids

* test: change the order of tests

change the order of tests

* style: style not_found.py

black not_found.py

* test: try some tests in ci

change the id of users and fix the test suite

Co-authored-by: lll123github <[email protected]>
Co-authored-by: sheeplin <[email protected]>
Co-authored-by: sheeplin <[email protected]>

* refactor: refactor article module (#181)

* refactor: refactor article module

* fix: fix the known problems

* refactor: refactor article.json

* Update article.json

* refactor: delete old code and fix known problems

* refactor:delete invalid judgment

* feat: add admin feature of quiz module (#185)

* refactor: refactor article module

* fix: fix the known problems

* refactor: refactor article.json

* Update article.json

* refactor: delete old code and fix known problems

* refactor:delete invalid judgment

* feat: add admin review the quiz

* refactor: format json

Co-authored-by: Norton-Lin <[email protected]>
Co-authored-by: lll123github <[email protected]>
Co-authored-by: 林子川 <[email protected]>
Co-authored-by: Charlie Chiang <[email protected]>
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.

2 participants