Skip to content
Myr

noxfile.py

This file

Path

noxfile.py

44 lines · 1.3 KiB · Python

Last changed by

Run isort in the nox check session (#379)Jamie Hewlandbefore adoption276ee73

History of this file

Take it

Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2

lines 1–2why, one step back
1import nox
2

Stop running nox on first error (#286)Jt Miclatbefore adoption33032df

lines 3–4why, one step back
3nox.options.stop_on_first_error = True
4

Add tool for profiling (#364)Florimond Mancabefore adoptione1da6b9

line 5why, one step back
5source_files = ("httpx", "tools", "tests", "setup.py", "noxfile.py")

Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2

lines 6–13why, one step back
6
78@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 back
14 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 back
15 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

line 22why, one step back
22 session.install(

Run isort in the nox check session (#379)Jamie Hewlandbefore adoption276ee73

line 23why, one step back
23 "black", "flake8", "flake8-bugbear", "flake8-comprehensions", "isort", "mypy"

Add flake8-comprehensions to nox check task (#200)Can Sarıgölbefore adoption1b82d63

line 24why, one step back
24 )

Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2

line 25why, one step back
25

Add --diff flag to Black for easier debugging (#219)euri10before adoptione64fcad

line 26why, one step back
26 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 back
27 session.run("flake8", *source_files)
28 session.run("mypy", "httpx")

Run isort in the nox check session (#379)Jamie Hewlandbefore adoption276ee73

lines 29–31why, one step back
29 session.run(
30 "isort", "--check", "--diff", "--project=httpx", "--recursive", *source_files31 )

Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2

lines 32–43why, one step back
32
3334@nox.session(reuse_venv=True)35def docs(session):36 session.install("mkdocs", "mkdocs-material")3738 session.run("mkdocs", "build")394041@nox.session(python=["3.6", "3.7", "3.8"])42def test(session):43 session.install("-r", "test-requirements.txt")

Allow per file running of tests (#287)Jt Miclatbefore adoption1f4b8dd

line 44why, one step back
44 session.run("python", "-m", "pytest", *session.posargs)