Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
dashboards
Commits
c94185424ab0
Commit
e2bbc4dc
authored
Sep 02, 2020
by
Laurent Peuch
Browse files
refactor(qa): extract special case logic
parent
32057c1fe53f
Changes
1
Hide whitespace changes
Inline
Side-by-side
qa_dashboard.py
View file @
c9418542
...
...
@@ -21,6 +21,11 @@ for number, cube in enumerate(all_cubes):
# safety
# deprecation warnings ?
if
cube
.
name
.
startswith
(
"cubicweb-"
):
cube_normalized_name
=
cube
.
name
.
split
(
"-"
,
1
)[
1
].
replace
(
"-"
,
"_"
)
else
:
cube_normalized_name
=
cube
.
name
.
replace
(
"-"
,
"_"
)
try
:
cube_files
=
{
x
[
"name"
]
for
x
in
cube
.
repository_tree
()}
except
(
gitlab
.
GitlabHttpError
,
gitlab
.
GitlabGetError
):
...
...
@@ -32,10 +37,7 @@ for number, cube in enumerate(all_cubes):
has_readme_rst
=
bool
({
"README.rst"
,
"README.md"
}
&
cube_files
)
# set intersection
has_doc
=
bool
({
"doc"
,
"docs"
}
&
cube_files
)
# set intersection
if
cube
.
name
.
startswith
(
"cubicweb-"
):
has_readthedocs
=
requests
.
get
(
f
"https://
{
cube
.
name
}
.readthedocs.io"
).
status_code
==
200
else
:
has_readthedocs
=
requests
.
get
(
f
"https://cubicweb-
{
cube
.
name
}
.readthedocs.io"
).
status_code
==
200
has_readthedocs
=
requests
.
get
(
f
"https://cubicweb-
{
cube_normalized_name
}
.readthedocs.io"
).
status_code
==
200
if
has_tox
:
tox_content
=
cube
.
files
.
get
(
"tox.ini"
,
ref
=
"branch/default"
).
decode
().
decode
(
"Utf-8"
)
...
...
Write
Preview
Supports
Markdown
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