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
ba0246a4469c
Commit
0f01bfaf
authored
Sep 22, 2020
by
Laurent Peuch
Browse files
fix: deprecation -> deprecated
parent
e739017060e4
Pipeline
#15052
passed with stages
in 5 minutes and 5 seconds
Changes
2
Pipelines
27
Hide whitespace changes
Inline
Side-by-side
qa_dashboard.py
View file @
ba0246a4
...
...
@@ -14,14 +14,14 @@ context = {"cubes": []}
all_cubes
=
[
x
for
x
in
gl
.
projects
.
list
(
all
=
True
)
if
x
.
namespace
[
"name"
]
==
"cubes"
]
PYTEST_CAPTURE_DEPRECAT
ION
WARNINGS_PACKAGE_URI
=
"git+https://github.com/psycojoker/pytest-capture-deprecat
ion
warnings"
PYTEST_CAPTURE_DEPRECAT
ED
WARNINGS_PACKAGE_URI
=
"git+https://github.com/psycojoker/pytest-capture-deprecat
ed
warnings"
for
number
,
cube
in
enumerate
(
all_cubes
):
# python3
# doc8
# a de la doc
# safety
# deprecat
ion
warnings ?
# deprecat
ed
warnings ?
if
cube
.
name
.
startswith
(
"cubicweb-"
):
cube_normalized_name
=
cube
.
name
.
split
(
"-"
,
1
)[
1
].
replace
(
"-"
,
"_"
)
...
...
@@ -45,7 +45,7 @@ for number, cube in enumerate(all_cubes):
number_of_mrs
=
len
([
mr
for
mr
in
cube
.
mergerequests
.
list
(
all
=
True
)
if
mr
.
state
==
"opened"
])
number_of_topics
=
len
([
x
for
x
in
cube
.
branches
.
list
()
if
x
.
name
.
startswith
(
"topic/"
)])
# will be set after
has_capture_deprecat
ion
_warnings
=
None
has_capture_deprecat
ed
_warnings
=
None
if
has_tox
:
tox_content
=
cube
.
files
.
get
(
"tox.ini"
,
ref
=
"branch/default"
).
decode
().
decode
(
"Utf-8"
)
...
...
@@ -73,15 +73,15 @@ for number, cube in enumerate(all_cubes):
deps
=
[
str
(
x
)
for
x
in
py3
.
deps
]
uses_dev_requirements
=
bool
([
x
for
x
in
deps
if
x
.
startswith
(
"-r"
)
and
x
.
endswith
(
"dev-requirements.txt"
)])
if
PYTEST_CAPTURE_DEPRECAT
ION
WARNINGS_PACKAGE_URI
in
deps
:
has_capture_deprecat
ion
_warnings
=
True
if
PYTEST_CAPTURE_DEPRECAT
ED
WARNINGS_PACKAGE_URI
in
deps
:
has_capture_deprecat
ed
_warnings
=
True
elif
uses_dev_requirements
and
"dev-requirements.txt"
in
cube_files
:
requirements
=
[
x
.
strip
()
for
x
in
cube
.
files
.
get
(
"dev-requirements.txt"
,
ref
=
"branch/default"
).
decode
().
decode
(
"Utf-8"
)
if
not
x
.
strip
().
startswith
(
"#"
)]
if
PYTEST_CAPTURE_DEPRECAT
ION
WARNINGS_PACKAGE_URI
in
requirements
:
has_capture_deprecat
ion
_warnings
=
True
if
PYTEST_CAPTURE_DEPRECAT
ED
WARNINGS_PACKAGE_URI
in
requirements
:
has_capture_deprecat
ed
_warnings
=
True
else
:
has_capture_deprecat
ion
_warnings
=
False
has_capture_deprecat
ed
_warnings
=
False
if
has_py2_tests
:
env_name
=
[
x
for
x
in
tox_config
.
envconfigs
if
x
.
startswith
(
"py2"
)]
...
...
@@ -90,7 +90,7 @@ for number, cube in enumerate(all_cubes):
# has_doc8, check if has doc first
# has_pytest_html
# has_pytest_capture_deprecat
ion
warnings
# has_pytest_capture_deprecat
ed
warnings
else
:
has_py2_tests
=
False
has_py3_tests
=
False
...
...
@@ -116,7 +116,7 @@ for number, cube in enumerate(all_cubes):
"has_mypy"
:
has_mypy
,
"has_flake8"
:
has_flake8
,
"has_from_forge"
:
has_from_forge
,
"has_capture_deprecat
ion
_warnings"
:
has_capture_deprecat
ion
_warnings
,
"has_capture_deprecat
ed
_warnings"
:
has_capture_deprecat
ed
_warnings
,
"number_of_mrs"
:
number_of_mrs
,
"number_of_topics"
:
number_of_topics
,
})
...
...
template/qa.html
View file @
ba0246a4
...
...
@@ -15,7 +15,7 @@
<th>
black
</th>
<th>
mypy
</th>
<th>
from forge
</th>
<th>
capture deprecat
ion
warnings
</th>
<th>
capture deprecat
ed
warnings
</th>
<th>
number of MRs / number of topics
</th>
</tr>
{%- endmacro %}
...
...
@@ -47,7 +47,7 @@
<td
class=
"{{ "
true
"
if
cube
["
has_mypy
"]
else
"
false
"
}}"
></td>
<td
class=
"{{ "
true
"
if
cube
["
has_from_forge
"]
else
"
false
"
}}"
></td>
{% if cube["has_py3_tests"] %}
<td
class=
"{{ "
true
"
if
cube
["
has_capture_deprecat
ion
_warnings
"]
else
"
false
"
}}"
></td>
<td
class=
"{{ "
true
"
if
cube
["
has_capture_deprecat
ed
_warnings
"]
else
"
false
"
}}"
></td>
{% else %}
<td></td>
{% endif %}
...
...
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