noxfile.py
This file
Path
noxfile.py
62 lines · 1.6 KiB · Python
Last changed by
Allow serving docs via nox (#450)Florimond Mancabefore adoption65b8593
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
line 3why, one step back3nox.options.stop_on_first_error = TrueMake nox always reuse virtualenvs by default (#460)Florimond Mancabefore adoption7361d60
line 4why, one step back4nox.options.reuse_existing_virtualenvs = TrueAllow serving docs via nox (#450)Florimond Mancabefore adoption65b8593
line 5why, one step back5nox.options.keywords = "not serve"Stop running nox on first error (#286)Jt Miclatbefore adoption33032df
line 6why, one step back6Add tool for profiling (#364)Florimond Mancabefore adoptione1da6b9
line 7why, one step back7source_files = ("httpx", "tools", "tests", "setup.py", "noxfile.py")Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 8–9why, one step back89Make nox always reuse virtualenvs by default (#460)Florimond Mancabefore adoption7361d60
line 10why, one step back10@nox.sessionUse nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
line 11why, one step back11def lint(session):Make nox always reuse virtualenvs by default (#460)Florimond Mancabefore adoption7361d60
lines 12–14why, one step back12 session.install(13 "--upgrade", "autoflake", "black", "flake8", "isort", "seed-isort-config"14 )Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 15–17why, one step back1516 session.run("autoflake", "--in-place", "--recursive", *source_files)17 session.run("seed-isort-config", "--application-directories=httpx")Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212
line 18why, one step back18 session.run("isort", "--project=httpx", "--recursive", "--apply", *source_files)Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 19–23why, one step back19 session.run("black", "--target-version=py36", *source_files)2021 check(session)2223Make nox always reuse virtualenvs by default (#460)Florimond Mancabefore adoption7361d60
line 24why, one step back24@nox.sessionUse nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
line 25why, one step back25def check(session):Add flake8-comprehensions to nox check task (#200)Can Sarıgölbefore adoption1b82d63
line 26why, one step back26 session.install(Make nox always reuse virtualenvs by default (#460)Florimond Mancabefore adoption7361d60
line 27why, one step back27 "--upgrade",Add flake8-pie plugin (#419)Stephen Brown IIbefore adoptiondb3e3a0
lines 28–34why, one step back28 "black",29 "flake8",30 "flake8-bugbear",31 "flake8-comprehensions",32 "flake8-pie",33 "isort",34 "mypy",Add flake8-comprehensions to nox check task (#200)Can Sarıgölbefore adoption1b82d63
line 35why, one step back35 )Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
line 36why, one step back36Add --diff flag to Black for easier debugging (#219)euri10before adoptione64fcad
line 37why, one step back37 session.run("black", "--check", "--diff", "--target-version=py36", *source_files)Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212
lines 38–39why, one step back38 session.run("flake8", *source_files)39 session.run("mypy", "httpx")Run isort in the nox check session (#379)Jamie Hewlandbefore adoption276ee73
lines 40–42why, one step back40 session.run(41 "isort", "--check", "--diff", "--project=httpx", "--recursive", *source_files42 )Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 43–44why, one step back4344Make nox always reuse virtualenvs by default (#460)Florimond Mancabefore adoption7361d60
line 45why, one step back45@nox.sessionUse nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
line 46why, one step back46def docs(session):Make nox always reuse virtualenvs by default (#460)Florimond Mancabefore adoption7361d60
line 47why, one step back47 session.install("--upgrade", "mkdocs", "mkdocs-material", "pymdown-extensions")Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 48–49why, one step back4849 session.run("mkdocs", "build")Allow serving docs via nox (#450)Florimond Mancabefore adoption65b8593
lines 50–56why, one step back505152@nox.session(reuse_venv=True)53def serve(session):54 session.install("--upgrade", "mkdocs", "mkdocs-material")5556 session.run("mkdocs", "serve")Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 57–60why, one step back575859@nox.session(python=["3.6", "3.7", "3.8"])60def test(session):Make nox always reuse virtualenvs by default (#460)Florimond Mancabefore adoption7361d60
line 61why, one step back61 session.install("--upgrade", "-r", "test-requirements.txt")Allow per file running of tests (#287)Jt Miclatbefore adoption1f4b8dd
line 62why, one step back62 session.run("python", "-m", "pytest", *session.posargs)