1717BLACK_VERSION = "black==19.10b0"
1818BLACK_PATHS = [
1919 "docs" ,
20+ "django_spanner" ,
2021 "tests" ,
2122 "noxfile.py" ,
2223 "setup.py" ,
2324]
2425
26+ DEFAULT_PYTHON_VERSION = "3.8"
27+ SYSTEM_TEST_PYTHON_VERSIONS = ["3.8" ]
28+ UNIT_TEST_PYTHON_VERSIONS = ["3.6" , "3.7" , "3.8" ]
2529
26- @nox .session (python = "3.8" )
30+
31+ @nox .session (python = DEFAULT_PYTHON_VERSION )
2732def lint (session ):
2833 """Run linters.
2934
@@ -35,7 +40,7 @@ def lint(session):
3540 session .run ("flake8" , "django_spanner" , "tests" )
3641
3742
38- @nox .session (python = "3.8 " )
43+ @nox .session (python = "3.6 " )
3944def blacken (session ):
4045 """Run black.
4146
@@ -49,7 +54,7 @@ def blacken(session):
4954 session .run ("black" , * BLACK_PATHS )
5055
5156
52- @nox .session (python = "3.8" )
57+ @nox .session (python = DEFAULT_PYTHON_VERSION )
5358def lint_setup_py (session ):
5459 """Verify that setup.py is valid (including RST check)."""
5560 session .install ("docutils" , "pygments" )
@@ -70,23 +75,22 @@ def default(session):
7075 "py.test" ,
7176 "--quiet" ,
7277 "--cov=django_spanner" ,
73- "--cov=google.cloud" ,
7478 "--cov=tests.unit" ,
7579 "--cov-append" ,
7680 "--cov-config=.coveragerc" ,
7781 "--cov-report=" ,
78- "--cov-fail-under=60 " ,
82+ "--cov-fail-under=20 " ,
7983 os .path .join ("tests" , "unit" ),
8084 * session .posargs
8185 )
8286
8387
84- @nox .session (python = "3.8" )
88+ @nox .session (python = DEFAULT_PYTHON_VERSION )
8589def docs (session ):
8690 """Build the docs for this library."""
8791
88- session .install ("-e" , "." )
89- session .install ("sphinx<3.0.0 " , "alabaster" , "recommonmark" )
92+ session .install ("-e" , ".[tracing] " )
93+ session .install ("sphinx" , "alabaster" , "recommonmark" )
9094
9195 shutil .rmtree (os .path .join ("docs" , "_build" ), ignore_errors = True )
9296 session .run (
0 commit comments