noxfile.py
This file
Path
noxfile.py
41 lines · 1.2 KiB · Python
Last changed by
Add tool for profiling (#364)Florimond Mancabefore adoptione1da6b9
History of this fileTake it
Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 1–2why, one step back1import nox2Stop running nox on first error (#286)Jt Miclatbefore adoption33032df
lines 3–4why, one step back3nox.options.stop_on_first_error = True4Add tool for profiling (#364)Florimond Mancabefore adoptione1da6b9
line 5why, one step back5source_files = ("httpx", "tools", "tests", "setup.py", "noxfile.py")Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 6–13why, one step back678@nox.session(reuse_venv=True)9def lint(session):10 session.install("autoflake", "black", "flake8", "isort", "seed-isort-config")1112 session.run("autoflake", "--in-place", "--recursive", *source_files)13 session.run("seed-isort-config", "--application-directories=httpx")Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212
line 14why, one step back14 session.run("isort", "--project=httpx", "--recursive", "--apply", *source_files)Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 15–21why, one step back15 session.run("black", "--target-version=py36", *source_files)1617 check(session)181920@nox.session(reuse_venv=True)21def check(session):Add flake8-comprehensions to nox check task (#200)Can Sarıgölbefore adoption1b82d63
lines 22–24why, one step back22 session.install(23 "black", "flake8", "flake8-bugbear", "flake8-comprehensions", "mypy"24 )Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
line 25why, one step back25Add --diff flag to Black for easier debugging (#219)euri10before adoptione64fcad
line 26why, one step back26 session.run("black", "--check", "--diff", "--target-version=py36", *source_files)Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212
lines 27–28why, one step back27 session.run("flake8", *source_files)28 session.run("mypy", "httpx")Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 29–40why, one step back293031@nox.session(reuse_venv=True)32def docs(session):33 session.install("mkdocs", "mkdocs-material")3435 session.run("mkdocs", "build")363738@nox.session(python=["3.6", "3.7", "3.8"])39def test(session):40 session.install("-r", "test-requirements.txt")Allow per file running of tests (#287)Jt Miclatbefore adoption1f4b8dd
line 41why, one step back41 session.run("python", "-m", "pytest", *session.posargs)