-
-
Notifications
You must be signed in to change notification settings - Fork 9
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/bben 144 creating test models #246
Conversation
…g entities,labels or intents
Pull Request Test Coverage Report for Build 1274
💛 - Coveralls |
from bothub.api.v1.fields import LabelValueField | ||
|
||
from bothub.api.v1.validators import CanContributeInRepositoryValidator | ||
from bothub.api.v1.validators import EntityNotEqualLabelValidator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A API V1 em algum momento será obsoleta/descontinuada, ficando a V2 como padrão, então não faz sentido utilizar na V2 metodos, classes ou demais coisas vinda da V1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qual seria a melhor abordagem? Copiar essas implementações para a V2 ?
return obj.entity.label.value | ||
|
||
|
||
class NewRepositoryValidationEntitySerializer(serializers.ModelSerializer): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No meu ponto de vista não é necessário ter um serializer apenas para "create" sendo que para "retrieve" tem outro que no fim é referente ao mesmo model "RepositoryValidationEntity"
)}) | ||
|
||
|
||
class RepositoryValidationWithIntentOrEntityValidator(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renomear essa classe para algo mais curto e legivel, não utilizar "or".
bothub/api/v2/validation/views.py
Outdated
from .filters import ValidationFilter | ||
|
||
|
||
class NewValidationViewSet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essa ação de "NewValidation" não é necessária e pode está junto com a "ListValidationViewSet" e seu respectivo mixins.
migrations.DeleteModel( | ||
name='RepositoryTranslatedValidationEntity', | ||
), | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Como é uma feature nova não tem logica mandar 5, 6 migrations fazendo criação, alteração, remoção de campos... remove esses arquivos e gera um novo já com a representação final dos modelos.
…nto feature/BBEN-144-creating-test-models
This PR refers to the following issues described at JIRA:
In summary, these modifications create a separated model for handling the Test functionality that is being built. Within this implementation, we also consider that the model for Test, must not create new
intents
,entities
, andlabels
without considering the existing ones.