From 13e48e29edab347dd16f8547efbe550cacab5b39 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Mon, 25 Apr 2022 16:32:57 +0100 Subject: [PATCH] automations and workflows (#50) authored-by: jarbasai --- .github/workflows/dev2master.yml | 18 ++++++ .github/workflows/publish_alpha.yml | 72 +++++++++++++++++++++ .github/workflows/publish_build.yml | 76 +++++++++++++++++++++++ .github/workflows/publish_major.yml | 76 +++++++++++++++++++++++ .github/workflows/publish_minor.yml | 76 +++++++++++++++++++++++ jarbas_hive_mind/discovery/__init__.py | 1 - jarbas_hive_mind/discovery/ssdp.py | 1 - jarbas_hive_mind/discovery/upnp_server.py | 1 - jarbas_hive_mind/master/__init__.py | 2 - jarbas_hive_mind/nodes/slave.py | 2 +- jarbas_hive_mind/settings.py | 2 +- jarbas_hive_mind/slave/__init__.py | 2 - jarbas_hive_mind/slave/terminal.py | 2 - jarbas_hive_mind/version.py | 7 +++ scripts/bump_alpha.py | 18 ++++++ scripts/bump_build.py | 21 +++++++ scripts/bump_major.py | 27 ++++++++ scripts/bump_minor.py | 24 +++++++ scripts/remove_alpha.py | 13 ++++ setup.py | 60 +++++++++++++----- test/license_tests.py | 32 +++++----- 21 files changed, 489 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/dev2master.yml create mode 100644 .github/workflows/publish_alpha.yml create mode 100644 .github/workflows/publish_build.yml create mode 100644 .github/workflows/publish_major.yml create mode 100644 .github/workflows/publish_minor.yml delete mode 100644 jarbas_hive_mind/discovery/__init__.py delete mode 100644 jarbas_hive_mind/discovery/ssdp.py delete mode 100644 jarbas_hive_mind/discovery/upnp_server.py delete mode 100644 jarbas_hive_mind/master/__init__.py delete mode 100644 jarbas_hive_mind/slave/__init__.py delete mode 100644 jarbas_hive_mind/slave/terminal.py create mode 100644 jarbas_hive_mind/version.py create mode 100644 scripts/bump_alpha.py create mode 100644 scripts/bump_build.py create mode 100644 scripts/bump_major.py create mode 100644 scripts/bump_minor.py create mode 100644 scripts/remove_alpha.py diff --git a/.github/workflows/dev2master.yml b/.github/workflows/dev2master.yml new file mode 100644 index 0000000..5363b5e --- /dev/null +++ b/.github/workflows/dev2master.yml @@ -0,0 +1,18 @@ +name: Push dev -> master +on: + workflow_dispatch: + +jobs: + build_and_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + ref: dev + - name: Push dev -> master + uses: ad-m/github-push-action@master + + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: master \ No newline at end of file diff --git a/.github/workflows/publish_alpha.yml b/.github/workflows/publish_alpha.yml new file mode 100644 index 0000000..9571fe6 --- /dev/null +++ b/.github/workflows/publish_alpha.yml @@ -0,0 +1,72 @@ +# This workflow will generate a distribution and upload it to PyPI + +name: Publish Alpha Build ...aX +on: + push: + branches: + - dev + paths-ignore: + - 'jarbas_hive_mind/version.py' + - 'test/**' + - 'examples/**' + - '.github/**' + - '.gitignore' + - 'LICENSE' + - 'CHANGELOG.md' + - 'MANIFEST.in' + - 'readme.md' + - 'scripts/**' + workflow_dispatch: + +jobs: + build_and_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Build Tools + run: | + python -m pip install build wheel + - name: Increment Version + run: | + VER=$(python setup.py --version) + python scripts/bump_alpha.py + - name: "Generate release changelog" + uses: heinrichreimer/github-changelog-generator-action@v2.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + id: changelog + - name: Commit to dev + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Increment Version + branch: dev + - name: version + run: echo "::set-output name=version::$(python setup.py --version)" + id: version + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: V${{ steps.version.outputs.version }} + release_name: Release ${{ steps.version.outputs.version }} + body: | + Changes in this Release + ${{ steps.changelog.outputs.changelog }} + draft: false + prerelease: true + - name: Build Distribution Packages + run: | + python setup.py bdist_wheel + - name: Publish to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{secrets.PYPI_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/publish_build.yml b/.github/workflows/publish_build.yml new file mode 100644 index 0000000..9fdcd30 --- /dev/null +++ b/.github/workflows/publish_build.yml @@ -0,0 +1,76 @@ +# This workflow will generate a distribution and upload it to PyPI + +name: Publish Build Release ..X +on: + workflow_dispatch: + +jobs: + build_and_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Build Tools + run: | + python -m pip install build wheel + - name: Remove alpha (declare stable) + run: | + VER=$(python setup.py --version) + python scripts/remove_alpha.py + - name: "Generate release changelog" + uses: heinrichreimer/github-changelog-generator-action@v2.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + id: changelog + - name: Commit to dev + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Declare alpha stable + branch: dev + - name: Push dev -> master + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: master + force: true + - name: version + run: echo "::set-output name=version::$(python setup.py --version)" + id: version + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: V${{ steps.version.outputs.version }} + release_name: Release ${{ steps.version.outputs.version }} + body: | + Changes in this Release + ${{ steps.changelog.outputs.changelog }} + draft: false + prerelease: false + - name: Build Distribution Packages + run: | + python setup.py bdist_wheel + - name: Prepare next Build version + run: echo "::set-output name=version::$(python setup.py --version)" + id: alpha + - name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0 + run: | + VER=$(python setup.py --version) + python scripts/bump_build.py + - name: Commit to dev + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Prepare Next Version + branch: dev + - name: Publish to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{secrets.PYPI_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/publish_major.yml b/.github/workflows/publish_major.yml new file mode 100644 index 0000000..87cee86 --- /dev/null +++ b/.github/workflows/publish_major.yml @@ -0,0 +1,76 @@ +# This workflow will generate a distribution and upload it to PyPI + +name: Publish Major Release X.0.0 +on: + workflow_dispatch: + +jobs: + build_and_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Build Tools + run: | + python -m pip install build wheel + - name: Remove alpha (declare stable) + run: | + VER=$(python setup.py --version) + python scripts/remove_alpha.py + - name: "Generate release changelog" + uses: heinrichreimer/github-changelog-generator-action@v2.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + id: changelog + - name: Commit to dev + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Declare alpha stable + branch: dev + - name: Push dev -> master + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: master + force: true + - name: version + run: echo "::set-output name=version::$(python setup.py --version)" + id: version + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: V${{ steps.version.outputs.version }} + release_name: Release ${{ steps.version.outputs.version }} + body: | + Changes in this Release + ${{ steps.changelog.outputs.changelog }} + draft: false + prerelease: false + - name: Build Distribution Packages + run: | + python setup.py bdist_wheel + - name: Prepare next Major version + run: echo "::set-output name=version::$(python setup.py --version)" + id: alpha + - name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0 + run: | + VER=$(python setup.py --version) + python scripts/bump_major.py + - name: Commit to dev + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Prepare Next Version + branch: dev + - name: Publish to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{secrets.PYPI_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/publish_minor.yml b/.github/workflows/publish_minor.yml new file mode 100644 index 0000000..4e8b231 --- /dev/null +++ b/.github/workflows/publish_minor.yml @@ -0,0 +1,76 @@ +# This workflow will generate a distribution and upload it to PyPI + +name: Publish Minor Release .X.0 +on: + workflow_dispatch: + +jobs: + build_and_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Build Tools + run: | + python -m pip install build wheel + - name: Remove alpha (declare stable) + run: | + VER=$(python setup.py --version) + python scripts/remove_alpha.py + - name: "Generate release changelog" + uses: heinrichreimer/github-changelog-generator-action@v2.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + id: changelog + - name: Commit to dev + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Declare alpha stable + branch: dev + - name: Push dev -> master + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: master + force: true + - name: version + run: echo "::set-output name=version::$(python setup.py --version)" + id: version + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: V${{ steps.version.outputs.version }} + release_name: Release ${{ steps.version.outputs.version }} + body: | + Changes in this Release + ${{ steps.changelog.outputs.changelog }} + draft: false + prerelease: false + - name: Build Distribution Packages + run: | + python setup.py bdist_wheel + - name: Prepare next Minor version + run: echo "::set-output name=version::$(python setup.py --version)" + id: alpha + - name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0 + run: | + VER=$(python setup.py --version) + python scripts/bump_minor.py + - name: Commit to dev + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Prepare Next Version + branch: dev + - name: Publish to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{secrets.PYPI_TOKEN}} \ No newline at end of file diff --git a/jarbas_hive_mind/discovery/__init__.py b/jarbas_hive_mind/discovery/__init__.py deleted file mode 100644 index adf8831..0000000 --- a/jarbas_hive_mind/discovery/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from HiveMind_presence import * \ No newline at end of file diff --git a/jarbas_hive_mind/discovery/ssdp.py b/jarbas_hive_mind/discovery/ssdp.py deleted file mode 100644 index f00bc73..0000000 --- a/jarbas_hive_mind/discovery/ssdp.py +++ /dev/null @@ -1 +0,0 @@ -from HiveMind_presence.ssdp import * diff --git a/jarbas_hive_mind/discovery/upnp_server.py b/jarbas_hive_mind/discovery/upnp_server.py deleted file mode 100644 index bfb2cd5..0000000 --- a/jarbas_hive_mind/discovery/upnp_server.py +++ /dev/null @@ -1 +0,0 @@ -from HiveMind_presence.upnp_server import * diff --git a/jarbas_hive_mind/master/__init__.py b/jarbas_hive_mind/master/__init__.py deleted file mode 100644 index ffa6fdd..0000000 --- a/jarbas_hive_mind/master/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from jarbas_hive_mind.nodes.master import * -# backwards compat import \ No newline at end of file diff --git a/jarbas_hive_mind/nodes/slave.py b/jarbas_hive_mind/nodes/slave.py index 24b60ad..8370f43 100644 --- a/jarbas_hive_mind/nodes/slave.py +++ b/jarbas_hive_mind/nodes/slave.py @@ -1,4 +1,4 @@ -from jarbas_hive_mind.slave.terminal import HiveMindTerminal, \ +from jarbas_hive_mind.nodes.terminal import HiveMindTerminal, \ HiveMindTerminalProtocol from jarbas_hive_mind.message import HiveMessageType, HiveMessage from jarbas_hive_mind.nodes import HiveMindNodeType diff --git a/jarbas_hive_mind/settings.py b/jarbas_hive_mind/settings.py index 23aa50e..550a0c7 100644 --- a/jarbas_hive_mind/settings.py +++ b/jarbas_hive_mind/settings.py @@ -1,5 +1,5 @@ from os import makedirs -from os.path import isdir, join, expanduser +from os.path import isdir, join from ovos_utils.xdg_utils import xdg_data_home DATA_PATH = join(xdg_data_home(), "jarbasHiveMind") diff --git a/jarbas_hive_mind/slave/__init__.py b/jarbas_hive_mind/slave/__init__.py deleted file mode 100644 index 6e5a250..0000000 --- a/jarbas_hive_mind/slave/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from jarbas_hive_mind.nodes.slave import * -# backwards compat \ No newline at end of file diff --git a/jarbas_hive_mind/slave/terminal.py b/jarbas_hive_mind/slave/terminal.py deleted file mode 100644 index 5dd63a7..0000000 --- a/jarbas_hive_mind/slave/terminal.py +++ /dev/null @@ -1,2 +0,0 @@ -from jarbas_hive_mind.nodes.terminal import * -# backwards compat diff --git a/jarbas_hive_mind/version.py b/jarbas_hive_mind/version.py new file mode 100644 index 0000000..4c6b356 --- /dev/null +++ b/jarbas_hive_mind/version.py @@ -0,0 +1,7 @@ +# The following lines are replaced during the release process. +# START_VERSION_BLOCK +VERSION_MAJOR = 0 +VERSION_MINOR = 11 +VERSION_BUILD = 0 +VERSION_ALPHA = 1 +# END_VERSION_BLOCK diff --git a/scripts/bump_alpha.py b/scripts/bump_alpha.py new file mode 100644 index 0000000..085d1d6 --- /dev/null +++ b/scripts/bump_alpha.py @@ -0,0 +1,18 @@ +import fileinput +from os.path import join, dirname + + +version_file = join(dirname(dirname(__file__)), "jarbas_hive_mind", "version.py") +version_var_name = "VERSION_ALPHA" + +with open(version_file, "r", encoding="utf-8") as v: + for line in v.readlines(): + if line.startswith(version_var_name): + version = int(line.split("=")[-1]) + new_version = int(version) + 1 + +for line in fileinput.input(version_file, inplace=True): + if line.startswith(version_var_name): + print(f"{version_var_name} = {new_version}") + else: + print(line.rstrip('\n')) diff --git a/scripts/bump_build.py b/scripts/bump_build.py new file mode 100644 index 0000000..9cd6815 --- /dev/null +++ b/scripts/bump_build.py @@ -0,0 +1,21 @@ +import fileinput +from os.path import join, dirname + + +version_file = join(dirname(dirname(__file__)), "jarbas_hive_mind", "version.py") +version_var_name = "VERSION_BUILD" +alpha_var_name = "VERSION_ALPHA" + +with open(version_file, "r", encoding="utf-8") as v: + for line in v.readlines(): + if line.startswith(version_var_name): + version = int(line.split("=")[-1]) + new_version = int(version) + 1 + +for line in fileinput.input(version_file, inplace=True): + if line.startswith(version_var_name): + print(f"{version_var_name} = {new_version}") + elif line.startswith(alpha_var_name): + print(f"{alpha_var_name} = 0") + else: + print(line.rstrip('\n')) diff --git a/scripts/bump_major.py b/scripts/bump_major.py new file mode 100644 index 0000000..112b617 --- /dev/null +++ b/scripts/bump_major.py @@ -0,0 +1,27 @@ +import fileinput +from os.path import join, dirname + + +version_file = join(dirname(dirname(__file__)), "jarbas_hive_mind", "version.py") +version_var_name = "VERSION_MAJOR" +minor_var_name = "VERSION_MINOR" +build_var_name = "VERSION_BUILD" +alpha_var_name = "VERSION_ALPHA" + +with open(version_file, "r", encoding="utf-8") as v: + for line in v.readlines(): + if line.startswith(version_var_name): + version = int(line.split("=")[-1]) + new_version = int(version) + 1 + +for line in fileinput.input(version_file, inplace=True): + if line.startswith(version_var_name): + print(f"{version_var_name} = {new_version}") + elif line.startswith(minor_var_name): + print(f"{minor_var_name} = 0") + elif line.startswith(build_var_name): + print(f"{build_var_name} = 0") + elif line.startswith(alpha_var_name): + print(f"{alpha_var_name} = 0") + else: + print(line.rstrip('\n')) diff --git a/scripts/bump_minor.py b/scripts/bump_minor.py new file mode 100644 index 0000000..7b76fc3 --- /dev/null +++ b/scripts/bump_minor.py @@ -0,0 +1,24 @@ +import fileinput +from os.path import join, dirname + + +version_file = join(dirname(dirname(__file__)), "jarbas_hive_mind", "version.py") +version_var_name = "VERSION_MINOR" +build_var_name = "VERSION_BUILD" +alpha_var_name = "VERSION_ALPHA" + +with open(version_file, "r", encoding="utf-8") as v: + for line in v.readlines(): + if line.startswith(version_var_name): + version = int(line.split("=")[-1]) + new_version = int(version) + 1 + +for line in fileinput.input(version_file, inplace=True): + if line.startswith(version_var_name): + print(f"{version_var_name} = {new_version}") + elif line.startswith(build_var_name): + print(f"{build_var_name} = 0") + elif line.startswith(alpha_var_name): + print(f"{alpha_var_name} = 0") + else: + print(line.rstrip('\n')) diff --git a/scripts/remove_alpha.py b/scripts/remove_alpha.py new file mode 100644 index 0000000..a273a74 --- /dev/null +++ b/scripts/remove_alpha.py @@ -0,0 +1,13 @@ +import fileinput +from os.path import join, dirname + + +version_file = join(dirname(dirname(__file__)), "jarbas_hive_mind", "version.py") + +alpha_var_name = "VERSION_ALPHA" + +for line in fileinput.input(version_file, inplace=True): + if line.startswith(alpha_var_name): + print(f"{alpha_var_name} = 0") + else: + print(line.rstrip('\n')) diff --git a/setup.py b/setup.py index 8590941..38e4020 100644 --- a/setup.py +++ b/setup.py @@ -1,27 +1,56 @@ +import os from setuptools import setup +BASEDIR = os.path.abspath(os.path.dirname(__file__)) + + +def get_version(): + """ Find the version of the package""" + version = None + version_file = os.path.join(BASEDIR, 'jarbas_hive_mind', 'version.py') + major, minor, build, alpha = (None, None, None, None) + with open(version_file) as f: + for line in f: + if 'VERSION_MAJOR' in line: + major = line.split('=')[1].strip() + elif 'VERSION_MINOR' in line: + minor = line.split('=')[1].strip() + elif 'VERSION_BUILD' in line: + build = line.split('=')[1].strip() + elif 'VERSION_ALPHA' in line: + alpha = line.split('=')[1].strip() + + if ((major and minor and build and alpha) or + '# END_VERSION_BLOCK' in line): + break + version = f"{major}.{minor}.{build}" + if alpha: + version += f"a{alpha}" + return version + + +def required(requirements_file): + """ Read requirements file and remove comments and empty lines. """ + with open(os.path.join(BASEDIR, requirements_file), 'r') as f: + requirements = f.read().splitlines() + if 'MYCROFT_LOOSE_REQUIREMENTS' in os.environ: + print('USING LOOSE REQUIREMENTS!') + requirements = [r.replace('==', '>=').replace('~=', '>=') for r in requirements] + return [pkg for pkg in requirements + if pkg.strip() and not pkg.startswith("#")] + + setup( name='jarbas_hive_mind', - version='0.10.9', + version=get_version(), packages=['jarbas_hive_mind', 'jarbas_hive_mind.backends', 'jarbas_hive_mind.nodes', 'jarbas_hive_mind.configuration', 'jarbas_hive_mind.database', - 'jarbas_hive_mind.utils', - 'jarbas_hive_mind.discovery', - # below are deprecated, backwards compat only - 'jarbas_hive_mind.master', - 'jarbas_hive_mind.slave'], + 'jarbas_hive_mind.utils'], include_package_data=True, - install_requires=["pyopenssl", - "service_identity", - "autobahn", - "mycroft-messagebus-client>=0.9.1", - "ovos_utils>=0.0.17", - "json_database>=0.2.6", - "pycryptodomex", - "HiveMind_presence~=0.0.2a2"], + install_requires=required("requirements.txt"), url='https://github.com/JarbasAl/hive_mind', license='MIT', author='jarbasAI', @@ -29,8 +58,7 @@ description='Mesh Networking utilities for mycroft core', entry_points={ 'console_scripts': [ - 'HiveMind-server=jarbas_hive_mind.__main__:main', - 'HiveMind-database=jarbas_hive_mind.database.__main__:main' + 'HiveMind-listen=jarbas_hive_mind.__main__:main' ] } ) diff --git a/test/license_tests.py b/test/license_tests.py index 287578b..9acd600 100644 --- a/test/license_tests.py +++ b/test/license_tests.py @@ -11,11 +11,11 @@ 'pyxdg': 'GPL-2.0', 'ptyprocess': 'ISC', 'psutil': 'BSD3', - 'setuptools': "MIT", - 'typing-extensions': "PSFL" + 'setuptools': "MIT" } # explicitly allow these packages that would fail otherwise whitelist = [ + 'typing-extensions', # PSFL 'idna', # BSD-like 'python-dateutil', # 'Simplified BSD' 'cryptography', # 'BSD or Apache License, Version 2.0', @@ -33,24 +33,22 @@ class TestLicensing(unittest.TestCase): - @classmethod - def setUpClass(self): - licheck = LicenseChecker(pkg_name, - license_overrides=license_overrides, - whitelisted_packages=whitelist, - allow_ambiguous=allow_ambiguous, - allow_unlicense=allow_unlicense, - allow_unknown=allow_unknown, - allow_viral=allow_viral, - allow_nonfree=allow_nonfree) + licheck = LicenseChecker(pkg_name, + license_overrides=license_overrides, + whitelisted_packages=whitelist, + allow_ambiguous=allow_ambiguous, + allow_unlicense=allow_unlicense, + allow_unknown=allow_unknown, + allow_viral=allow_viral, + allow_nonfree=allow_nonfree) + + def test_license_compliance(self): print("Package", pkg_name) - print("Version", licheck.version) - print("License", licheck.license) + print("Version", self.licheck.version) + print("License", self.licheck.license) print("Transient Requirements (dependencies of dependencies)") - pprint(licheck.transient_dependencies) - self.licheck = licheck + pprint(self.licheck.transient_dependencies) - def test_license_compliance(self): print("Package Versions") pprint(self.licheck.versions)