Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mason-today-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
SRCT
mason-today-web
Commits
6a72b33e
Commit
6a72b33e
authored
May 19, 2018
by
Landon DeCoito
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Quality' into 'master'
Adding simple quality test for events See merge request
!31
parents
ef0a3684
9820c6a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
.gitignore
.gitignore
+3
-1
mason-today/parscript.py
mason-today/parscript.py
+21
-3
No files found.
.gitignore
View file @
6a72b33e
...
...
@@ -101,4 +101,6 @@ venv.bak/
/site
# mypy
.mypy_cache/
\ No newline at end of file
.mypy_cache/
./masontoday
mason-today/parscript.py
View file @
6a72b33e
...
...
@@ -26,7 +26,24 @@ def cleanup(dirtystring):
dirtystring
=
dirtystring
.
replace
(
replacement
[
0
],
replacement
[
1
])
return
dirtystring
[:
-
1
]
# Simple event quality test
def
qualityTest
(
desc
):
# none, bad, okay, good
length
=
len
(
desc
)
if
desc
==
"Not Provided"
:
return
"none"
elif
length
<
10
:
return
"bad"
elif
length
<
40
:
return
"okay"
elif
length
<
80
:
return
"good"
elif
length
<
100
:
return
"verygood"
else
:
return
"excellent"
# convertTime accepts strings in the form of ""
def
convertTime
(
stri
):
# this function is used for splicing the event times.
...
...
@@ -251,9 +268,10 @@ def load_data():
print description
print "----------------------------------------------------------------------------"
'''
if
(
error
==
[]):
dictlist
.
append
({
"id"
:
uniqueid
,
"title"
:
entry_title
,
"dayofweek"
:
day
,
"dayofmonth"
:
monthday
,
"month"
:
month
,
"year"
:
year
,
"timestart"
:
timestart
,
"timestop"
:
timestop
,
"location"
:
location
,
"description"
:
description
})
quality
=
qualityTest
(
description
)
dictlist
.
append
({
"id"
:
uniqueid
,
"quality"
:
quality
,
"title"
:
entry_title
,
"dayofweek"
:
day
,
"dayofmonth"
:
monthday
,
"month"
:
month
,
"year"
:
year
,
"timestart"
:
timestart
,
"timestop"
:
timestop
,
"location"
:
location
,
"description"
:
description
})
else
:
dictlist
.
append
({
"id"
:
uniqueid
,
"error"
:
error
})
return
dictlist
...
...
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