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

Issue 19 #22

Merged
merged 3 commits into from
Jul 31, 2019
Merged

Issue 19 #22

merged 3 commits into from
Jul 31, 2019

Conversation

alvarofpp
Copy link
Member

Criado as classes:

  • Env: Classe com os atributos e métodos responsáveis pelo funcionamento correto do pacote.
    • Dataset: Classe responsável pelo download de datasets.
      • Group: Classe responsável pelo download de grupos de datasets.
      • File: Classe responsável pelo download de datasets a partir de um arquivo.

@alvarofpp
Copy link
Member Author

@itepifanio @nymarya @diegodiogenes para facilitar o review de vocês, vou fazer um resumo dos métodos e atributos de cada classe a seguir:

Env

Env(ABC)

# Atributos
self.url_base = 'http://dados.ufrn.br/'
self.url_action = self.url_base + 'api/action/'

# Métodos
def _print_exception(self, ex: Exception):
def _print_list(self, name: str, variable: list):
def _load_list(self, option: str) -> list:
def _make_dir(self, path: str) -> str:
def _request_get(self, url: str) -> requests.Response:

Dataset

Dataset(Env)

# Atributos
self.url_dataset = self.url_base + 'api/rest/dataset/'
self.available_datasets = []

# Métodos
def load_datasets(self):
def list_datasets(self):
def download_dataset(self, name: str, path: str = os.getcwd(), dictionary: bool = True):
def download_datasets(self, datasets: list, path: str = os.getcwd(), dictionary: bool = True):

Group

Group(Dataset)

# Atributos
self.url_group = self.url_base + 'api/rest/group/'
self.available_groups = []

# Métodos
def load_groups(self):
def list_groups(self):
def download_group(self, name: str, path: str = os.getcwd(), dictionary: bool = True):
def download_groups(self, groups: list, path: str = os.getcwd(), dictionary: bool = True):

File

File(Dataset)

# Métodos
def download_from_file(self, filename: str, path: str = os.getcwd(), dictionary: bool = True):

ODUFRNDownloader

ODUFRNDownloader(Group, File)

Copy link
Member

@itepifanio itepifanio left a comment

Choose a reason for hiding this comment

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

Testado 👍

Copy link
Member

@diegodiogenes diegodiogenes left a comment

Choose a reason for hiding this comment

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

Show de bola! 👍

Copy link
Member

@nymarya nymarya left a comment

Choose a reason for hiding this comment

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

Mais 🔝 que o mar

@nymarya nymarya merged commit 8e86ae4 into master Jul 31, 2019
@nymarya nymarya deleted the issue-19 branch July 31, 2019 16:14
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.

None yet

4 participants