Commit 0f01bfaf authored by Laurent Peuch's avatar Laurent Peuch
Browse files

fix: deprecation -> deprecated

parent e739017060e4
Pipeline #15052 passed with stages
in 5 minutes and 5 seconds
......@@ -14,14 +14,14 @@ context = {"cubes": []}
all_cubes = [x for x in gl.projects.list(all=True) if x.namespace["name"] == "cubes"]
PYTEST_CAPTURE_DEPRECATIONWARNINGS_PACKAGE_URI = "git+https://github.com/psycojoker/pytest-capture-deprecationwarnings"
PYTEST_CAPTURE_DEPRECATEDWARNINGS_PACKAGE_URI = "git+https://github.com/psycojoker/pytest-capture-deprecatedwarnings"
for number, cube in enumerate(all_cubes):
# python3
# doc8
# a de la doc
# safety
# deprecation warnings ?
# deprecated 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_deprecation_warnings = None
has_capture_deprecated_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_DEPRECATIONWARNINGS_PACKAGE_URI in deps:
has_capture_deprecation_warnings = True
if PYTEST_CAPTURE_DEPRECATEDWARNINGS_PACKAGE_URI in deps:
has_capture_deprecated_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_DEPRECATIONWARNINGS_PACKAGE_URI in requirements:
has_capture_deprecation_warnings = True
if PYTEST_CAPTURE_DEPRECATEDWARNINGS_PACKAGE_URI in requirements:
has_capture_deprecated_warnings = True
else:
has_capture_deprecation_warnings = False
has_capture_deprecated_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_deprecationwarnings
# has_pytest_capture_deprecatedwarnings
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_deprecation_warnings": has_capture_deprecation_warnings,
"has_capture_deprecated_warnings": has_capture_deprecated_warnings,
"number_of_mrs": number_of_mrs,
"number_of_topics": number_of_topics,
})
......
......@@ -15,7 +15,7 @@
<th>black</th>
<th>mypy</th>
<th>from forge</th>
<th>capture deprecationwarnings</th>
<th>capture deprecatedwarnings</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_deprecation_warnings"] else "false" }}"></td>
<td class="{{ "true" if cube["has_capture_deprecated_warnings"] else "false" }}"></td>
{% else %}
<td></td>
{% endif %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment