|
1 | | -import argparse |
2 | | -import json |
3 | 1 | import logging |
4 | 2 |
|
5 | 3 | import nox # noqa |
|
9 | 7 | # add parent folder to python path so that we can import noxfile_utils.py |
10 | 8 | # note that you need to "pip install -r noxfile-requiterements.txt" for this file to work. |
11 | 9 | sys.path.append(str(Path(__file__).parent / "ci_tools")) |
12 | | -from nox_utils import (PY27, PY37, PY36, PY38, PY39, PY310, PY311, PY312, PY313, install_reqs, rm_folder, rm_file, |
| 10 | +from nox_utils import (PY39, PY310, PY311, PY312, PY313, PY314, install_reqs, rm_folder, rm_file, |
13 | 11 | DONT_INSTALL) # noqa |
14 | 12 |
|
15 | 13 |
|
@@ -54,16 +52,13 @@ class Folders: |
54 | 52 |
|
55 | 53 |
|
56 | 54 | ENVS = { |
| 55 | + # PY314: {"coverage": False, "pkg_specs": {"pip": ">19"}}, |
57 | 56 | PY313: {"coverage": False, "pkg_specs": {"pip": ">19"}}, |
58 | 57 | PY312: {"coverage": False, "pkg_specs": {"pip": ">19"}}, |
59 | 58 | PY311: {"coverage": False, "pkg_specs": {"pip": ">19"}}, |
60 | 59 | PY310: {"coverage": False, "pkg_specs": {"pip": ">19"}}, |
61 | | - PY39: {"coverage": False, "pkg_specs": {"pip": ">19"}}, |
62 | | - PY38: {"coverage": False, "pkg_specs": {"pip": ">19"}}, |
63 | | - PY27: {"coverage": False, "pkg_specs": {"pip": ">10"}}, |
64 | | - PY36: {"coverage": False, "pkg_specs": {"pip": ">19"}}, |
65 | 60 | # IMPORTANT: this should be last so that the folder docs/reports is not deleted afterwards |
66 | | - PY37: {"coverage": True, "pkg_specs": {"pip": ">19"}}, # , "pytest-html": "1.9.0" |
| 61 | + PY39: {"coverage": True, "pkg_specs": {"pip": ">19"}}, |
67 | 62 | } |
68 | 63 |
|
69 | 64 | ENV_PARAMS = tuple((k, v["coverage"], v["pkg_specs"]) for k, v in ENVS.items()) |
@@ -289,34 +284,34 @@ def release(session): |
289 | 284 | "-d", f"https://{gh_org}.github.io/{gh_repo}/changelog", current_tag) |
290 | 285 |
|
291 | 286 |
|
292 | | -@nox.session(python=False) |
293 | | -def gha_list(session): |
294 | | - """(mandatory arg: <base_session_name>) Prints all sessions available for <base_session_name>, for GithubActions.""" |
295 | | - |
296 | | - # see https://stackoverflow.com/q/66747359/7262247 |
297 | | - |
298 | | - # The options |
299 | | - parser = argparse.ArgumentParser() |
300 | | - parser.add_argument("-s", "--session", help="The nox base session name") |
301 | | - parser.add_argument( |
302 | | - "-v", |
303 | | - "--with_version", |
304 | | - action="store_true", |
305 | | - default=False, |
306 | | - help="Return a list of lists where the first element is the python version and the second the nox session.", |
307 | | - ) |
308 | | - additional_args = parser.parse_args(session.posargs) |
309 | | - |
310 | | - # Now use --json CLI option |
311 | | - out = session.run("nox", "-l", "--json", "-s", "tests", external=True, silent=True) |
312 | | - sessions_list = [{"python": s["python"], "session": s["session"]} for s in json.loads(out)] |
313 | | - |
314 | | - # TODO filter ? |
315 | | - |
316 | | - # print the list so that it can be caught by GHA. |
317 | | - # Note that json.dumps is optional since this is a list of string. |
318 | | - # However it is to remind us that GHA expects a well-formatted json list of strings. |
319 | | - print(json.dumps(sessions_list)) |
| 287 | +# @nox.session(python=False) |
| 288 | +# def gha_list(session): |
| 289 | +# """(mandatory arg: <base_session_name>) Prints all sessions available for <base_session_name>, for GithubActions.""" |
| 290 | +# |
| 291 | +# # see https://stackoverflow.com/q/66747359/7262247 |
| 292 | +# |
| 293 | +# # The options |
| 294 | +# parser = argparse.ArgumentParser() |
| 295 | +# parser.add_argument("-s", "--session", help="The nox base session name") |
| 296 | +# parser.add_argument( |
| 297 | +# "-v", |
| 298 | +# "--with_version", |
| 299 | +# action="store_true", |
| 300 | +# default=False, |
| 301 | +# help="Return a list of lists where the first element is the python version and the second the nox session.", |
| 302 | +# ) |
| 303 | +# additional_args = parser.parse_args(session.posargs) |
| 304 | +# |
| 305 | +# # Now use --json CLI option |
| 306 | +# out = session.run("nox", "-l", "--json", "-s", "tests", external=True, silent=True) |
| 307 | +# sessions_list = [{"python": s["python"], "session": s["session"]} for s in json.loads(out)] |
| 308 | +# |
| 309 | +# # TODO filter ? |
| 310 | +# |
| 311 | +# # print the list so that it can be caught by GHA. |
| 312 | +# # Note that json.dumps is optional since this is a list of string. |
| 313 | +# # However it is to remind us that GHA expects a well-formatted json list of strings. |
| 314 | +# print(json.dumps(sessions_list)) |
320 | 315 |
|
321 | 316 |
|
322 | 317 | # if __name__ == '__main__': |
|
0 commit comments