Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.1.0
current_version = 4.0.0
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
Expand All @@ -25,4 +25,3 @@ values =
[bumpversion:file:./libs/src/main/python/dlpx/virtualization/libs/VERSION]

[bumpversion:file:./tools/src/main/python/dlpx/virtualization/_internal/VERSION]

86 changes: 76 additions & 10 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,48 @@ name: Pre-commit actions for Delphix Virtualization SDK
on: [pull_request]

jobs:
pytest:
name: Test ${{ matrix.package }} on ${{ matrix.os }} using pytest
pytest27:
name: Test ${{ matrix.package }} on ${{ matrix.os }} using pytest (Python 2.7)
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: [2.7]
os: [ubuntu-latest, macos-10.15, windows-latest]
package: [common, libs, platform]

steps:
- name: Checkout ${{ matrix.package }} project
uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install ${{ matrix.package }} dependencies
working-directory: ${{ matrix.package }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt --find-links https://test.pypi.org/simple/dvp-api/

- name: Install ${{ matrix.package }} project
working-directory: ${{ matrix.package }}
run: |
pip install . --find-links https://test.pypi.org/simple/dvp-api/

- name: Test ${{ matrix.package }} project with pytest
working-directory: ${{ matrix.package }}
run: |
python -m pytest src/test/python

pytest38:
name: Test ${{ matrix.package }} on ${{ matrix.os }} using pytest (Python 3.8)
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: [3.8]
os: [ubuntu-latest, macos-latest, windows-latest]
package: [common, libs, platform, tools]

Expand Down Expand Up @@ -38,33 +73,64 @@ jobs:
run: |
python -m pytest src/test/python

lint:
name: Lint ${{ matrix.package }}
lintpython27:
name: Lint ${{ matrix.package }} - Python27

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
package: [tools]
package: [common, libs, platform]

steps:
- name: Checkout ${{ matrix.package }}
uses: actions/checkout@v1

- name: Set up Python 2.7
uses: actions/setup-python@v1
with:
python-version: 2.7

- name: Install flake8
run: |
python -m pip install --upgrade pip
pip install flake8

- name: Run flake8 on src directory
working-directory: ${{ matrix.package }}
run: python -m flake8 src/main/python --max-line-length 88


- name: Run flake8 on test directory
working-directory: ${{ matrix.package }}
run: python -m flake8 src/test/python --max-line-length 88

lintpython38:
name: Lint ${{ matrix.package }} - Python38

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
package: [common, libs, platform, tools]

steps:
- name: Checkout ${{ matrix.package }}
uses: actions/checkout@v1

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install flake8
run: |
python -m pip install --upgrade pip
pip install flake8

- name: Run flake8 on src directory
working-directory: ${{ matrix.package }}
run: python -m flake8 src/main/python --max-line-length 88

- name: Run flake8 on test directory
working-directory: ${{ matrix.package }}
run: python -m flake8 src/test/python --max-line-length 88
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
if: ${{ github.repository == matrix.repository }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.SDK_DEPLOY_KEY }}
publish_dir: docs/site
commit_message: Deploy to gh-pages 🚀
user_name: "github-actions[bot]"
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019 by Delphix. All rights reserved.
# Copyright (c) 2019, 2021 by Delphix. All rights reserved.
#

# IntelliJ config files
Expand Down Expand Up @@ -35,3 +35,8 @@ venv/
# Python cache
__pycache__

# .python-version files
*.python-version

# OSX DS Store files
*.DS_Store
6 changes: 5 additions & 1 deletion README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ If you want to bump the major/minor/patch version, run `bumpversion [major|minor

If you want to get rid of the dev label (bump from `1.1.0.dev7` to `1.1.0`), run `bumpversion release`.

Note: After bumpversion the tools unit test will need to be manually updated to test for the new version.

## Testing

Currently, there are three types of SDK testing: unit, manual, and functional (blackbox).
Expand All @@ -122,7 +124,9 @@ all the standard workflows. The same workflows will be exercised by functional (
### Functional (blackbox) testing
To run blackbox tests, follow these steps:
1. Push your code to a branch in the forked repository on Github. Let's say the branch is called `my-feature` in repository called `<username>/virtualization-sdk`.
2. Navigate to the app-gate directory and start tests using `git blackbox`. For the guide on which test suite to use,
2. If you bumped the version (one of major, minor, or micro, not the dev version part), then QA will have to createa a new branch (qa-appdata-toolkits branch sdk-3-2-0 for example with version 3.2.0) and update their map before you can run the blackbox tests:
* automation/regression/BlackBox/blackbox/appdata/virtualization_sdk/dvp_settings.py
3. Navigate to the app-gate directory and start tests using `git blackbox`. For the guide on which test suite to use,
see the next sections.

At a minimum, each pull request should pass `appdata_python_samples` and `appdata_basic` tests with a direct or staged plugin.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ The latest user documentation can be found [here](https://developer.delphix.com)
### Prerequisites

- macOS 10.14+, Ubuntu 16.04+, or Windows 10
- Python 2.7 (Python 3 is not supported)
- Python 2.7 (vSDK 3.1.0 and earlier)
- Python 3.8 (vSDK 4.0.0 and later)
- Java 7+
- Delphix Engine 5.3.5.0 or above
- A Delphix Engine of an [appropriate version](/References/Version_Compatibility.md)

### Installing

Expand Down
1 change: 0 additions & 1 deletion common/.python-version

This file was deleted.

19 changes: 10 additions & 9 deletions common/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
#
# Copyright (c) 2019 by Delphix. All rights reserved.
# Copyright (c) 2019, 2021 by Delphix. All rights reserved.
#

[metadata]
Metadata-Version: 1.2
Author: Delphix
Author-email: [email protected]
Home-page: https://developer.delphix.com
Long-description: file: README.md
Long-description-content-type: text/markdown
Classifiers:
metadata_version: 1.2
author: Delphix
author_email: [email protected]
home_page: https://developer.delphix.com
long_description: file: README.md
long_description_content_type: text/markdown
classifiers:
Development Status :: 5 - Production/Stable
Programming Language :: Python
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.8
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent

[options]
Requires-Python: 2.7
requires_python: >=2.7, <=3.8, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*
3 changes: 2 additions & 1 deletion common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
PYTHON_SRC = 'src/main/python'

install_requires = [
"dvp-api == 1.5.0",
"dvp-api == 1.6.1",
]

with open(os.path.join(PYTHON_SRC, 'dlpx/virtualization/common/VERSION')) as version_file:
Expand All @@ -15,4 +15,5 @@
install_requires=install_requires,
package_dir={'': PYTHON_SRC},
packages=setuptools.find_packages(PYTHON_SRC),
python_requires='>=2.7, <3.9, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*',
)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
4.0.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Copyright (c) 2019 by Delphix. All rights reserved.
# Copyright (c) 2019, 2021 by Delphix. All rights reserved.
#

__path__ = __import__('pkgutil').extend_path(__path__, __name__)

from dlpx.virtualization.common._common_classes import *
from dlpx.virtualization.common._common_classes import * # noqa
Loading