Skip to content

WIP: Cria a app dataset e seus modelos para página do conjunto de dados e para os ativos digitais#116

Open
rg3915 wants to merge 5 commits intoscieloorg:mainfrom
rg3915:core-72
Open

WIP: Cria a app dataset e seus modelos para página do conjunto de dados e para os ativos digitais#116
rg3915 wants to merge 5 commits intoscieloorg:mainfrom
rg3915:core-72

Conversation

@rg3915
Copy link
Contributor

@rg3915 rg3915 commented Feb 28, 2023

O que esse PR faz?

Cria a app dataset e seus modelos para página do conjunto de dados e para os ativos digitais.

Onde a revisão poderia começar?

Lendo os commits.

Como este poderia ser testado manualmente?

NA

Algum cenário de contexto que queira dar?

NA

Screenshots

NA

Quais são tickets relevantes?

#72

Referências

NA

@rg3915 rg3915 self-assigned this Feb 28, 2023
Comment on lines +11 to +12
dataset_id = models.PositiveIntegerField(null=True, blank=True)
dataset_id = models.PositiveIntegerField(null=True, blank=True)
Copy link
Member

Choose a reason for hiding this comment

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

@rg3915 duplicado



class Contact(models.Model):
name = models.CharField(max_length=300, unique=True)
Copy link
Member

Choose a reason for hiding this comment

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

@rg3915 por que não TextField?

Comment on lines +128 to +130
if self.citation:
return f'{self.citation}'
return f'{self.url}'
Copy link
Member

Choose a reason for hiding this comment

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

return self.citation or self.url or ''

from core.models import CommonControlField


class Dataset(CommonControlField):
Copy link
Member

@robertatakenaka robertatakenaka Feb 28, 2023

Choose a reason for hiding this comment

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

@rg3915 Não falta o type? Há 3 valores:
Captura de Tela 2023-02-28 às 10 26 07
Analise se cada um destes tipos não seria uma especialização (subclasse), então criar um modelo para cada.

Resultado de busca filtrando por dataverse
https://data.scielo.org/dataverse/scielodata?q=&types=dataverses&sort=dateSort&order=desc&page=1

files
https://data.scielo.org/dataverse/scielodata?q=&types=files&sort=dateSort&order=desc&page=1

datasets
https://data.scielo.org/dataverse/scielodata?q=&types=v&sort=dateSort&order=desc&page=1

Copy link
Member

Choose a reason for hiding this comment

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

identifier_of_dataverse, name_of_dataverse podem ser atributos do modelo Dataverse

#
global_id = models.TextField(null=True, blank=True)
identifier = models.CharField(max_length=15, null=True, blank=True)
identifier_of_dataverse = models.CharField(max_length=15, null=True, blank=True)
Copy link
Member

Choose a reason for hiding this comment

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

identifier_of_dataverse, name_of_dataverse podem ser atributos do modelo Dataverse



class Contact(models.Model):
name = models.CharField(max_length=300, unique=True)
Copy link
Member

Choose a reason for hiding this comment

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

name é foreignkey para Author

Comment on lines +75 to +76
surname = models.CharField(max_length=300, null=True, blank=True)
given_name = models.CharField(max_length=300)
Copy link
Member

Choose a reason for hiding this comment

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

Usar TextField

Comment on lines +17 to +21
file_content_type = models.CharField(max_length=100, null=True, blank=True)
file_id = models.PositiveIntegerField(null=True, blank=True)
file_persistent_id = models.TextField(null=True, blank=True)
file_type = models.CharField(max_length=25, null=True, blank=True)
file_count = models.PositiveIntegerField(null=True, blank=True)
Copy link
Member

Choose a reason for hiding this comment

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

Possivelmente do modelo "file"

Comment on lines +58 to +64
class Checksum(models.Model):
type_field = models.CharField(max_length=20, null=True, blank=True)
value_field = models.CharField(max_length=40, null=True, blank=True)
dataset = models.ForeignKey(Dataset, on_delete=models.CASCADE, null=True)

def __str__(self):
return f'{self.type_field}'
Copy link
Member

Choose a reason for hiding this comment

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

@rg3915 não acho que vamos usar este dado



class Keyword(models.Model):
name = models.CharField(max_length=255, unique=True)
Copy link
Member

Choose a reason for hiding this comment

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

TextField



class Producer(models.Model):
name = models.CharField(max_length=300, unique=True)
Copy link
Member

Choose a reason for hiding this comment

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

TextField

Copy link
Member

@robertatakenaka robertatakenaka left a comment

Choose a reason for hiding this comment

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

Verificar os comentários

@rg3915 rg3915 changed the title Cria a app dataset e seus modelos para página do conjunto de dados e para os ativos digitais WIP: Cria a app dataset e seus modelos para página do conjunto de dados e para os ativos digitais Apr 10, 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.

2 participants