Skip to content

Commit

Permalink
Ignore SDK models/operations and KnackConversion testsdk (#22)
Browse files Browse the repository at this point in the history
* Ignore SDK models/operations and KnackConversion testsdk

* Install from KnackConversion branch

* Fix new pylint
  • Loading branch information
derekbekoe committed Dec 18, 2017
1 parent 9e6b525 commit c65857f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/ci/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import hashlib
import shutil
import subprocess
from util import get_repo_root
from wheel.install import WHEEL_INFO_RE
from util import get_repo_root

INDEX_PATH = os.path.join(get_repo_root(), 'src', 'index.json')
SRC_PATH = os.path.join(get_repo_root(), 'src')
Expand Down
5 changes: 3 additions & 2 deletions scripts/ci/test_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ set -ex

# Install CLI & CLI testsdk
echo "Installing azure-cli-testsdk and azure-cli..."
# TODO Update the git commit when we need a new version of azure-cli-testsdk
pip install "git+https://github.com/Azure/azure-cli@68460748e47f20cba462686c9fd20d2c720cf98c#egg=azure-cli-testsdk&subdirectory=src/azure-cli-testsdk" -q
# TODO Update the git commit or branch when we need a new version of azure-cli-testsdk
pip install "git+https://github.com/Azure/azure-cli@KnackConversion#egg=azure-cli-testsdk&subdirectory=src/azure-cli-testsdk" -q
pip install knack==0.3.0 -q
echo "Installed."


Expand Down
9 changes: 7 additions & 2 deletions scripts/ci/test_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
set -e

proc_number=`python -c 'import multiprocessing; print(multiprocessing.cpu_count())'`
pylint ./src/*/azext_*/ --rcfile=./pylintrc -j $proc_number
flake8 --statistics --append-config=./.flake8 ./src/*/azext_*/

# Run pylint/flake8 on extensions
# - We ignore 'models' and 'operations' as they typically come from vendored Azure SDKs
pylint ./src/*/azext_*/ --ignore=models,operations --rcfile=./pylintrc -j $proc_number
flake8 --statistics --exclude=models,operations --append-config=./.flake8 ./src/*/azext_*/

# Run pylint/flake8 on CI files
pylint ./scripts/ci/*.py --rcfile=./pylintrc
flake8 --append-config=./.flake8 ./scripts/ci/*.py

# Other static checks
python ./scripts/ci/verify_codeowners.py
python ./scripts/ci/verify_license.py
2 changes: 1 addition & 1 deletion src/image-copy/azext_imagecopy/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
logger = azlogging.get_az_logger(__name__)


def run_cli_command(cmd, return_as_json=False):
def run_cli_command(cmd, return_as_json=False): # pylint: disable=inconsistent-return-statements
try:
cmd_output = check_output(cmd, stderr=STDOUT, universal_newlines=True)
logger.debug('command: %s ended with output: %s', cmd, cmd_output)
Expand Down
2 changes: 1 addition & 1 deletion src/image-copy/azext_imagecopy/create_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import hashlib
import datetime
import time
from azext_imagecopy.cli_utils import run_cli_command, prepare_cli_command
from azure.cli.core.application import APPLICATION
from azure.cli.core.util import CLIError
import azure.cli.core.azlogging as azlogging
from azext_imagecopy.cli_utils import run_cli_command, prepare_cli_command

logger = azlogging.get_az_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/image-copy/azext_imagecopy/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

from multiprocessing import Pool

import azure.cli.core.azlogging as azlogging
from azext_imagecopy.cli_utils import run_cli_command, prepare_cli_command
from azext_imagecopy.create_target import create_target_image
import azure.cli.core.azlogging as azlogging

logger = azlogging.get_az_logger(__name__)

Expand Down

0 comments on commit c65857f

Please sign in to comment.