Skip to content

Commit

Permalink
infra: atualização de dados 2023.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tacianosilva committed Nov 9, 2023
1 parent 242b7ca commit 15d0d88
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions dados/baixar_dados.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,16 @@ def download_turmas():
urllib.request.urlretrieve(url, file_name)
print('.................')

print("Download do CSV das Turmas 2023.2 do CERES/UFRN ...!")
file_name = "csv/turmas-2023.2.csv"
if os.path.exists(file_name):
print("Arquivo " + file_name + " já existe!")
else:
url = 'https://dados.ufrn.br/dataset/1938623d-fb07-41a4-a55a-1691f7c3b8b5/resource/d7bf085a-40f2-4733-8780' \
'-7fcad14f75d6/download/turmas-2023.2.csv'
urllib.request.urlretrieve(url, file_name)
print('.................')

def download_docentes():
print("Download do CSV dos Docentes do CERES/UFRN ...!")
file_name = "csv/docentes.csv"
Expand Down Expand Up @@ -271,6 +281,10 @@ def download_discentes():
'-0e494cb95866/download/discentes-2022.csv'
download_discentes_semestre(url, 'csv/discentes-2022.csv')

url = 'https://dados.ufrn.br/dataset/554c2d41-cfce-4278-93c6-eb9aa49c5d16/resource/7c88d1ec-3e83-41b3-9487' \
'-c5402fb82c6e/download/discentes-2023.csv'
download_discentes_semestre(url, 'csv/discentes-2023.csv')

def download_discentes_semestre(url, discentes_csv):
file_name = discentes_csv
if os.path.exists(file_name):
Expand Down
2 changes: 1 addition & 1 deletion dados/povoar.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def organizacao():


def criar_turmas():
print("\nCriando Turmas 2019.1, 2019.2 e 2020.1 para os Cursos do CERES ...!")
print("\nCriando Turmas para os Cursos do CERES ...!")
carregar_turmas()


Expand Down
2 changes: 2 additions & 0 deletions dados/povoar_turma.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def carregar_turmas():
carregar_turmas_semestre('csv/turmas-2021.1.csv')
carregar_turmas_semestre('csv/turmas-2021.2.csv')
carregar_turmas_semestre('csv/turmas-2022.1.csv')
carregar_turmas_semestre('csv/turmas-2023.1.csv')
carregar_turmas_semestre('csv/turmas-2023.2.csv')


def carregar_turmas_semestre(turmas_csv):
Expand Down

0 comments on commit 15d0d88

Please sign in to comment.