-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the automation code #1660
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
|
||
def fix_p2p8(directory): | ||
import autopep8 | ||
import multiprocessing | ||
|
||
autopep8.fix_multiple_files([directory], | ||
options=autopep8._get_options( | ||
{ | ||
'jobs': multiprocessing.cpu_count(), | ||
'verbose': True, | ||
'recursive': True, | ||
'in_place': True, | ||
'max_line_length': 100 | ||
}, False)) | ||
|
||
|
||
if __name__ == '__main__': | ||
import sys | ||
|
||
if len(sys.argv) < 2: | ||
print('usage: python automation.style.pep8 <directory>') | ||
sys.exit(1) | ||
|
||
fix_p2p8(sys.argv[1]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env python | ||
|
||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from setuptools import setup | ||
|
||
VERSION = "0.1.0" | ||
|
||
CLASSIFIERS = [ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: System Administrators', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'License :: OSI Approved :: MIT License', | ||
] | ||
|
||
DEPENDENCIES = [ | ||
'autopep8==1.2.4', | ||
'coverage==4.2', | ||
'pycodestyle==2.2.0' | ||
] | ||
|
||
setup( | ||
name='automation', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed, please change name as even though we won't be releasing this package, it conflicts with https://pypi.python.org/pypi/automation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll fix this right now. |
||
version=VERSION, | ||
description='Microsoft Azure Command-Line Tools - Automation Utility', | ||
long_description='', | ||
license='MIT', | ||
author='Microsoft Corporation', | ||
author_email='[email protected]', | ||
url='https://github.com/Azure/azure-cli', | ||
namespace_packages=[ | ||
], | ||
packages=[ | ||
'automation', | ||
'automation.style', | ||
'automation.tests', | ||
'automation.setup', | ||
'automation.coverage' | ||
], | ||
install_requires=DEPENDENCIES | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we removing this dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is moved to automation package's setup.py.