Skip to content

Commit 7c2f154

Browse files
yoshi-automationbusunkim96
authored andcommitted
Update noxfile and setup.py (via synth). (googleapis#8298)
1 parent f3162f7 commit 7c2f154

3 files changed

Lines changed: 58 additions & 63 deletions

File tree

container/noxfile.py

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323

2424
LOCAL_DEPS = (os.path.join("..", "api_core"), os.path.join("..", "core"))
2525

26+
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
27+
28+
if os.path.exists("samples"):
29+
BLACK_PATHS.append("samples")
30+
31+
2632
@nox.session(python="3.7")
2733
def lint(session):
2834
"""Run linters.
@@ -31,13 +37,7 @@ def lint(session):
3137
serious code quality issues.
3238
"""
3339
session.install("flake8", "black", *LOCAL_DEPS)
34-
session.run(
35-
"black",
36-
"--check",
37-
"google",
38-
"tests",
39-
"docs",
40-
)
40+
session.run("black", "--check", *BLACK_PATHS)
4141
session.run("flake8", "google", "tests")
4242

4343

@@ -46,18 +46,13 @@ def blacken(session):
4646
"""Run black.
4747
4848
Format code to uniform standard.
49-
49+
5050
This currently uses Python 3.6 due to the automated Kokoro run of synthtool.
5151
That run uses an image that doesn't have 3.6 installed. Before updating this
5252
check the state of the `gcp_ubuntu_config` we use for that Kokoro run.
5353
"""
5454
session.install("black")
55-
session.run(
56-
"black",
57-
"google",
58-
"tests",
59-
"docs",
60-
)
55+
session.run("black", *BLACK_PATHS)
6156

6257

6358
@nox.session(python="3.7")
@@ -140,21 +135,24 @@ def cover(session):
140135

141136
session.run("coverage", "erase")
142137

138+
143139
@nox.session(python="3.7")
144140
def docs(session):
145141
"""Build the docs for this library."""
146142

147-
session.install('-e', '.')
148-
session.install('sphinx', 'alabaster', 'recommonmark')
143+
session.install("-e", ".")
144+
session.install("sphinx", "alabaster", "recommonmark")
149145

150-
shutil.rmtree(os.path.join('docs', '_build'), ignore_errors=True)
146+
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
151147
session.run(
152-
'sphinx-build',
153-
'-W', # warnings as errors
154-
'-T', # show full traceback on exception
155-
'-N', # no colors
156-
'-b', 'html',
157-
'-d', os.path.join('docs', '_build', 'doctrees', ''),
158-
os.path.join('docs', ''),
159-
os.path.join('docs', '_build', 'html', ''),
148+
"sphinx-build",
149+
"-W", # warnings as errors
150+
"-T", # show full traceback on exception
151+
"-N", # no colors
152+
"-b",
153+
"html",
154+
"-d",
155+
os.path.join("docs", "_build", "doctrees", ""),
156+
os.path.join("docs", ""),
157+
os.path.join("docs", "_build", "html", ""),
160158
)

container/setup.py

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,70 +20,67 @@
2020

2121
# Package metadata.
2222

23-
name = 'google-cloud-container'
24-
description = 'Google Container Engine API client library'
25-
version = '0.2.1'
23+
name = "google-cloud-container"
24+
description = "Google Container Engine API client library"
25+
version = "0.2.1"
2626
# Should be one of:
2727
# 'Development Status :: 3 - Alpha'
2828
# 'Development Status :: 4 - Beta'
2929
# 'Development Status :: 5 - Production/Stable'
30-
release_status = 'Development Status :: 3 - Alpha'
31-
dependencies = [
32-
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
33-
]
34-
extras = {
35-
}
30+
release_status = "Development Status :: 3 - Alpha"
31+
dependencies = ["google-api-core[grpc] >= 1.6.0, < 2.0.0dev"]
32+
extras = {}
3633

3734

3835
# Setup boilerplate below this line.
3936

4037
package_root = os.path.abspath(os.path.dirname(__file__))
4138

42-
readme_filename = os.path.join(package_root, 'README.rst')
43-
with io.open(readme_filename, encoding='utf-8') as readme_file:
39+
readme_filename = os.path.join(package_root, "README.rst")
40+
with io.open(readme_filename, encoding="utf-8") as readme_file:
4441
readme = readme_file.read()
4542

4643
# Only include packages under the 'google' namespace. Do not include tests,
4744
# benchmarks, etc.
4845
packages = [
49-
package for package in setuptools.find_packages()
50-
if package.startswith('google')]
46+
package for package in setuptools.find_packages() if package.startswith("google")
47+
]
5148

5249
# Determine which namespaces are needed.
53-
namespaces = ['google']
54-
if 'google.cloud' in packages:
55-
namespaces.append('google.cloud')
50+
namespaces = ["google"]
51+
if "google.cloud" in packages:
52+
namespaces.append("google.cloud")
5653

5754

5855
setuptools.setup(
5956
name=name,
6057
version=version,
6158
description=description,
6259
long_description=readme,
63-
author='Google LLC',
64-
author_email='googleapis-packages@google.com',
65-
license='Apache 2.0',
66-
url='https://github.com/GoogleCloudPlatform/google-cloud-python',
60+
author="Google LLC",
61+
author_email="googleapis-packages@google.com",
62+
license="Apache 2.0",
63+
url="https://github.com/GoogleCloudPlatform/google-cloud-python",
6764
classifiers=[
6865
release_status,
69-
'Intended Audience :: Developers',
70-
'License :: OSI Approved :: Apache Software License',
71-
'Programming Language :: Python',
72-
'Programming Language :: Python :: 2',
73-
'Programming Language :: Python :: 2.7',
74-
'Programming Language :: Python :: 3',
75-
'Programming Language :: Python :: 3.5',
76-
'Programming Language :: Python :: 3.6',
77-
'Programming Language :: Python :: 3.7',
78-
'Operating System :: OS Independent',
79-
'Topic :: Internet',
66+
"Intended Audience :: Developers",
67+
"License :: OSI Approved :: Apache Software License",
68+
"Programming Language :: Python",
69+
"Programming Language :: Python :: 2",
70+
"Programming Language :: Python :: 2.7",
71+
"Programming Language :: Python :: 3",
72+
"Programming Language :: Python :: 3.5",
73+
"Programming Language :: Python :: 3.6",
74+
"Programming Language :: Python :: 3.7",
75+
"Operating System :: OS Independent",
76+
"Topic :: Internet",
8077
],
81-
platforms='Posix; MacOS X; Windows',
78+
platforms="Posix; MacOS X; Windows",
8279
packages=packages,
8380
namespace_packages=namespaces,
8481
install_requires=dependencies,
8582
extras_require=extras,
86-
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
83+
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*",
8784
include_package_data=True,
8885
zip_safe=False,
8986
)

container/synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2019-06-11T15:58:37.501004Z",
2+
"updateTime": "2019-06-13T12:13:59.592688Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.24.0",
8-
"dockerImage": "googleapis/artman@sha256:ce425884865f57f18307e597bca1a74a3619b7098688d4995261f3ffb3488681"
7+
"version": "0.24.1",
8+
"dockerImage": "googleapis/artman@sha256:6018498e15310260dc9b03c9d576608908ed9fbabe42e1494ff3d827fea27b19"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "744feb9660b3194fcde37dea50038bde204f3573",
16-
"internalRef": "252553801"
15+
"sha": "46bfd341116c385fd1671675f918da7d513b20c4",
16+
"internalRef": "252913906"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)