* Remove travis CI file. Add RST check. Add RST file.

* Force failure (test)

* Add build step to ADO pipeline.

* Code review feedback
This commit is contained in:
Travis Prescott 2019-06-27 14:52:09 -07:00 коммит произвёл GitHub
Родитель 508849e6ef
Коммит 963c54a7e2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 185 добавлений и 26 удалений

Просмотреть файл

@ -1,16 +0,0 @@
sudo: false
language: python
python:
- '2.7'
- '3.5'
- '3.6'
install: pip install tox-travis
script: tox
deploy:
provider: pypi
user: azpycli
password:
secure: ZXCH7riEOep6u6ccxY3F2/CSKZBdhIEAVNWBuIuArk44zp4t06KsYAw82IAMI/HSZQHxrn4uJcXkPdVLZONCphC5kPL9cdeY54WsLIbgKcRexclo84oBWIUtxAQsfdAn0/DPbpjVFG4Q11z/OJ67QItHlFLYarOsOPd3xphyx7L6YeIgQKhTkuBdzS7+oxbchsNGnYxWH27mzaGOhaY7QsQqzKNChohusZthbWj5/IFwnP2mjeHT3G4Dp8KckqiUtkPSdxxKfbyqxtKw4BvMi0aT/XfcBLUr11Q7uROwhGR5GCIBvJxgYG/bRmxPUCkWPsF1UJDrAwSeBPeDn3Sh/7CPTbXOgoYci8ksSrpafEf28mtF6bsYyaHPKo0ozVTPdf5UE1AxZn5CagD2z5eE3A+DwSmeb0TssdQrWlkoZ+zheyeNLuyrRDFSu0IGw9E8Q5BZb0tDKr79c1TvuKkFv4uSUDmb2aqdsJzrp9VcEtkfih2mWdNYod4t6nl4r5q0AlLjRNf7FTS2LR9FlnAfD+rJhdImJKrPLoTPF7J/u4wqjCC1z/zjNW+26PmtYk4d60/o8+iYVno3HzkiWwvkbDywf0AgGASePG59bLUhi/hmFgicE3BGy19TmIafk1Zjxl7+gI22JjzjSTSF3jww/4mAlsqI3zemIlQKit3cUmg=
distributions: sdist bdist_wheel
on:
tags: true

Просмотреть файл

@ -4,31 +4,31 @@ Release History
===============
0.1.0
+++++
++++++
* Update for compatability with azure-cli 2.0.68's new package structure.
* BREAKING CHANGE: Removed `azdev cli update-setup`. Package changes to azure-cli no longer require this.
* BREAKING CHANGE: `azdev verify history` and `azdev cli check-versions` no longer accept any arguments. Since there are
now far fewer modules, these were deemed unnecessary.
0.0.6
+++++
++++++
* Added new commands `azdev cli create` and `azdev extension create` to scaffold new modules/extensions.
* `azdev setup`: Tweaks to interactive experience.
* `azdev test`: Fix issue where using `--profile` did not use the correct index.
Changed the behavior to switch back to the original profile upon completion of tests.
0.0.5
+++++
++++++
* Fix issue where `azdev cli check-versions` did not accept the short form of a module name.
* Update `azdev cli check-versions` to allow modules as a positional argument, consistent with other azdev commands.
* Fix issue where `azdev test --discover` could result in a stack trace when a virtual environment exists within an extensions repo.
0.0.4
+++++
++++++
* Fix critical bug in `azdev setup`.
0.0.3
+++++
++++++
* Adds new commands `azdev extension build` and `azdev extension publish` to simplify extension publishing.
* Updates default exclusions for `azdev linter` when used on extensions.
* Adds a `--ci-exclusions` flag to `azdev linter` to emulate CI mode when run locally.
@ -36,7 +36,7 @@ Release History
* Tweaks thresholds for `azdev per load-times`.
0.0.2
+++++
++++++
* Changes the behavior of `azdev test` to, by default, run tests on everything to be consistent with commands like `azdev style` and `azdev linter`.
* Removes `azdev verify version` and splits into two commands `azdev cli check-versions` and `azdev cli update-setup`.

Просмотреть файл

@ -1,5 +1,8 @@
# Microsoft Azure CLI Dev Tools (azdev)
[![Python](https://img.shields.io/pypi/pyversions/azure-cli.svg?maxAge=2592000)](https://pypi.python.org/pypi/azdev)
[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/cli/Azure.azure-cli-dev-tools?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=604&branchName=master)
The `azdev` tool is designed to aid new and experienced developers in contributing to Azure CLI command modules and extensions.
## Setting up your development environment
@ -37,7 +40,7 @@ The `azdev` tool is designed to aid new and experienced developers in contributi
env\scripts\activate.ps1
```
OSX/Ubuntu (bash):
OSX/Linux (bash):
```Shell
source env/bin/activate
```

104
README.rst Normal file
Просмотреть файл

@ -0,0 +1,104 @@
Microsoft Azure CLI Dev Tools (azdev)
=====================================
The ``azdev`` tool is designed to aid new and experienced developers in contributing to Azure CLI command modules and extensions.
Setting up your development environment
+++++++++++++++++++++++++++++++++++++++
1. Install Python 3.5+ or 2.7+ from http://python.org. Please note that the version of Python that comes preinstalled on OSX is 2.7.
2. Fork and clone the repository or repositories you wish to develop for.
- For Azure CLI: https://github.com/Azure/azure-cli
- For Azure CLI Extensions: https://github.com/Azure/azure-cli-extensions
- Any other repository that you might have access to that contains CLI extensions.
3. Create a new virtual environment for Python in the root of your clone. You can do this by running:
Python 3.5+ (all platforms):
::
python -m venv env
or:
::
python3 -m venv env
Python 2.7+ (all platforms):
::
python -m virtualenv env
4. Activate the env virtual environment by running:
Windows CMD.exe:
::
env\scripts\activate.bat
Windows Powershell:
::
env\scripts\activate.ps1
OSX/Linux (bash):
::
source env/bin/activate
5. Install ``azdev`` by running:
::
pip install azdev
6. Complete setup by running:
::
azdev setup
This will launch the interactive setup process. To see non-interactive options run `azdev setup -h`.
Reporting issues and feedback
+++++++++++++++++++++++++++++
If you encounter any bugs with the tool please file an issue in the `Issues <https://github.com/Azure/azure-cli-dev-tools/issues>`__ section of our GitHub repo.
Contribute Code
+++++++++++++++
This project has adopted the `Microsoft Open Source Code of Conduct <https://opensource.microsoft.com/codeofconduct/>`__.
For more information see the `Code of Conduct FAQ <https://opensource.microsoft.com/codeofconduct/faq/>`__ or contact `opencode@microsoft.com <mailto:opencode@microsoft.com>`__ with any additional questions or comments.
If you would like to become an active contributor to this project please
follow the instructions provided in `Microsoft Azure Projects Contribution Guidelines <http://azure.github.io/guidelines.html>`__.
License
+++++++
::
Azure CLI Dev Tools (azdev)
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.::

Просмотреть файл

@ -4,4 +4,4 @@
# license information.
# -----------------------------------------------------------------------------
__VERSION__ = '0.0.7'
__VERSION__ = '0.1.0'

Просмотреть файл

@ -77,3 +77,46 @@ jobs:
inputs:
targetType: 'filePath'
filePath: scripts/ci/run_tox.sh
- job: ExtractMetadata
displayName: 'Extract Metadata'
condition: succeeded()
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: Bash@3
displayName: 'Extract Version'
inputs:
targetType: 'filePath'
filePath: scripts/ci/extract_version.sh
- task: PublishPipelineArtifact@0
displayName: 'Publish Artifact: metadata'
inputs:
TargetPath: $(Build.ArtifactStagingDirectory)
ArtifactName: metadata
- job: BuildPythonWheel
displayName: 'Build Python Wheel'
dependsOn: ExtractMetadata
condition: succeeded()
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: 3.7
- task: Bash@3
displayName: 'Run Wheel Build Script'
inputs:
targetType: 'filePath'
filePath: scripts/ci/build.sh
- task: PublishPipelineArtifact@0
displayName: 'Publish Artifact: pypi'
inputs:
TargetPath: $(Build.ArtifactStagingDirectory)
ArtifactName: pypi

16
scripts/ci/build.sh Normal file
Просмотреть файл

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -ev
: "${BUILD_STAGINGDIRECTORY:?BUILD_STAGINGDIRECTORY environment variable not set}"
: "${BUILD_SOURCESDIRECTORY:="$(dirname ${BASH_SOURCE[0]})/../../.."}"
cd $BUILD_SOURCESDIRECTORY
echo "Build `azdev`"
python --version
pip install -U pip setuptools wheel
pip list
python setup.py bdist_wheel sdist -d $BUILD_STAGINGDIRECTORY

Просмотреть файл

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Extract the version of the CLI from azdev's __init__.py file.
: "${BUILD_STAGINGDIRECTORY:?BUILD_STAGINGDIRECTORY environment variable not set}"
ver=`cat azdev/__init__.py | grep __VERSION__ | sed s/' '//g | sed s/'__VERSION__='// | sed s/\"//g`
echo $ver > $BUILD_STAGINGDIRECTORY/version
echo $ver > $BUILD_STAGINGDIRECTORY/azdev-${ver}.txt

Просмотреть файл

@ -19,7 +19,7 @@ with open(os.path.join(azdev_path, 'azdev', '__init__.py'), 'r') as version_file
__VERSION__ = re.search(r'^__VERSION__\s*=\s*[\'"]([^\'"]*)[\'"]',
version_file.read(), re.MULTILINE).group(1)
with open('README.md', 'r', encoding='utf-8') as f:
with open('README.rst', 'r', encoding='utf-8') as f:
README = f.read()
with open('HISTORY.rst', 'r', encoding='utf-8') as f:
HISTORY = f.read()
@ -28,7 +28,7 @@ setup(
name='azdev',
version=__VERSION__,
description='Microsoft Azure CLI Developer Tools',
long_description=README + '\n\n' + HISTORY,
long_description=README+ '\n\n' + HISTORY,
url='https://github.com/Azure/azure-cli-dev-tools',
author='Microsoft Corporation',
author_email='azpycli@microsoft.com',

Просмотреть файл

@ -11,5 +11,6 @@ whitelist_externals =
flake8
commands=
python ./scripts/license_verify.py
python setup.py check -r -s
pylint azdev --rcfile=.pylintrc -r n
flake8 --statistics --append-config=.flake8 azdev