Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
34118d47
Commit
34118d47
authored
9 years ago
by
Peterson, Peter
Browse files
Options
Downloads
Patches
Plain Diff
Re #13987. Fixing indentation.
parent
49eaa3ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/scripts/FindIncompleteAlgRSTPages.py
+23
-24
23 additions, 24 deletions
tools/scripts/FindIncompleteAlgRSTPages.py
with
23 additions
and
24 deletions
tools/scripts/FindIncompleteAlgRSTPages.py
+
23
−
24
View file @
34118d47
...
...
@@ -2,25 +2,25 @@ import os, re
import
urllib2
def
readWebPage
(
url
):
proxy
=
urllib2
.
ProxyHandler
({
'
http
'
:
'
wwwcache.rl.ac.uk:8080
'
})
opener
=
urllib2
.
build_opener
(
proxy
)
urllib2
.
install_opener
(
opener
)
aResp
=
urllib2
.
urlopen
(
url
)
web_pg
=
aResp
.
read
();
return
web_pg
proxy
=
urllib2
.
ProxyHandler
({
'
http
'
:
'
wwwcache.rl.ac.uk:8080
'
})
opener
=
urllib2
.
build_opener
(
proxy
)
urllib2
.
install_opener
(
opener
)
aResp
=
urllib2
.
urlopen
(
url
)
web_pg
=
aResp
.
read
();
return
web_pg
def
ticketExists
(
alg
,
ticketHash
):
retVal
=
""
algPattern
=
re
.
compile
(
alg
,
re
.
IGNORECASE
)
for
ticket
in
ticketHash
:
ticketText
=
ticketHash
[
ticket
]
if
algPattern
.
search
(
ticketText
):
retVal
=
str
(
ticket
)
break
return
retVal
retVal
=
""
algPattern
=
re
.
compile
(
alg
,
re
.
IGNORECASE
)
for
ticket
in
ticketHash
:
ticketText
=
ticketHash
[
ticket
]
if
algPattern
.
search
(
ticketText
):
retVal
=
str
(
ticket
)
break
return
retVal
def
outputError
(
alg
,
algVersion
,
description
,
notes
=
""
):
print
"
%s, %i, %s, %s
"
%
(
alg
,
algVersion
,
description
,
notes
)
print
"
%s, %i, %s, %s
"
%
(
alg
,
algVersion
,
description
,
notes
)
rstdir
=
r
"
C:\Mantid\Code\Mantid\docs\source\algorithms
"
ticketList
=
[
9582
,
9586
,
9607
,
9610
,
9704
,
9804
,
9726
]
...
...
@@ -39,13 +39,12 @@ for alg in algs:
fileFound
=
False
filename
=
os
.
path
.
join
(
rstdir
,
alg
+
"
-v
"
+
str
(
algVersion
)
+
"
.rst
"
)
if
os
.
path
.
exists
(
filename
):
with
open
(
filename
,
"
r
"
)
as
algRst
:
fileFound
=
True
algText
=
algRst
.
read
()
if
(
usagePattern
.
search
(
algText
)
==
None
)
and
(
excusesPattern
.
search
(
algText
)
==
None
):
#check if already in a ticket
usageTicket
=
ticketExists
(
alg
,
ticketHash
)
outputError
(
alg
,
algVersion
,
"
No usage section
"
,
usageTicket
)
with
open
(
filename
,
"
r
"
)
as
algRst
:
fileFound
=
True
algText
=
algRst
.
read
()
if
(
usagePattern
.
search
(
algText
)
==
None
)
and
(
excusesPattern
.
search
(
algText
)
==
None
):
#check if already in a ticket
usageTicket
=
ticketExists
(
alg
,
ticketHash
)
outputError
(
alg
,
algVersion
,
"
No usage section
"
,
usageTicket
)
if
fileFound
==
False
:
outputError
(
alg
,
algVersion
,
"
File not found
"
)
outputError
(
alg
,
algVersion
,
"
File not found
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment