Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
adega
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
64
Issues
64
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
adega
adega
Commits
5adecfd9
Commit
5adecfd9
authored
Feb 12, 2019
by
Bruno Meyer
😢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#161
: Fix bug on degree avarage graduation time analysis
parent
1c239147
Pipeline
#19381
passed with stage
in 1 minute and 54 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
7 deletions
+18
-7
.gitignore
.gitignore
+3
-0
src/degree/views.py
src/degree/views.py
+2
-1
src/submission/analysis/analysis/degree_analysis.py
src/submission/analysis/analysis/degree_analysis.py
+12
-2
src/submission/analysis/base/dataframe_base.py
src/submission/analysis/base/dataframe_base.py
+1
-1
src/submission/analysis/main.py
src/submission/analysis/main.py
+0
-3
No files found.
.gitignore
View file @
5adecfd9
*/.vscode/
.vscode/
# info de contas criadas no sistema
login_info
# base de dados
...
...
src/degree/views.py
View file @
5adecfd9
...
...
@@ -13,11 +13,12 @@ def index(request, submission_id):
submission_id
=
int
(
submission_id
)
submission
=
Submission
.
objects
.
get
(
id
=
submission_id
)
degree
=
submission
.
degree
if
not
(
degree
in
request
.
user
.
educator
.
degree
.
all
()):
return
redirect
(
"
adega:
dashboard"
)
return
redirect
(
"dashboard"
)
degree_data
=
get_degree_information
(
request
.
session
,
degree
,
submission_id
=
submission_id
)
return
render
(
request
,
"degree/index.html"
,{
...
...
src/submission/analysis/analysis/degree_analysis.py
View file @
5adecfd9
...
...
@@ -88,14 +88,24 @@ def average_graduation_time(df):
total_graduate
=
graduates
.
shape
[
0
]
average_time
=
0
year_end
=
int
(
df
[
'ANO'
].
max
())
semester_end
=
graduates
[
'PERIODO'
].
max
()
for
index
,
row
in
graduates
.
iterrows
():
if
pd
.
notnull
(
row
[
'ANO_EVASAO'
]):
year_end
=
int
(
row
[
'ANO_EVASAO'
])
try
:
semester_end
=
int
(
row
[
'SEMESTRE_EVASAO'
])
except
ValueError
:
semester_end
=
graduates
[
'PERIODO'
].
max
()
try
:
evasion_dt
=
int
(
row
[
"DT_EVASAO"
].
split
(
"/"
)[
1
])
if
(
evasion_dt
>
7
):
semester_end
=
2
else
:
semester_end
=
1
except
ValueError
:
# TODO: Some students will be not considered
# The interface must inform the user this information
# and how many students wasnt considered
continue
year
=
int
(
row
[
'ANO_INGRESSO'
])
semester
=
int
(
row
[
'SEMESTRE_INGRESSO'
])
difference
=
2
*
(
year_end
-
year
)
+
(
semester_end
-
semester
)
+
1
...
...
src/submission/analysis/base/dataframe_base.py
View file @
5adecfd9
...
...
@@ -80,7 +80,7 @@ def clean_history(df):
df
.
drop
(
drop_columns
,
axis
=
1
,
inplace
=
True
)
df
[
'PERIODO'
]
=
df
[
'PERIODO'
].
str
.
split
(
'o'
).
str
[
0
]
#
df['PERIODO'] = df['PERIODO'].str.split('o').str[0]
def
clean_register
(
df
):
...
...
src/submission/analysis/main.py
View file @
5adecfd9
...
...
@@ -6,9 +6,6 @@ from datetime import timedelta
def
analyze
(
submission
,
debug
=
True
):
print
(
submission
.
path
())
start_time
=
time
.
clock
()
start_time_exec
=
time
.
time
()
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment