From 4a7d47355f32b8794b81d2ebd38d665e6be54df9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 17:04:12 +0000 Subject: [PATCH 01/13] build(deps-dev): bump pytest-cov from 2.12.1 to 3.0.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.12.1 to 3.0.0. - [Release notes](https://github.com/pytest-dev/pytest-cov/releases) - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.12.1...v3.0.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .circleci/config.yml | 134 ------------------ .github/workflows/aggreements.yaml | 58 ++++++++ .github/workflows/build-test-release.yml | 172 +++++++++++++++++++++++ .github/workflows/sr-prepare.sh | 7 + .github/workflows/sr-release.sh | 7 + .releaserc | 79 +++++++++++ .releaserc.yaml | 11 -- poetry.lock | 121 ++++++++-------- pyproject.toml | 2 +- 9 files changed, 383 insertions(+), 208 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/aggreements.yaml create mode 100644 .github/workflows/build-test-release.yml create mode 100644 .github/workflows/sr-prepare.sh create mode 100644 .github/workflows/sr-release.sh create mode 100644 .releaserc delete mode 100644 .releaserc.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 84c69c2..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,134 +0,0 @@ -version: 2.1 - -orbs: - python: circleci/python@0.2.1 - -executors: - linux: - machine: - image: ubuntu-1604:201903-01 -jobs: - build: - docker: - - image: circleci/python:3.7 - steps: - - checkout - - restore_cache: - keys: - - poetry-cache-{{ checksum "poetry.lock" }} - - run: - name: Install Tools - command: | - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - - run: - name: Build - command: | - source $HOME/.poetry/env - poetry install - poetry run poetry-dynamic-versioning - poetry build - - save_cache: - key: poetry-cache-{{ checksum "poetry.lock" }} - paths: - - ~/.cache/pypoetry - - store_artifacts: - path: dist - - store_artifacts: - path: output - - persist_to_workspace: - # Must be an absolute path, or relative path from working_directory. This is a directory on the container which is - # taken to be the root directory of the workspace. - root: . - # Must be relative path from root - paths: - - dist - - output - - semgrep: - environment: - SEMGREP_REPO_URL: << pipeline.project.git_url >> - SEMGREP_BRANCH: << pipeline.git.branch >> - docker: - - image: returntocorp/semgrep-agent:v1 - user: root - steps: - - checkout - - run: - name: "Install Dependencies" - command: | - pip3 install --upgrade semgrep - - run: - name: "Semgrep Scan" - no_output_timeout: 1h - command: | - export SEMGREP_REPO_NAME=splunk/${CIRCLE_PROJECT_REPONAME} - python -m semgrep_agent --publish-deployment ${SEMGREP_DEPLOYMENT_ID} --publish-token ${SEMGREP_PUBLISH_TOKEN} - # Generate the Semgrep Dashboard URL - export REPO_BRANCH=$(echo "<< pipeline.git.branch >>") - DASHBOARD_URL=$(python3 -c "from urllib.parse import quote; import os; print('https://semgrep.dev/manage/findings?repo=' + quote(os.environ['SEMGREP_REPO_NAME'], safe='') + '&tab=findings&ref_type=branch&ref=' + quote(os.environ['REPO_BRANCH'], safe=''))") - echo "View Result at Semgrep Dashboard: $DASHBOARD_URL" - - # Semgrep Exclude files - dos2unix .semgrepignore - SEMGREP_EXCLUDE=$(sed "/^#/d" .semgrepignore | sed "/^:/d" | sed -r '/^\s*$/d' | sed ':a;N;$!ba;s/\n/ --exclude /g') - echo "Excluding Semgrep Files: --exclude $SEMGREP_EXCLUDE" - # Generate xml file - semgrep --config="p/r2c-ci" --config="p/r2c-security-audit" --config="p/bandit" --error --strict --timeout=0 --junit-xml -o /root/project/test-results/semgrep-scan.xml --exclude $SEMGREP_EXCLUDE - - store_artifacts: - path: test-results - destination: test-results - - store_test_results: - path: test-results - - release: - docker: - - image: circleci/node:14 - steps: - - checkout - - run: npx semantic-release - - publish-pypi: - docker: - - image: circleci/python:3.7 - steps: - - checkout - - restore_cache: - keys: - - poetry-cache-{{ checksum "poetry.lock" }} - - run: - name: Install Tools - command: | - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - - run: - name: Build - command: | - source $HOME/.poetry/env - poetry install - poetry run poetry-dynamic-versioning - poetry publish --build -u ${PYPI_USERNAME} -p ${PYPI_TOKEN} - -workflows: - main: - jobs: - - build - - semgrep: - context: - - gdi-semgrep - filters: - branches: - only: /.*/ - - release: - context: - - gdi-github - requires: - - build - publish: - jobs: - - publish-pypi: - context: - - gdi-pypi - filters: - branches: - ignore: /.*/ - tags: - only: /^v\d*\.\d*\.\d*.*$/ diff --git a/.github/workflows/aggreements.yaml b/.github/workflows/aggreements.yaml new file mode 100644 index 0000000..8056ddf --- /dev/null +++ b/.github/workflows/aggreements.yaml @@ -0,0 +1,58 @@ +name: "CLA Assistant" +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened, closed, synchronize] + +jobs: + ContributorLicenseAgreement: + runs-on: ubuntu-latest + steps: + - name: "CLA Assistant" + if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' + # Alpha Release + uses: cla-assistant/github-action@v2.1.3-beta + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # the below token should have repo scope and must be manually added by you in the repository's secret + PERSONAL_ACCESS_TOKEN: ${{ secrets.PAT_CLATOOL }} + with: + path-to-signatures: "signatures/version1/cla.json" + path-to-document: "https://github.com/splunk/cla-agreement/blob/main/CLA.md" # e.g. a CLA or a DCO document + # branch should not be protected + branch: "main" + allowlist: dependabot[bot] + #below are the optional inputs - If the optional inputs are not given, then default values will be taken + remote-organization-name: splunk + remote-repository-name: cla-agreement + #create-file-commit-message: 'For example: Creating file for storing CLA Signatures' + #signed-commit-messag e: 'For example: $contributorName has signed the CLA in #$pullRequestNo' + #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign' + #custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA' + #custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.' + CodeOfConduct: + runs-on: ubuntu-latest + steps: + - name: "COC Assistant" + if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the Code of Conduct and I hereby accept the Terms') || github.event_name == 'pull_request_target' + # Alpha Release + uses: cla-assistant/github-action@v2.1.3-beta + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # the below token should have repo scope and must be manually added by you in the repository's secret + PERSONAL_ACCESS_TOKEN: ${{ secrets.PAT_CLATOOL }} + with: + path-to-signatures: "signatures/version1/coc.json" + path-to-document: "https://github.com/splunk/cla-agreement/blob/main/CODE_OF_CONDUCT.md" # e.g. a COC or a DCO document + # branch should not be protected + branch: "main" + allowlist: dependabot[bot] + #below are the optional inputs - If the optional inputs are not given, then default values will be taken + remote-organization-name: splunk + remote-repository-name: cla-agreement + custom-pr-sign-comment: "I have read the Code of Conduct and I hereby accept the Terms" + create-file-commit-message: "For example: Creating file for storing COC Signatures" + signed-commit-message: "$contributorName has signed the COC in #$pullRequestNo" + custom-notsigned-prcomment: "All contributors have NOT signed the COC Document" + custom-allsigned-prcomment: "****CLA Assistant Lite bot**** All contributors have signed the COC ✍️ ✅" diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml new file mode 100644 index 0000000..eb31223 --- /dev/null +++ b/.github/workflows/build-test-release.yml @@ -0,0 +1,172 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: + - "github-action-migration" + tags: + - "v[0-9]+.[0-9]+.[0-9]+" +jobs: + compliance-dependencies: + name: Compliance Dependencies + # The type of runner that the job will run on + runs-on: ubuntu-latest + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: ort-action + uses: splunk/addonfactory-ort-action@v1 + id: ort-action + with: + WorkDir: . + UsePython3: "3.7" + - name: ort-action-artifacts-reports + uses: actions/upload-artifact@v2 + with: + name: analysis-reports + path: | + .ort/reports/* + if: always() + - name: ort-action-artifacts-analyzer + uses: actions/upload-artifact@v2 + with: + name: analysis-analyzer + path: | + .ort/analyzer/* + if: always() + + compliance-copyrights: + name: Compliance Copyright Headers + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Check License Header + uses: apache/skywalking-eyes@main # always prefer to use a revision instead of `main`. + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # needed only when you want License-Eye to comment on the pull request. + + lint: + runs-on: ubuntu-latest + name: quality-lint + steps: + - uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + - name: quality-lint + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FILTER_REGEX_EXCLUDE: README.md + + semgrep: + runs-on: ubuntu-latest + name: security-sast-semgrep + steps: + - uses: actions/checkout@v2 + - name: Semgrep + id: semgrep + uses: returntocorp/semgrep-action@v1 + with: + publishDeployment: ${{ secrets.SEMGREP_DEPLOYMENT_ID }} + publishToken: ${{ secrets.SEMGREP_PUBLISH_TOKEN }} + + snyk: + name: security-vuln-snyk + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - uses: snyk/actions/setup@master + - uses: actions/setup-go@v2.1.3 + with: + go-version: "1.13" + - name: Snyk monitor + run: snyk test --sarif-file-output=snyk-scan_requirements.sarif --all-projects --print-deps --severity-threshold=high + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + - uses: actions/upload-artifact@v2 + if: always() + with: + name: snyk-results + path: snyk-scan_requirements.sarif + + build: + name: Build + runs-on: ubuntu-latest + needs: + - compliance-dependencies + steps: + - uses: actions/checkout@v2 + with: + # Very Important semantic-release won't trigger a tagged + # build if this is not set false + persist-credentials: false + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: "3.7" + - name: Install Poetry + run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - + - name: Build + run: | + # shellcheck disable=SC1090 + source "$HOME/.poetry/env" + poetry build + - uses: actions/upload-artifact@v2 + if: always() + with: + name: Package + path: dist/ + + publish: + if: always() + needs: + - compliance-dependencies + - compliance-copyrights + - lint + - semgrep + - snyk + - build + runs-on: ubuntu-latest + steps: + - name: exit without publish if PR + if: github.event_name == 'pull_request' + run: | + exit 1 + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: false + persist-credentials: false + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v2.5.4 + with: + semantic_version: 17 + extra_plugins: | + @semantic-release/exec + @semantic-release/git + @google/semantic-release-replace-plugin + env: + GITHUB_TOKEN: ${{ secrets.SEMREL_TOKEN }} + PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + update-semver: + name: Move Respository semver tags + if: startsWith(github.ref, 'refs/tags/v') + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: haya14busa/action-update-semver@v1 \ No newline at end of file diff --git a/.github/workflows/sr-prepare.sh b/.github/workflows/sr-prepare.sh new file mode 100644 index 0000000..cc9e0e0 --- /dev/null +++ b/.github/workflows/sr-prepare.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -eE +set -v +# shellcheck disable=SC1091,SC2086 +source $HOME/.poetry/env +poetry build \ No newline at end of file diff --git a/.github/workflows/sr-release.sh b/.github/workflows/sr-release.sh new file mode 100644 index 0000000..1367c6c --- /dev/null +++ b/.github/workflows/sr-release.sh @@ -0,0 +1,7 @@ +!/usr/bin/env bash + +set -eE +set -v +source $HOME/.poetry/env +echo pypy user=${PYPI_USERNAME} +poetry publish -n -u ${PYPI_USERNAME} -p ${PYPI_TOKEN} \ No newline at end of file diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..172904b --- /dev/null +++ b/.releaserc @@ -0,0 +1,79 @@ +# +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{ + branches: + [ + "+([0-9])?(.{+([0-9]),x}).x", + "main", + { name: "develop", prerelease: "beta", channel: "beta" }, + ], + plugins: + [ + "@semantic-release/commit-analyzer", + [ + "@google/semantic-release-replace-plugin", + { + "replacements": [ + { + "files": ["splunktaucclib/__init__.py"], + "from": "__version__ ?=.*", + "to": "__version__ = \"${nextRelease.version}\"", + "results": [ + { + "file": "splunktaucclib/__init__.py", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + }, + { + "files": ["pyproject.toml"], + "from": "version ?=.*", + "to": "version = \"${nextRelease.version}\"", + "results": [ + { + "file": "pyproject.toml", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + } + ] + } + ], + "@semantic-release/release-notes-generator", + [ + "@semantic-release/exec", + { + "prepareCmd": "./.github/workflows/sr-prepare.sh ${nextRelease.version}", + "publishCmd": "./.github/workflows/sr-release.sh", + "shell": "bash" + }, + ], + [ + "@semantic-release/git", + { + "assets": ["NOTICE", "pyproject.toml", "splunktaucclib/__init__.py"], + "message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}", + }, + ], + ["@semantic-release/github", { "assets": ["NOTICE", "pyproject.toml"] }], + ], +} \ No newline at end of file diff --git a/.releaserc.yaml b/.releaserc.yaml deleted file mode 100644 index 1a2b1c2..0000000 --- a/.releaserc.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -branches: - - "+([0-9])?(.{+([0-9]),x}).x" - - main - - name: develop - channel: beta - prerelease: true -plugins: - - "@semantic-release/commit-analyzer" - - "@semantic-release/release-notes-generator" - - "@semantic-release/github" diff --git a/poetry.lock b/poetry.lock index f678ff4..21320ea 100644 --- a/poetry.lock +++ b/poetry.lock @@ -99,14 +99,17 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "coverage" -version = "5.5" +version = "6.0" description = "Code coverage measurement for Python" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +python-versions = ">=3.6" + +[package.dependencies] +tomli = {version = "*", optional = true, markers = "extra == \"toml\""} [package.extras] -toml = ["toml"] +toml = ["tomli"] [[package]] name = "defusedxml" @@ -347,16 +350,15 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "pytest-cov" -version = "2.12.1" +version = "3.0.0" description = "Pytest plugin for measuring coverage." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" [package.dependencies] -coverage = ">=5.2.1" +coverage = {version = ">=5.2.1", extras = ["toml"]} pytest = ">=4.6" -toml = "*" [package.extras] testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] @@ -485,6 +487,14 @@ category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "tomli" +version = "1.2.1" +description = "A lil' TOML parser" +category = "dev" +optional = false +python-versions = ">=3.6" + [[package]] name = "tomlkit" version = "0.7.2" @@ -557,7 +567,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "06823811847b21586805436e08a8f4b063714dcdf179d32f9f26bd90f3ba8bc6" +content-hash = "2e1fe7b6313673d9d557f73689858d4276bc5ece8673cad9352819808ba79e69" [metadata.files] atomicwrites = [ @@ -601,58 +611,41 @@ colorama = [ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] coverage = [ - {file = "coverage-5.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:b6d534e4b2ab35c9f93f46229363e17f63c53ad01330df9f2d6bd1187e5eaacf"}, - {file = "coverage-5.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:b7895207b4c843c76a25ab8c1e866261bcfe27bfaa20c192de5190121770672b"}, - {file = "coverage-5.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:c2723d347ab06e7ddad1a58b2a821218239249a9e4365eaff6649d31180c1669"}, - {file = "coverage-5.5-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:900fbf7759501bc7807fd6638c947d7a831fc9fdf742dc10f02956ff7220fa90"}, - {file = "coverage-5.5-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:004d1880bed2d97151facef49f08e255a20ceb6f9432df75f4eef018fdd5a78c"}, - {file = "coverage-5.5-cp27-cp27m-win32.whl", hash = "sha256:06191eb60f8d8a5bc046f3799f8a07a2d7aefb9504b0209aff0b47298333302a"}, - {file = "coverage-5.5-cp27-cp27m-win_amd64.whl", hash = "sha256:7501140f755b725495941b43347ba8a2777407fc7f250d4f5a7d2a1050ba8e82"}, - {file = "coverage-5.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:372da284cfd642d8e08ef606917846fa2ee350f64994bebfbd3afb0040436905"}, - {file = "coverage-5.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:8963a499849a1fc54b35b1c9f162f4108017b2e6db2c46c1bed93a72262ed083"}, - {file = "coverage-5.5-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:869a64f53488f40fa5b5b9dcb9e9b2962a66a87dab37790f3fcfb5144b996ef5"}, - {file = "coverage-5.5-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:4a7697d8cb0f27399b0e393c0b90f0f1e40c82023ea4d45d22bce7032a5d7b81"}, - {file = "coverage-5.5-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:8d0a0725ad7c1a0bcd8d1b437e191107d457e2ec1084b9f190630a4fb1af78e6"}, - {file = "coverage-5.5-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:51cb9476a3987c8967ebab3f0fe144819781fca264f57f89760037a2ea191cb0"}, - {file = "coverage-5.5-cp310-cp310-win_amd64.whl", hash = "sha256:c0891a6a97b09c1f3e073a890514d5012eb256845c451bd48f7968ef939bf4ae"}, - {file = "coverage-5.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:3487286bc29a5aa4b93a072e9592f22254291ce96a9fbc5251f566b6b7343cdb"}, - {file = "coverage-5.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:deee1077aae10d8fa88cb02c845cfba9b62c55e1183f52f6ae6a2df6a2187160"}, - {file = "coverage-5.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f11642dddbb0253cc8853254301b51390ba0081750a8ac03f20ea8103f0c56b6"}, - {file = "coverage-5.5-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:6c90e11318f0d3c436a42409f2749ee1a115cd8b067d7f14c148f1ce5574d701"}, - {file = "coverage-5.5-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:30c77c1dc9f253283e34c27935fded5015f7d1abe83bc7821680ac444eaf7793"}, - {file = "coverage-5.5-cp35-cp35m-win32.whl", hash = "sha256:9a1ef3b66e38ef8618ce5fdc7bea3d9f45f3624e2a66295eea5e57966c85909e"}, - {file = "coverage-5.5-cp35-cp35m-win_amd64.whl", hash = "sha256:972c85d205b51e30e59525694670de6a8a89691186012535f9d7dbaa230e42c3"}, - {file = "coverage-5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:af0e781009aaf59e25c5a678122391cb0f345ac0ec272c7961dc5455e1c40066"}, - {file = "coverage-5.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:74d881fc777ebb11c63736622b60cb9e4aee5cace591ce274fb69e582a12a61a"}, - {file = "coverage-5.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:92b017ce34b68a7d67bd6d117e6d443a9bf63a2ecf8567bb3d8c6c7bc5014465"}, - {file = "coverage-5.5-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d636598c8305e1f90b439dbf4f66437de4a5e3c31fdf47ad29542478c8508bbb"}, - {file = "coverage-5.5-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:41179b8a845742d1eb60449bdb2992196e211341818565abded11cfa90efb821"}, - {file = "coverage-5.5-cp36-cp36m-win32.whl", hash = "sha256:040af6c32813fa3eae5305d53f18875bedd079960822ef8ec067a66dd8afcd45"}, - {file = "coverage-5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:5fec2d43a2cc6965edc0bb9e83e1e4b557f76f843a77a2496cbe719583ce8184"}, - {file = "coverage-5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:18ba8bbede96a2c3dde7b868de9dcbd55670690af0988713f0603f037848418a"}, - {file = "coverage-5.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:2910f4d36a6a9b4214bb7038d537f015346f413a975d57ca6b43bf23d6563b53"}, - {file = "coverage-5.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f0b278ce10936db1a37e6954e15a3730bea96a0997c26d7fee88e6c396c2086d"}, - {file = "coverage-5.5-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:796c9c3c79747146ebd278dbe1e5c5c05dd6b10cc3bcb8389dfdf844f3ead638"}, - {file = "coverage-5.5-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:53194af30d5bad77fcba80e23a1441c71abfb3e01192034f8246e0d8f99528f3"}, - {file = "coverage-5.5-cp37-cp37m-win32.whl", hash = "sha256:184a47bbe0aa6400ed2d41d8e9ed868b8205046518c52464fde713ea06e3a74a"}, - {file = "coverage-5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:2949cad1c5208b8298d5686d5a85b66aae46d73eec2c3e08c817dd3513e5848a"}, - {file = "coverage-5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:217658ec7187497e3f3ebd901afdca1af062b42cfe3e0dafea4cced3983739f6"}, - {file = "coverage-5.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1aa846f56c3d49205c952d8318e76ccc2ae23303351d9270ab220004c580cfe2"}, - {file = "coverage-5.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:24d4a7de75446be83244eabbff746d66b9240ae020ced65d060815fac3423759"}, - {file = "coverage-5.5-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:d1f8bf7b90ba55699b3a5e44930e93ff0189aa27186e96071fac7dd0d06a1873"}, - {file = "coverage-5.5-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:970284a88b99673ccb2e4e334cfb38a10aab7cd44f7457564d11898a74b62d0a"}, - {file = "coverage-5.5-cp38-cp38-win32.whl", hash = "sha256:01d84219b5cdbfc8122223b39a954820929497a1cb1422824bb86b07b74594b6"}, - {file = "coverage-5.5-cp38-cp38-win_amd64.whl", hash = "sha256:2e0d881ad471768bf6e6c2bf905d183543f10098e3b3640fc029509530091502"}, - {file = "coverage-5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d1f9ce122f83b2305592c11d64f181b87153fc2c2bbd3bb4a3dde8303cfb1a6b"}, - {file = "coverage-5.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:13c4ee887eca0f4c5a247b75398d4114c37882658300e153113dafb1d76de529"}, - {file = "coverage-5.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:52596d3d0e8bdf3af43db3e9ba8dcdaac724ba7b5ca3f6358529d56f7a166f8b"}, - {file = "coverage-5.5-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:2cafbbb3af0733db200c9b5f798d18953b1a304d3f86a938367de1567f4b5bff"}, - {file = "coverage-5.5-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:44d654437b8ddd9eee7d1eaee28b7219bec228520ff809af170488fd2fed3e2b"}, - {file = "coverage-5.5-cp39-cp39-win32.whl", hash = "sha256:d314ed732c25d29775e84a960c3c60808b682c08d86602ec2c3008e1202e3bb6"}, - {file = "coverage-5.5-cp39-cp39-win_amd64.whl", hash = "sha256:13034c4409db851670bc9acd836243aeee299949bd5673e11844befcb0149f03"}, - {file = "coverage-5.5-pp36-none-any.whl", hash = "sha256:f030f8873312a16414c0d8e1a1ddff2d3235655a2174e3648b4fa66b3f2f1079"}, - {file = "coverage-5.5-pp37-none-any.whl", hash = "sha256:2a3859cb82dcbda1cfd3e6f71c27081d18aa251d20a17d87d26d4cd216fb0af4"}, - {file = "coverage-5.5.tar.gz", hash = "sha256:ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"}, + {file = "coverage-6.0-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:3dfb23cc180b674a11a559183dff9655beb9da03088f3fe3c4f3a6d200c86f05"}, + {file = "coverage-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5dd5ae0a9cd55d71f1335c331e9625382239b8cede818fb62d8d2702336dbf8"}, + {file = "coverage-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8426fec5ad5a6e8217921716b504e9b6e1166dc147e8443b4855e329db686282"}, + {file = "coverage-6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:aa5d4d43fa18cc9d0c6e02a83de0b9729b5451a9066574bd276481474f0a53ab"}, + {file = "coverage-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b78dd3eeb8f5ff26d2113c41836bac04a9ea91be54c346826b54a373133c8c53"}, + {file = "coverage-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:581fddd2f883379bd5af51da9233e0396b6519f3d3eeae4fb88867473be6d56e"}, + {file = "coverage-6.0-cp310-cp310-win32.whl", hash = "sha256:43bada49697a62ffa0283c7f01bbc76aac562c37d4bb6c45d56dd008d841194e"}, + {file = "coverage-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:fa816e97cfe1f691423078dffa39a18106c176f28008db017b3ce3e947c34aa5"}, + {file = "coverage-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:5c191e01b23e760338f19d8ba2470c0dad44c8b45e41ac043b2db84efc62f695"}, + {file = "coverage-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:274a612f67f931307706b60700f1e4cf80e1d79dff6c282fc9301e4565e78724"}, + {file = "coverage-6.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a9dbfcbc56d8de5580483cf2caff6a59c64d3e88836cbe5fb5c20c05c29a8808"}, + {file = "coverage-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e63490e8a6675cee7a71393ee074586f7eeaf0e9341afd006c5d6f7eec7c16d7"}, + {file = "coverage-6.0-cp36-cp36m-win32.whl", hash = "sha256:72f8c99f1527c5a8ee77c890ea810e26b39fd0b4c2dffc062e20a05b2cca60ef"}, + {file = "coverage-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:88f1810eb942e7063d051d87aaaa113eb5fd5a7fd2cda03a972de57695b8bb1a"}, + {file = "coverage-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:befb5ffa9faabef6dadc42622c73de168001425258f0b7e402a2934574e7a04b"}, + {file = "coverage-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7dbda34e8e26bd86606ba8a9c13ccb114802e01758a3d0a75652ffc59a573220"}, + {file = "coverage-6.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:b4ee5815c776dfa3958ba71c7cd4cdd8eb40d79358a18352feb19562fe4408c4"}, + {file = "coverage-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d82cbef1220703ce56822be7fbddb40736fc1a928ac893472df8aff7421ae0aa"}, + {file = "coverage-6.0-cp37-cp37m-win32.whl", hash = "sha256:d795a2c92fe8cb31f6e9cd627ee4f39b64eb66bf47d89d8fcf7cb3d17031c887"}, + {file = "coverage-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:6e216e4021c934246c308fd3e0d739d9fa8a3f4ea414f584ab90ef9c1592f282"}, + {file = "coverage-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8305e14112efb74d0b5fec4df6e41cafde615c2392a7e51c84013cafe945842c"}, + {file = "coverage-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4865dc4a7a566147cbdc2b2f033a6cccc99a7dcc89995137765c384f6c73110b"}, + {file = "coverage-6.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:25df2bc53a954ba2ccf230fa274d1de341f6aa633d857d75e5731365f7181749"}, + {file = "coverage-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:08fd55d2e00dac4c18a2fa26281076035ec86e764acdc198b9185ce749ada58f"}, + {file = "coverage-6.0-cp38-cp38-win32.whl", hash = "sha256:11ce082eb0f7c2bbfe96f6c8bcc3a339daac57de4dc0f3186069ec5c58da911c"}, + {file = "coverage-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:7844a8c6a0fee401edbf578713c2473e020759267c40261b294036f9d3eb6a2d"}, + {file = "coverage-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bea681309bdd88dd1283a8ba834632c43da376d9bce05820826090aad80c0126"}, + {file = "coverage-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e735ab8547d8a1fe8e58dd765d6f27ac539b395f52160d767b7189f379f9be7a"}, + {file = "coverage-6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:7593a49300489d064ebb6c58539f52cbbc4a2e6a4385de5e92cae1563f88a425"}, + {file = "coverage-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:adb0f4c3c8ba8104378518a1954cbf3d891a22c13fd0e0bf135391835f44f288"}, + {file = "coverage-6.0-cp39-cp39-win32.whl", hash = "sha256:8da0c4a26a831b392deaba5fdd0cd7838d173b47ce2ec3d0f37be630cb09ef6e"}, + {file = "coverage-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:7af2f8e7bb54ace984de790e897f858e88068d8fbc46c9490b7c19c59cf51822"}, + {file = "coverage-6.0-pp36-none-any.whl", hash = "sha256:82b58d37c47d93a171be9b5744bcc96a0012cbf53d5622b29a49e6be2097edd7"}, + {file = "coverage-6.0-pp37-none-any.whl", hash = "sha256:fff04bfefb879edcf616f1ce5ea6f4a693b5976bdc5e163f8464f349c25b59f0"}, + {file = "coverage-6.0.tar.gz", hash = "sha256:17983f6ccc47f4864fd16d20ff677782b23d1207bf222d10e4d676e4636b0872"}, ] defusedxml = [ {file = "defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61"}, @@ -791,8 +784,8 @@ pytest = [ {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] pytest-cov = [ - {file = "pytest-cov-2.12.1.tar.gz", hash = "sha256:261ceeb8c227b726249b376b8526b600f38667ee314f910353fa318caa01f4d7"}, - {file = "pytest_cov-2.12.1-py2.py3-none-any.whl", hash = "sha256:261bb9e47e65bd099c89c3edf92972865210c36813f80ede5277dceb77a4a62a"}, + {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, + {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, ] pytest-expect = [ {file = "pytest-expect-1.1.0.tar.gz", hash = "sha256:36b4462704450798197d090809a05f4e13649d9cba9acdc557ce9517da1fd847"}, @@ -864,6 +857,10 @@ toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +tomli = [ + {file = "tomli-1.2.1-py3-none-any.whl", hash = "sha256:8dd0e9524d6f386271a36b41dbf6c57d8e32fd96fd22b6584679dc569d20899f"}, + {file = "tomli-1.2.1.tar.gz", hash = "sha256:a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442"}, +] tomlkit = [ {file = "tomlkit-0.7.2-py2.py3-none-any.whl", hash = "sha256:173ad840fa5d2aac140528ca1933c29791b79a374a0861a80347f42ec9328117"}, {file = "tomlkit-0.7.2.tar.gz", hash = "sha256:d7a454f319a7e9bd2e249f239168729327e4dd2d27b17dc68be264ad1ce36754"}, diff --git a/pyproject.toml b/pyproject.toml index e4c227a..39a5875 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ splunktalib = "^2.0.0" [tool.poetry.dev-dependencies] pytest-expect = "^1.1.0" pytest = "^6.2" -pytest-cov = "^2" +pytest-cov = "^3" poetry-dynamic-versioning = "^0.13" tomlkit = "^0" reuse = "*" From d6cac3125b12581ab75d3de57a96a08d63ee1a2c Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Fri, 8 Oct 2021 15:06:11 +0530 Subject: [PATCH 02/13] test: updating publish stage --- .github/workflows/build-test-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index eb31223..8aa2122 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -129,7 +129,7 @@ jobs: with: name: Package path: dist/ - + publish: if: always() needs: @@ -144,7 +144,7 @@ jobs: - name: exit without publish if PR if: github.event_name == 'pull_request' run: | - exit 1 + exit 1 - name: Checkout uses: actions/checkout@v2 with: From bf4bf7ade58fcaeb54125e2b37ef1927136f153a Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Mon, 11 Oct 2021 10:50:13 +0530 Subject: [PATCH 03/13] test: added licenserc.yaml --- .github/workflows/build-test-release.yml | 24 ++++++---------- .licenserc.yaml | 35 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 .licenserc.yaml diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 8aa2122..ff9900a 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -51,21 +51,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # needed only when you want License-Eye to comment on the pull request. - lint: + pre-commit: runs-on: ubuntu-latest - name: quality-lint steps: - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 with: - # Full git history is needed to get a proper list of changed files within `super-linter` - fetch-depth: 0 - - name: quality-lint - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FILTER_REGEX_EXCLUDE: README.md + python-version: "3.7" + - name: Install actionlint + run: | + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.6.3/scripts/download-actionlint.bash) + - uses: pre-commit/action@v2.0.3 semgrep: runs-on: ubuntu-latest @@ -131,18 +127,16 @@ jobs: path: dist/ publish: - if: always() needs: - - compliance-dependencies - compliance-copyrights - - lint + - pre-commit - semgrep - snyk - build runs-on: ubuntu-latest steps: - name: exit without publish if PR - if: github.event_name == 'pull_request' + if: ${{ github.event_name == 'pull_request' }} run: | exit 1 - name: Checkout diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 0000000..cd14877 --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,35 @@ +# +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +header: + license: + spdx-id: Apache-2.0 + copyright-owner: Splunk Inc. + + paths-ignore: + - ".circleci/" + - ".github/" + - ".vscode/" + - "dist" + - "licenses" + - "**/*.md" + - "LICENSE" + - "NOTICE" + - "*.lock" + - "docs/**" + - "tests/**" + - ".*" + + comment: on-failure \ No newline at end of file From c4728233fece10bb1ba8b55898698e6f22f7f65c Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Mon, 11 Oct 2021 11:41:27 +0530 Subject: [PATCH 04/13] test: added licence and review secrets stage --- .github/workflows/build-test-release.yml | 14 ++++++++++++++ .github/workflows/exclude-patterns.txt | 4 ++++ .licenserc.yaml | 1 + pyproject.toml | 16 ++++++++++++++-- splunktaucclib/__init__.py | 16 ++++++++++++++-- splunktaucclib/alert_actions_base.py | 16 ++++++++++++++-- splunktaucclib/cim_actions.py | 16 ++++++++++++++-- splunktaucclib/common/__init__.py | 16 ++++++++++++++-- splunktaucclib/common/log.py | 16 ++++++++++++++-- splunktaucclib/global_config/__init__.py | 16 ++++++++++++++-- splunktaucclib/global_config/configuration.py | 16 ++++++++++++++-- splunktaucclib/global_config/schema.py | 16 ++++++++++++++-- splunktaucclib/modinput_wrapper/__init__.py | 15 +++++++++++++++ splunktaucclib/modinput_wrapper/base_modinput.py | 15 +++++++++++++++ splunktaucclib/rest_handler/__init__.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/admin_external.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/base.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/base_hook_mixin.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/cred_mgmt.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/credentials.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/datainput.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/eai.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/endpoint/__init__.py | 16 ++++++++++++++-- .../rest_handler/endpoint/converter.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/endpoint/field.py | 16 ++++++++++++++-- .../rest_handler/endpoint/validator.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/entity.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/error.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/error_ctl.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/handler.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/multimodel.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/normaliser.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/poster.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/schema.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/teardown.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/util.py | 16 ++++++++++++++-- splunktaucclib/rest_handler/validator.py | 16 ++++++++++++++-- splunktaucclib/splunk_aoblib/__init__.py | 16 ++++++++++++++-- splunktaucclib/splunk_aoblib/rest_helper.py | 16 ++++++++++++++-- splunktaucclib/splunk_aoblib/rest_migration.py | 16 ++++++++++++++-- splunktaucclib/splunk_aoblib/setup_util.py | 16 ++++++++++++++-- splunktaucclib/splunk_aoblib/utility.py | 16 ++++++++++++++-- 42 files changed, 567 insertions(+), 74 deletions(-) create mode 100644 .github/workflows/exclude-patterns.txt diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index ff9900a..7ca7fed 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -63,6 +63,20 @@ jobs: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.6.3/scripts/download-actionlint.bash) - uses: pre-commit/action@v2.0.3 + review_secrets: + name: security-detect-secrets + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: false + fetch-depth: "0" + - name: Trufflehog Actions Scan + uses: edplato/trufflehog-actions-scan@v0.9j-beta + with: + scanArguments: "--max_dept 50 -x .github/workflows/exclude-patterns.txt" + semgrep: runs-on: ubuntu-latest name: security-sast-semgrep diff --git a/.github/workflows/exclude-patterns.txt b/.github/workflows/exclude-patterns.txt new file mode 100644 index 0000000..e59ce96 --- /dev/null +++ b/.github/workflows/exclude-patterns.txt @@ -0,0 +1,4 @@ +.github/workflows/ +deps/.* +.*\.lock +tests/ \ No newline at end of file diff --git a/.licenserc.yaml b/.licenserc.yaml index cd14877..86a98e2 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -31,5 +31,6 @@ header: - "docs/**" - "tests/**" - ".*" + - ".reuse" comment: on-failure \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 39a5875..19434b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 Splunk Inc. # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# [tool.poetry] name = "splunktaucclib" diff --git a/splunktaucclib/__init__.py b/splunktaucclib/__init__.py index 175aeb3..11afabb 100644 --- a/splunktaucclib/__init__.py +++ b/splunktaucclib/__init__.py @@ -1,5 +1,17 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# __version__ = "0.0.0" diff --git a/splunktaucclib/alert_actions_base.py b/splunktaucclib/alert_actions_base.py index 615091e..15de736 100644 --- a/splunktaucclib/alert_actions_base.py +++ b/splunktaucclib/alert_actions_base.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import csv import gzip diff --git a/splunktaucclib/cim_actions.py b/splunktaucclib/cim_actions.py index 90fa1de..4ea5901 100644 --- a/splunktaucclib/cim_actions.py +++ b/splunktaucclib/cim_actions.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import collections import csv diff --git a/splunktaucclib/common/__init__.py b/splunktaucclib/common/__init__.py index 5670540..8c65e97 100644 --- a/splunktaucclib/common/__init__.py +++ b/splunktaucclib/common/__init__.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import hashlib import json diff --git a/splunktaucclib/common/log.py b/splunktaucclib/common/log.py index 9a35f26..098145b 100644 --- a/splunktaucclib/common/log.py +++ b/splunktaucclib/common/log.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import logging import sys diff --git a/splunktaucclib/global_config/__init__.py b/splunktaucclib/global_config/__init__.py index f6ce6e4..193cb2c 100644 --- a/splunktaucclib/global_config/__init__.py +++ b/splunktaucclib/global_config/__init__.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """ Global Config Module diff --git a/splunktaucclib/global_config/configuration.py b/splunktaucclib/global_config/configuration.py index 544ed43..7ecf109 100644 --- a/splunktaucclib/global_config/configuration.py +++ b/splunktaucclib/global_config/configuration.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import copy diff --git a/splunktaucclib/global_config/schema.py b/splunktaucclib/global_config/schema.py index dc7c710..5704538 100644 --- a/splunktaucclib/global_config/schema.py +++ b/splunktaucclib/global_config/schema.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import traceback diff --git a/splunktaucclib/modinput_wrapper/__init__.py b/splunktaucclib/modinput_wrapper/__init__.py index e69de29..2707669 100644 --- a/splunktaucclib/modinput_wrapper/__init__.py +++ b/splunktaucclib/modinput_wrapper/__init__.py @@ -0,0 +1,15 @@ +# +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# \ No newline at end of file diff --git a/splunktaucclib/modinput_wrapper/base_modinput.py b/splunktaucclib/modinput_wrapper/base_modinput.py index ee73d93..e21d09a 100644 --- a/splunktaucclib/modinput_wrapper/base_modinput.py +++ b/splunktaucclib/modinput_wrapper/base_modinput.py @@ -1,3 +1,18 @@ +# +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # encoding = utf-8 import copy import importlib diff --git a/splunktaucclib/rest_handler/__init__.py b/splunktaucclib/rest_handler/__init__.py index 03a24e7..e9d8e1f 100644 --- a/splunktaucclib/rest_handler/__init__.py +++ b/splunktaucclib/rest_handler/__init__.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """ Custom REST Handler in Splunk add-on. diff --git a/splunktaucclib/rest_handler/admin_external.py b/splunktaucclib/rest_handler/admin_external.py index c53750d..8e7d295 100644 --- a/splunktaucclib/rest_handler/admin_external.py +++ b/splunktaucclib/rest_handler/admin_external.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import os diff --git a/splunktaucclib/rest_handler/base.py b/splunktaucclib/rest_handler/base.py index d2e426a..723ae3c 100644 --- a/splunktaucclib/rest_handler/base.py +++ b/splunktaucclib/rest_handler/base.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """Base Handler Class of REST Manager. """ diff --git a/splunktaucclib/rest_handler/base_hook_mixin.py b/splunktaucclib/rest_handler/base_hook_mixin.py index 4948a6c..120b19b 100644 --- a/splunktaucclib/rest_handler/base_hook_mixin.py +++ b/splunktaucclib/rest_handler/base_hook_mixin.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# class BaseHookMixin: diff --git a/splunktaucclib/rest_handler/cred_mgmt.py b/splunktaucclib/rest_handler/cred_mgmt.py index a9ccc52..94cc7de 100644 --- a/splunktaucclib/rest_handler/cred_mgmt.py +++ b/splunktaucclib/rest_handler/cred_mgmt.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """Credential Management for REST Endpoint """ diff --git a/splunktaucclib/rest_handler/credentials.py b/splunktaucclib/rest_handler/credentials.py index b542087..4057748 100644 --- a/splunktaucclib/rest_handler/credentials.py +++ b/splunktaucclib/rest_handler/credentials.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """Credentials Management for REST Endpoint """ diff --git a/splunktaucclib/rest_handler/datainput.py b/splunktaucclib/rest_handler/datainput.py index f4d12c9..694e665 100644 --- a/splunktaucclib/rest_handler/datainput.py +++ b/splunktaucclib/rest_handler/datainput.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """REST Manager for data inputs (a wrapper of data inputs). diff --git a/splunktaucclib/rest_handler/eai.py b/splunktaucclib/rest_handler/eai.py index 5008428..bc4601a 100644 --- a/splunktaucclib/rest_handler/eai.py +++ b/splunktaucclib/rest_handler/eai.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # EAI fields diff --git a/splunktaucclib/rest_handler/endpoint/__init__.py b/splunktaucclib/rest_handler/endpoint/__init__.py index 13641cd..f73b046 100644 --- a/splunktaucclib/rest_handler/endpoint/__init__.py +++ b/splunktaucclib/rest_handler/endpoint/__init__.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# from ..error import RestError diff --git a/splunktaucclib/rest_handler/endpoint/converter.py b/splunktaucclib/rest_handler/endpoint/converter.py index 8207000..d15af21 100644 --- a/splunktaucclib/rest_handler/endpoint/converter.py +++ b/splunktaucclib/rest_handler/endpoint/converter.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """ Converters for Splunk configuration. diff --git a/splunktaucclib/rest_handler/endpoint/field.py b/splunktaucclib/rest_handler/endpoint/field.py index a2b2dcd..ef6053c 100644 --- a/splunktaucclib/rest_handler/endpoint/field.py +++ b/splunktaucclib/rest_handler/endpoint/field.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# from ..error import RestError diff --git a/splunktaucclib/rest_handler/endpoint/validator.py b/splunktaucclib/rest_handler/endpoint/validator.py index c388121..5a66a18 100644 --- a/splunktaucclib/rest_handler/endpoint/validator.py +++ b/splunktaucclib/rest_handler/endpoint/validator.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """ Validators for Splunk configuration. diff --git a/splunktaucclib/rest_handler/entity.py b/splunktaucclib/rest_handler/entity.py index 43dcb36..8a5beca 100644 --- a/splunktaucclib/rest_handler/entity.py +++ b/splunktaucclib/rest_handler/entity.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# from .eai import RestEAI diff --git a/splunktaucclib/rest_handler/error.py b/splunktaucclib/rest_handler/error.py index cebe5e2..f9f8019 100644 --- a/splunktaucclib/rest_handler/error.py +++ b/splunktaucclib/rest_handler/error.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """ Error Handling. diff --git a/splunktaucclib/rest_handler/error_ctl.py b/splunktaucclib/rest_handler/error_ctl.py index 91db9c0..766e061 100644 --- a/splunktaucclib/rest_handler/error_ctl.py +++ b/splunktaucclib/rest_handler/error_ctl.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """Error control """ diff --git a/splunktaucclib/rest_handler/handler.py b/splunktaucclib/rest_handler/handler.py index d3ecade..9bcee83 100644 --- a/splunktaucclib/rest_handler/handler.py +++ b/splunktaucclib/rest_handler/handler.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """ REST Handler. diff --git a/splunktaucclib/rest_handler/multimodel.py b/splunktaucclib/rest_handler/multimodel.py index 38f7d2f..4e588d8 100644 --- a/splunktaucclib/rest_handler/multimodel.py +++ b/splunktaucclib/rest_handler/multimodel.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """REST handler for multiple models with different structure in one *.conf. It assumes that there are enumerable objects in every model, diff --git a/splunktaucclib/rest_handler/normaliser.py b/splunktaucclib/rest_handler/normaliser.py index 6056682..c9a3936 100644 --- a/splunktaucclib/rest_handler/normaliser.py +++ b/splunktaucclib/rest_handler/normaliser.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """Normalisers """ diff --git a/splunktaucclib/rest_handler/poster.py b/splunktaucclib/rest_handler/poster.py index 7bc19ec..ca13197 100644 --- a/splunktaucclib/rest_handler/poster.py +++ b/splunktaucclib/rest_handler/poster.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import json diff --git a/splunktaucclib/rest_handler/schema.py b/splunktaucclib/rest_handler/schema.py index c90ef7b..f0ebd62 100644 --- a/splunktaucclib/rest_handler/schema.py +++ b/splunktaucclib/rest_handler/schema.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """ REST Schema diff --git a/splunktaucclib/rest_handler/teardown.py b/splunktaucclib/rest_handler/teardown.py index c3e5f27..278fc71 100644 --- a/splunktaucclib/rest_handler/teardown.py +++ b/splunktaucclib/rest_handler/teardown.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """REST Manager for cleaning configuration in add-on. diff --git a/splunktaucclib/rest_handler/util.py b/splunktaucclib/rest_handler/util.py index d5da5a1..8b11a82 100644 --- a/splunktaucclib/rest_handler/util.py +++ b/splunktaucclib/rest_handler/util.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import os.path diff --git a/splunktaucclib/rest_handler/validator.py b/splunktaucclib/rest_handler/validator.py index fcebc9e..39083c4 100644 --- a/splunktaucclib/rest_handler/validator.py +++ b/splunktaucclib/rest_handler/validator.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# """Validators """ diff --git a/splunktaucclib/splunk_aoblib/__init__.py b/splunktaucclib/splunk_aoblib/__init__.py index 0be13a6..72d4509 100644 --- a/splunktaucclib/splunk_aoblib/__init__.py +++ b/splunktaucclib/splunk_aoblib/__init__.py @@ -1,3 +1,15 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/splunktaucclib/splunk_aoblib/rest_helper.py b/splunktaucclib/splunk_aoblib/rest_helper.py index 6dc83a7..70c19ac 100644 --- a/splunktaucclib/splunk_aoblib/rest_helper.py +++ b/splunktaucclib/splunk_aoblib/rest_helper.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import requests diff --git a/splunktaucclib/splunk_aoblib/rest_migration.py b/splunktaucclib/splunk_aoblib/rest_migration.py index 1f3022a..3ef7acf 100644 --- a/splunktaucclib/splunk_aoblib/rest_migration.py +++ b/splunktaucclib/splunk_aoblib/rest_migration.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import json import traceback diff --git a/splunktaucclib/splunk_aoblib/setup_util.py b/splunktaucclib/splunk_aoblib/setup_util.py index 4fd41b3..4ec531d 100644 --- a/splunktaucclib/splunk_aoblib/setup_util.py +++ b/splunktaucclib/splunk_aoblib/setup_util.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import json import os diff --git a/splunktaucclib/splunk_aoblib/utility.py b/splunktaucclib/splunk_aoblib/utility.py index 285c806..627b659 100644 --- a/splunktaucclib/splunk_aoblib/utility.py +++ b/splunktaucclib/splunk_aoblib/utility.py @@ -1,6 +1,18 @@ -# SPDX-FileCopyrightText: 2020 2020 # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2021 Splunk Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # encoding = utf-8 From a309b01f2dbb5b0242b93cc5b1d23e38c02fe762 Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Mon, 11 Oct 2021 12:49:55 +0530 Subject: [PATCH 05/13] test: updated publish stage --- .github/workflows/build-test-release.yml | 10 ++++------ splunktaucclib/modinput_wrapper/__init__.py | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 7ca7fed..e7db682 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -76,7 +76,7 @@ jobs: uses: edplato/trufflehog-actions-scan@v0.9j-beta with: scanArguments: "--max_dept 50 -x .github/workflows/exclude-patterns.txt" - + semgrep: runs-on: ubuntu-latest name: security-sast-semgrep @@ -117,6 +117,7 @@ jobs: runs-on: ubuntu-latest needs: - compliance-dependencies + - compliance-copyrights steps: - uses: actions/checkout@v2 with: @@ -141,18 +142,15 @@ jobs: path: dist/ publish: + if: github.event_name != 'pull_request' needs: - - compliance-copyrights - pre-commit - semgrep - snyk - build + - review_secrets runs-on: ubuntu-latest steps: - - name: exit without publish if PR - if: ${{ github.event_name == 'pull_request' }} - run: | - exit 1 - name: Checkout uses: actions/checkout@v2 with: diff --git a/splunktaucclib/modinput_wrapper/__init__.py b/splunktaucclib/modinput_wrapper/__init__.py index 2707669..72d4509 100644 --- a/splunktaucclib/modinput_wrapper/__init__.py +++ b/splunktaucclib/modinput_wrapper/__init__.py @@ -12,4 +12,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# \ No newline at end of file +# From f37c712aba513009a89235255c734bc9fc619bff Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Mon, 11 Oct 2021 13:20:44 +0530 Subject: [PATCH 06/13] test: updated build-test-release.yaml --- .github/workflows/build-test-release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index e7db682..9759e4e 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -1,4 +1,4 @@ -# This is a basic workflow to help you get started with Actions + name: CI @@ -7,9 +7,12 @@ on: # Triggers the workflow on push or pull request events but only for the main branch push: branches: - - "github-action-migration" + - "main" + - "develop" tags: - "v[0-9]+.[0-9]+.[0-9]+" + pull_request: + branches: [main, develop] jobs: compliance-dependencies: name: Compliance Dependencies From bfe472e917331bab7e5d39574bc21cd99be6fc1d Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Mon, 11 Oct 2021 14:22:59 +0530 Subject: [PATCH 07/13] test: added release-notes.yaml --- .github/workflows/release-notes.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/release-notes.yaml diff --git a/.github/workflows/release-notes.yaml b/.github/workflows/release-notes.yaml new file mode 100644 index 0000000..209ee58 --- /dev/null +++ b/.github/workflows/release-notes.yaml @@ -0,0 +1,21 @@ +name: Release-Notes-Preview + +on: + pull_request: +# branches: [main, develop] + issue_comment: + types: [edited] + +jobs: + preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: | + git fetch --prune --unshallow --tags + - uses: snyk/release-notes-preview@v1.6.1 + with: + releaseBranch: main + env: + GITHUB_PR_USERNAME: ${{ github.actor }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 24273433b42a09c926428423ba0f782462e65d0d Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Mon, 11 Oct 2021 17:56:58 +0530 Subject: [PATCH 08/13] test: updated .pre-commit-config.yaml --- .github/workflows/aggreements.yaml | 18 +++--------------- .github/workflows/build-test-release.yml | 10 ++-------- .licenserc.yaml | 5 +---- .pre-commit-config.yaml | 11 ++++++++++- 4 files changed, 16 insertions(+), 28 deletions(-) diff --git a/.github/workflows/aggreements.yaml b/.github/workflows/aggreements.yaml index 8056ddf..02e5c75 100644 --- a/.github/workflows/aggreements.yaml +++ b/.github/workflows/aggreements.yaml @@ -11,44 +11,32 @@ jobs: steps: - name: "CLA Assistant" if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' - # Alpha Release uses: cla-assistant/github-action@v2.1.3-beta env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # the below token should have repo scope and must be manually added by you in the repository's secret PERSONAL_ACCESS_TOKEN: ${{ secrets.PAT_CLATOOL }} with: path-to-signatures: "signatures/version1/cla.json" - path-to-document: "https://github.com/splunk/cla-agreement/blob/main/CLA.md" # e.g. a CLA or a DCO document - # branch should not be protected + path-to-document: "https://github.com/splunk/cla-agreement/blob/main/CLA.md" branch: "main" allowlist: dependabot[bot] - #below are the optional inputs - If the optional inputs are not given, then default values will be taken remote-organization-name: splunk remote-repository-name: cla-agreement - #create-file-commit-message: 'For example: Creating file for storing CLA Signatures' - #signed-commit-messag e: 'For example: $contributorName has signed the CLA in #$pullRequestNo' - #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign' - #custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA' - #custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.' + CodeOfConduct: runs-on: ubuntu-latest steps: - name: "COC Assistant" if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the Code of Conduct and I hereby accept the Terms') || github.event_name == 'pull_request_target' - # Alpha Release uses: cla-assistant/github-action@v2.1.3-beta env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # the below token should have repo scope and must be manually added by you in the repository's secret PERSONAL_ACCESS_TOKEN: ${{ secrets.PAT_CLATOOL }} with: path-to-signatures: "signatures/version1/coc.json" - path-to-document: "https://github.com/splunk/cla-agreement/blob/main/CODE_OF_CONDUCT.md" # e.g. a COC or a DCO document - # branch should not be protected + path-to-document: "https://github.com/splunk/cla-agreement/blob/main/CODE_OF_CONDUCT.md" branch: "main" allowlist: dependabot[bot] - #below are the optional inputs - If the optional inputs are not given, then default values will be taken remote-organization-name: splunk remote-repository-name: cla-agreement custom-pr-sign-comment: "I have read the Code of Conduct and I hereby accept the Terms" diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 9759e4e..4954a00 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -2,9 +2,7 @@ name: CI -# Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the main branch push: branches: - "main" @@ -16,9 +14,7 @@ on: jobs: compliance-dependencies: name: Compliance Dependencies - # The type of runner that the job will run on runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Checkout uses: actions/checkout@v2 @@ -50,9 +46,9 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Check License Header - uses: apache/skywalking-eyes@main # always prefer to use a revision instead of `main`. + uses: apache/skywalking-eyes@main env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # needed only when you want License-Eye to comment on the pull request. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} pre-commit: runs-on: ubuntu-latest @@ -124,8 +120,6 @@ jobs: steps: - uses: actions/checkout@v2 with: - # Very Important semantic-release won't trigger a tagged - # build if this is not set false persist-credentials: false - name: Setup python uses: actions/setup-python@v2 diff --git a/.licenserc.yaml b/.licenserc.yaml index 86a98e2..af17e1e 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -19,18 +19,15 @@ header: copyright-owner: Splunk Inc. paths-ignore: - - ".circleci/" - ".github/" - ".vscode/" + - ".reuse/" - "dist" - - "licenses" - "**/*.md" - "LICENSE" - "NOTICE" - "*.lock" - - "docs/**" - "tests/**" - ".*" - - ".reuse" comment: on-failure \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d32785f..d4ad781 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,4 +11,13 @@ repos: - repo: https://github.com/PyCQA/isort rev: 5.9.3 hooks: - - id: isort \ No newline at end of file + - id: isort +- repo: local + hooks: + - id: actionlint + name: actionlint + entry: actionlint + args: [-ignore, 'property ".+" is not defined in object type'] + language: script + types: ["yaml"] + files: ^.github/workflows/ \ No newline at end of file From 8630d7093a75a8d2bed7b5da9371ae2be822b87e Mon Sep 17 00:00:00 2001 From: harshilgajera-crest <69803385+harshilgajera-crest@users.noreply.github.com> Date: Mon, 11 Oct 2021 18:38:38 +0530 Subject: [PATCH 09/13] test: Update .github/workflows/release-notes.yaml Co-authored-by: Artem Rys <79191415+arys-splunk@users.noreply.github.com> --- .github/workflows/release-notes.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-notes.yaml b/.github/workflows/release-notes.yaml index 209ee58..90a0dc5 100644 --- a/.github/workflows/release-notes.yaml +++ b/.github/workflows/release-notes.yaml @@ -2,7 +2,6 @@ name: Release-Notes-Preview on: pull_request: -# branches: [main, develop] issue_comment: types: [edited] From aaf86b949feb521401e6bf92ef2808dd561aab51 Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Tue, 12 Oct 2021 10:27:13 +0530 Subject: [PATCH 10/13] test: resolving PR comments --- .reuse/dep5 | 8 -- CLA.md | 9 -- CODE_OF_CONDUCT.md | 74 -------------- LICENSE | 2 +- LICENSES/Apache-2.0.txt | 208 ---------------------------------------- poetry.lock | 128 +++++++------------------ pyproject.toml | 2 - 7 files changed, 36 insertions(+), 395 deletions(-) delete mode 100644 .reuse/dep5 delete mode 100644 CLA.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 LICENSES/Apache-2.0.txt diff --git a/.reuse/dep5 b/.reuse/dep5 deleted file mode 100644 index 7529806..0000000 --- a/.reuse/dep5 +++ /dev/null @@ -1,8 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: splunktaucclib -Upstream-Contact: Splunk Inc. -Source: https://github.com/splunk/addonfactory-ucc-library - -Files: .circleci/config.yml .github .gitignore poetry.lock -Copyright: 2020 Splunk, Inc. -License: Apache-2.0 \ No newline at end of file diff --git a/CLA.md b/CLA.md deleted file mode 100644 index 7479fcc..0000000 --- a/CLA.md +++ /dev/null @@ -1,9 +0,0 @@ -By submitting a Contribution to this Work, You agree that Your Contribution is made subject to the primary LICENSE file applicable to this Work. In addition, You represent that: (i) You are the copyright owner of the Contribution or (ii) You have the requisite rights to make the Contribution. - -Definitions: - -“You” shall mean: (i) yourself if you are making a Contribution on your own behalf; or (ii) your company, if you are making a Contribution on behalf of your company. If you are making a Contribution on behalf of your company, you represent that you have the requisite authority to do so. - -"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You for inclusion in, or documentation of, this project/repository. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication submitted for inclusion in this project/repository, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the maintainers of the project/repository. - -“Work” shall mean the collective software, content, and documentation in this project/repository. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index ebc927b..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,74 +0,0 @@ -# Code of conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at [support@splunk.com](mailto:support@splunk.com). All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ \ No newline at end of file diff --git a/LICENSE b/LICENSE index 261eeb9..56c8192 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2021 Splunk Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt deleted file mode 100644 index 4ed90b9..0000000 --- a/LICENSES/Apache-2.0.txt +++ /dev/null @@ -1,208 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, -AND DISTRIBUTION - - 1. Definitions. - - - -"License" shall mean the terms and conditions for use, reproduction, and distribution -as defined by Sections 1 through 9 of this document. - - - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - - - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (ii) ownership of fifty percent (50%) or more -of the outstanding shares, or (iii) beneficial ownership of such entity. - - - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions -granted by this License. - - - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - - - -"Object" form shall mean any form resulting from mechanical transformation -or translation of a Source form, including but not limited to compiled object -code, generated documentation, and conversions to other media types. - - - -"Work" shall mean the work of authorship, whether in Source or Object form, -made available under the License, as indicated by a copyright notice that -is included in or attached to the work (an example is provided in the Appendix -below). - - - -"Derivative Works" shall mean any work, whether in Source or Object form, -that is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative -Works shall not include works that remain separable from, or merely link (or -bind by name) to the interfaces of, the Work and Derivative Works thereof. - - - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative -Works thereof, that is intentionally submitted to Licensor for inclusion in -the Work by the copyright owner or by an individual or Legal Entity authorized -to submit on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication -sent to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor -for the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - - - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently incorporated -within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this -License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable copyright license to reproduce, prepare -Derivative Works of, publicly display, publicly perform, sublicense, and distribute -the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, -each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) patent -license to make, have made, use, offer to sell, sell, import, and otherwise -transfer the Work, where such license applies only to those patent claims -licensable by such Contributor that are necessarily infringed by their Contribution(s) -alone or by combination of their Contribution(s) with the Work to which such -Contribution(s) was submitted. If You institute patent litigation against -any entity (including a cross-claim or counterclaim in a lawsuit) alleging -that the Work or a Contribution incorporated within the Work constitutes direct -or contributory patent infringement, then any patent licenses granted to You -under this License for that Work shall terminate as of the date such litigation -is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or -Derivative Works thereof in any medium, with or without modifications, and -in Source or Object form, provided that You meet the following conditions: - -(a) You must give any other recipients of the Work or Derivative Works a copy -of this License; and - -(b) You must cause any modified files to carry prominent notices stating that -You changed the files; and - -(c) You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source -form of the Work, excluding those notices that do not pertain to any part -of the Derivative Works; and - -(d) If the Work includes a "NOTICE" text file as part of its distribution, -then any Derivative Works that You distribute must include a readable copy -of the attribution notices contained within such NOTICE file, excluding those -notices that do not pertain to any part of the Derivative Works, in at least -one of the following places: within a NOTICE text file distributed as part -of the Derivative Works; within the Source form or documentation, if provided -along with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents -of the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works -that You distribute, alongside or as an addendum to the NOTICE text from the -Work, provided that such additional attribution notices cannot be construed -as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, -or distribution of Your modifications, or for any such Derivative Works as -a whole, provided Your use, reproduction, and distribution of the Work otherwise -complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any -Contribution intentionally submitted for inclusion in the Work by You to the -Licensor shall be under the terms and conditions of this License, without -any additional terms or conditions. Notwithstanding the above, nothing herein -shall supersede or modify the terms of any separate license agreement you -may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, -trademarks, service marks, or product names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to -in writing, Licensor provides the Work (and each Contributor provides its -Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied, including, without limitation, any warranties -or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR -A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness -of using or redistributing the Work and assume any risks associated with Your -exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether -in tort (including negligence), contract, or otherwise, unless required by -applicable law (such as deliberate and grossly negligent acts) or agreed to -in writing, shall any Contributor be liable to You for damages, including -any direct, indirect, special, incidental, or consequential damages of any -character arising as a result of this License or out of the use or inability -to use the Work (including but not limited to damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses), even if such Contributor has been advised of the possibility -of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work -or Derivative Works thereof, You may choose to offer, and charge a fee for, -acceptance of support, warranty, indemnity, or other liability obligations -and/or rights consistent with this License. However, in accepting such obligations, -You may act only on Your own behalf and on Your sole responsibility, not on -behalf of any other Contributor, and only if You agree to indemnify, defend, -and hold each Contributor harmless for any liability incurred by, or claims -asserted against, such Contributor by reason of your accepting any such warranty -or additional liability. END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own identifying -information. (Don't include the brackets!) The text should be enclosed in -the appropriate comment syntax for the file format. We also recommend that -a file or class name and description of purpose be included on the same "printed -page" as the copyright notice for easier identification within third-party -archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); - -you may not use this file except in compliance with the License. - -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software - -distributed under the License is distributed on an "AS IS" BASIS, - -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and - -limitations under the License. diff --git a/poetry.lock b/poetry.lock index 21320ea..39b2410 100644 --- a/poetry.lock +++ b/poetry.lock @@ -99,7 +99,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "coverage" -version = "6.0" +version = "6.0.2" description = "Code coverage measurement for Python" category = "dev" optional = false @@ -127,14 +127,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "dunamai" -version = "1.5.5" -description = "Dynamic version generation" -category = "dev" -optional = false -python-versions = ">=3.5,<4.0" - [[package]] name = "filelock" version = "3.0.12" @@ -280,19 +272,6 @@ importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] -[[package]] -name = "poetry-dynamic-versioning" -version = "0.13.1" -description = "Plugin for Poetry to enable dynamic versioning based on VCS tags" -category = "dev" -optional = false -python-versions = ">=3.5,<4.0" - -[package.dependencies] -dunamai = ">=1.5,<2.0" -jinja2 = {version = ">=2.11.1,<4", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} -tomlkit = ">=0.4" - [[package]] name = "pre-commit" version = "2.15.0" @@ -363,18 +342,6 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] -[[package]] -name = "pytest-expect" -version = "1.1.0" -description = "py.test plugin to store test expectations and mark tests based on them" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -pytest = "*" -u-msgpack-python = "*" - [[package]] name = "python-debian" version = "0.1.40" @@ -511,14 +478,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "u-msgpack-python" -version = "2.7.1" -description = "A portable, lightweight MessagePack serializer and deserializer written in pure Python." -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "urllib3" version = "1.26.6" @@ -567,7 +526,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "2e1fe7b6313673d9d557f73689858d4276bc5ece8673cad9352819808ba79e69" +content-hash = "e9b1fa6fa30f86a9d2e33e460ee3f076687d95a450a1e06ea78f7e646c32eb3f" [metadata.files] atomicwrites = [ @@ -611,41 +570,39 @@ colorama = [ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] coverage = [ - {file = "coverage-6.0-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:3dfb23cc180b674a11a559183dff9655beb9da03088f3fe3c4f3a6d200c86f05"}, - {file = "coverage-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5dd5ae0a9cd55d71f1335c331e9625382239b8cede818fb62d8d2702336dbf8"}, - {file = "coverage-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8426fec5ad5a6e8217921716b504e9b6e1166dc147e8443b4855e329db686282"}, - {file = "coverage-6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:aa5d4d43fa18cc9d0c6e02a83de0b9729b5451a9066574bd276481474f0a53ab"}, - {file = "coverage-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b78dd3eeb8f5ff26d2113c41836bac04a9ea91be54c346826b54a373133c8c53"}, - {file = "coverage-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:581fddd2f883379bd5af51da9233e0396b6519f3d3eeae4fb88867473be6d56e"}, - {file = "coverage-6.0-cp310-cp310-win32.whl", hash = "sha256:43bada49697a62ffa0283c7f01bbc76aac562c37d4bb6c45d56dd008d841194e"}, - {file = "coverage-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:fa816e97cfe1f691423078dffa39a18106c176f28008db017b3ce3e947c34aa5"}, - {file = "coverage-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:5c191e01b23e760338f19d8ba2470c0dad44c8b45e41ac043b2db84efc62f695"}, - {file = "coverage-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:274a612f67f931307706b60700f1e4cf80e1d79dff6c282fc9301e4565e78724"}, - {file = "coverage-6.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a9dbfcbc56d8de5580483cf2caff6a59c64d3e88836cbe5fb5c20c05c29a8808"}, - {file = "coverage-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e63490e8a6675cee7a71393ee074586f7eeaf0e9341afd006c5d6f7eec7c16d7"}, - {file = "coverage-6.0-cp36-cp36m-win32.whl", hash = "sha256:72f8c99f1527c5a8ee77c890ea810e26b39fd0b4c2dffc062e20a05b2cca60ef"}, - {file = "coverage-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:88f1810eb942e7063d051d87aaaa113eb5fd5a7fd2cda03a972de57695b8bb1a"}, - {file = "coverage-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:befb5ffa9faabef6dadc42622c73de168001425258f0b7e402a2934574e7a04b"}, - {file = "coverage-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7dbda34e8e26bd86606ba8a9c13ccb114802e01758a3d0a75652ffc59a573220"}, - {file = "coverage-6.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:b4ee5815c776dfa3958ba71c7cd4cdd8eb40d79358a18352feb19562fe4408c4"}, - {file = "coverage-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d82cbef1220703ce56822be7fbddb40736fc1a928ac893472df8aff7421ae0aa"}, - {file = "coverage-6.0-cp37-cp37m-win32.whl", hash = "sha256:d795a2c92fe8cb31f6e9cd627ee4f39b64eb66bf47d89d8fcf7cb3d17031c887"}, - {file = "coverage-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:6e216e4021c934246c308fd3e0d739d9fa8a3f4ea414f584ab90ef9c1592f282"}, - {file = "coverage-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8305e14112efb74d0b5fec4df6e41cafde615c2392a7e51c84013cafe945842c"}, - {file = "coverage-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4865dc4a7a566147cbdc2b2f033a6cccc99a7dcc89995137765c384f6c73110b"}, - {file = "coverage-6.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:25df2bc53a954ba2ccf230fa274d1de341f6aa633d857d75e5731365f7181749"}, - {file = "coverage-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:08fd55d2e00dac4c18a2fa26281076035ec86e764acdc198b9185ce749ada58f"}, - {file = "coverage-6.0-cp38-cp38-win32.whl", hash = "sha256:11ce082eb0f7c2bbfe96f6c8bcc3a339daac57de4dc0f3186069ec5c58da911c"}, - {file = "coverage-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:7844a8c6a0fee401edbf578713c2473e020759267c40261b294036f9d3eb6a2d"}, - {file = "coverage-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bea681309bdd88dd1283a8ba834632c43da376d9bce05820826090aad80c0126"}, - {file = "coverage-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e735ab8547d8a1fe8e58dd765d6f27ac539b395f52160d767b7189f379f9be7a"}, - {file = "coverage-6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:7593a49300489d064ebb6c58539f52cbbc4a2e6a4385de5e92cae1563f88a425"}, - {file = "coverage-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:adb0f4c3c8ba8104378518a1954cbf3d891a22c13fd0e0bf135391835f44f288"}, - {file = "coverage-6.0-cp39-cp39-win32.whl", hash = "sha256:8da0c4a26a831b392deaba5fdd0cd7838d173b47ce2ec3d0f37be630cb09ef6e"}, - {file = "coverage-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:7af2f8e7bb54ace984de790e897f858e88068d8fbc46c9490b7c19c59cf51822"}, - {file = "coverage-6.0-pp36-none-any.whl", hash = "sha256:82b58d37c47d93a171be9b5744bcc96a0012cbf53d5622b29a49e6be2097edd7"}, - {file = "coverage-6.0-pp37-none-any.whl", hash = "sha256:fff04bfefb879edcf616f1ce5ea6f4a693b5976bdc5e163f8464f349c25b59f0"}, - {file = "coverage-6.0.tar.gz", hash = "sha256:17983f6ccc47f4864fd16d20ff677782b23d1207bf222d10e4d676e4636b0872"}, + {file = "coverage-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1549e1d08ce38259de2bc3e9a0d5f3642ff4a8f500ffc1b2df73fd621a6cdfc0"}, + {file = "coverage-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcae10fccb27ca2a5f456bf64d84110a5a74144be3136a5e598f9d9fb48c0caa"}, + {file = "coverage-6.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:53a294dc53cfb39c74758edaa6305193fb4258a30b1f6af24b360a6c8bd0ffa7"}, + {file = "coverage-6.0.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8251b37be1f2cd9c0e5ccd9ae0380909c24d2a5ed2162a41fcdbafaf59a85ebd"}, + {file = "coverage-6.0.2-cp310-cp310-win32.whl", hash = "sha256:db42baa892cba723326284490283a68d4de516bfb5aaba369b4e3b2787a778b7"}, + {file = "coverage-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:bbffde2a68398682623d9dd8c0ca3f46fda074709b26fcf08ae7a4c431a6ab2d"}, + {file = "coverage-6.0.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:60e51a3dd55540bec686d7fff61b05048ca31e804c1f32cbb44533e6372d9cc3"}, + {file = "coverage-6.0.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a6a9409223a27d5ef3cca57dd7cd4dfcb64aadf2fad5c3b787830ac9223e01a"}, + {file = "coverage-6.0.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4b34ae4f51bbfa5f96b758b55a163d502be3dcb24f505d0227858c2b3f94f5b9"}, + {file = "coverage-6.0.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3bbda1b550e70fa6ac40533d3f23acd4f4e9cb4e6e77251ce77fdf41b3309fb2"}, + {file = "coverage-6.0.2-cp36-cp36m-win32.whl", hash = "sha256:4e28d2a195c533b58fc94a12826f4431726d8eb029ac21d874345f943530c122"}, + {file = "coverage-6.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:a82d79586a0a4f5fd1cf153e647464ced402938fbccb3ffc358c7babd4da1dd9"}, + {file = "coverage-6.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3be1206dc09fb6298de3fce70593e27436862331a85daee36270b6d0e1c251c4"}, + {file = "coverage-6.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9cd3828bbe1a40070c11fe16a51df733fd2f0cb0d745fb83b7b5c1f05967df7"}, + {file = "coverage-6.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:d036dc1ed8e1388e995833c62325df3f996675779541f682677efc6af71e96cc"}, + {file = "coverage-6.0.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:04560539c19ec26995ecfb3d9307ff154fbb9a172cb57e3b3cfc4ced673103d1"}, + {file = "coverage-6.0.2-cp37-cp37m-win32.whl", hash = "sha256:e4fb7ced4d9dec77d6cf533acfbf8e1415fe799430366affb18d69ee8a3c6330"}, + {file = "coverage-6.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:77b1da5767ed2f44611bc9bc019bc93c03fa495728ec389759b6e9e5039ac6b1"}, + {file = "coverage-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:61b598cbdbaae22d9e34e3f675997194342f866bb1d781da5d0be54783dce1ff"}, + {file = "coverage-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:36e9040a43d2017f2787b28d365a4bb33fcd792c7ff46a047a04094dc0e2a30d"}, + {file = "coverage-6.0.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:9f1627e162e3864a596486774876415a7410021f4b67fd2d9efdf93ade681afc"}, + {file = "coverage-6.0.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e7a0b42db2a47ecb488cde14e0f6c7679a2c5a9f44814393b162ff6397fcdfbb"}, + {file = "coverage-6.0.2-cp38-cp38-win32.whl", hash = "sha256:a1b73c7c4d2a42b9d37dd43199c5711d91424ff3c6c22681bc132db4a4afec6f"}, + {file = "coverage-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:1db67c497688fd4ba85b373b37cc52c50d437fd7267520ecd77bddbd89ea22c9"}, + {file = "coverage-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f2f184bf38e74f152eed7f87e345b51f3ab0b703842f447c22efe35e59942c24"}, + {file = "coverage-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd1cf1deb3d5544bd942356364a2fdc8959bad2b6cf6eb17f47d301ea34ae822"}, + {file = "coverage-6.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ad9b8c1206ae41d46ec7380b78ba735ebb77758a650643e841dd3894966c31d0"}, + {file = "coverage-6.0.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:381d773d896cc7f8ba4ff3b92dee4ed740fb88dfe33b6e42efc5e8ab6dfa1cfe"}, + {file = "coverage-6.0.2-cp39-cp39-win32.whl", hash = "sha256:424c44f65e8be58b54e2b0bd1515e434b940679624b1b72726147cfc6a9fc7ce"}, + {file = "coverage-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:abbff240f77347d17306d3201e14431519bf64495648ca5a49571f988f88dee9"}, + {file = "coverage-6.0.2-pp36-none-any.whl", hash = "sha256:7092eab374346121805fb637572483270324407bf150c30a3b161fc0c4ca5164"}, + {file = "coverage-6.0.2-pp37-none-any.whl", hash = "sha256:30922626ce6f7a5a30bdba984ad21021529d3d05a68b4f71ea3b16bda35b8895"}, + {file = "coverage-6.0.2.tar.gz", hash = "sha256:6807947a09510dc31fa86f43595bf3a14017cd60bf633cc746d52141bfa6b149"}, ] defusedxml = [ {file = "defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61"}, @@ -655,10 +612,6 @@ distlib = [ {file = "distlib-0.3.2-py2.py3-none-any.whl", hash = "sha256:23e223426b28491b1ced97dc3bbe183027419dfc7982b4fa2f05d5f3ff10711c"}, {file = "distlib-0.3.2.zip", hash = "sha256:106fef6dc37dd8c0e2c0a60d3fca3e77460a48907f335fa28420463a6f799736"}, ] -dunamai = [ - {file = "dunamai-1.5.5-py3-none-any.whl", hash = "sha256:525ac30db6ca4f8e48b9f198c2e8fbc2a9ce3ea189768361c621ea635212ee49"}, - {file = "dunamai-1.5.5.tar.gz", hash = "sha256:32f30db71e8fd1adeb42fac45c04433680e47a28298447cd30304e0bba95a7dd"}, -] filelock = [ {file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"}, {file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"}, @@ -763,10 +716,6 @@ pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] -poetry-dynamic-versioning = [ - {file = "poetry-dynamic-versioning-0.13.1.tar.gz", hash = "sha256:5c0e7b22560db76812057ef95dadad662ecc63eb270145787eabe73da7c222f9"}, - {file = "poetry_dynamic_versioning-0.13.1-py3-none-any.whl", hash = "sha256:6d79f76436c624653fc06eb9bb54fb4f39b1d54362bc366ad2496855711d3a78"}, -] pre-commit = [ {file = "pre_commit-2.15.0-py2.py3-none-any.whl", hash = "sha256:a4ed01000afcb484d9eb8d504272e642c4c4099bbad3a6b27e519bd6a3e928a6"}, {file = "pre_commit-2.15.0.tar.gz", hash = "sha256:3c25add78dbdfb6a28a651780d5c311ac40dd17f160eb3954a0c59da40a505a7"}, @@ -787,9 +736,6 @@ pytest-cov = [ {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, ] -pytest-expect = [ - {file = "pytest-expect-1.1.0.tar.gz", hash = "sha256:36b4462704450798197d090809a05f4e13649d9cba9acdc557ce9517da1fd847"}, -] python-debian = [ {file = "python-debian-0.1.40.tar.gz", hash = "sha256:385dfb965eca75164d256486c7cf9bae772d24144249fd18b9d15d3cffb70eea"}, {file = "python_debian-0.1.40-py3-none-any.whl", hash = "sha256:55d33ff6d78be995aba5a14a82d83aae8a8f5bb9a36712796dac179cc68fab0c"}, @@ -870,10 +816,6 @@ typing-extensions = [ {file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"}, {file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"}, ] -u-msgpack-python = [ - {file = "u-msgpack-python-2.7.1.tar.gz", hash = "sha256:b7e7d433cab77171a4c752875d91836f3040306bab5063fb6dbe11f64ea69551"}, - {file = "u_msgpack_python-2.7.1-py2.py3-none-any.whl", hash = "sha256:0eb339ae27ec3085945244d17b74fd1ed875e866974d63caaa85d90fca9060a7"}, -] urllib3 = [ {file = "urllib3-1.26.6-py2.py3-none-any.whl", hash = "sha256:39fb8672126159acb139a7718dd10806104dec1e2f0f6c88aab05d17df10c8d4"}, {file = "urllib3-1.26.6.tar.gz", hash = "sha256:f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f"}, diff --git a/pyproject.toml b/pyproject.toml index 19434b1..99d1bb7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,10 +28,8 @@ splunk-sdk = "1.6.16" splunktalib = "^2.0.0" [tool.poetry.dev-dependencies] -pytest-expect = "^1.1.0" pytest = "^6.2" pytest-cov = "^3" -poetry-dynamic-versioning = "^0.13" tomlkit = "^0" reuse = "*" pre-commit = "^2.15.0" From 6d2181271013412a7a55e79eeb5056923ced4230 Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Tue, 12 Oct 2021 16:07:29 +0530 Subject: [PATCH 11/13] test: removing reuse and tomlkit --- poetry.lock | 191 +------------------------------------------------ pyproject.toml | 4 -- 2 files changed, 1 insertion(+), 194 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0a73fe3..7feb76b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -35,25 +35,6 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=4.6)", "pytest-flake8", "pytest-cov", "pytest-black (>=0.3.7)", "pytest-mypy", "pytest-checkdocs (>=2.4)", "pytest-enabler (>=1.0.1)"] -[[package]] -name = "binaryornot" -version = "0.4.4" -description = "Ultra-lightweight pure Python package to check if a file is binary or text." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -chardet = ">=3.0.2" - -[[package]] -name = "boolean.py" -version = "3.8" -description = "Define boolean algebras, create and parse boolean expressions and create custom boolean DSL." -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "certifi" version = "2021.5.30" @@ -70,14 +51,6 @@ category = "dev" optional = false python-versions = ">=3.6.1" -[[package]] -name = "chardet" -version = "4.0.0" -description = "Universal encoding detector for Python 2 and 3" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - [[package]] name = "charset-normalizer" version = "2.0.3" @@ -190,43 +163,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "jinja2" -version = "2.11.3" -description = "A very fast and expressive template engine." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[package.dependencies] -MarkupSafe = ">=0.23" - -[package.extras] -i18n = ["Babel (>=0.8)"] - -[[package]] -name = "license-expression" -version = "21.6.14" -description = "license-expression is a comprehensive utility library to parse, compare, simplify and normalize license expressions (such as SPDX license expressions) using boolean logic." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -"boolean.py" = ">=3.6,<4.0.0" - -[package.extras] -docs = ["Sphinx (>=3.3.1)", "sphinx-rtd-theme (>=0.5.0)", "doc8 (>=0.8.1)"] -testing = ["pytest (>=6)", "pytest-xdist (>=2)"] - -[[package]] -name = "markupsafe" -version = "2.0.1" -description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" -optional = false -python-versions = ">=3.6" - [[package]] name = "nodeenv" version = "1.6.0" @@ -342,18 +278,6 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] -[[package]] -name = "python-debian" -version = "0.1.40" -description = "Debian package related modules" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -chardet = "*" -six = "*" - [[package]] name = "pyyaml" version = "5.4.1" @@ -380,22 +304,6 @@ urllib3 = ">=1.21.1,<1.27" socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] -[[package]] -name = "reuse" -version = "0.13.0" -description = "reuse is a tool for compliance with the REUSE recommendations." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -binaryornot = "*" -"boolean.py" = "*" -Jinja2 = "*" -license-expression = "*" -python-debian = "*" -requests = "*" - [[package]] name = "six" version = "1.16.0" @@ -462,14 +370,6 @@ category = "dev" optional = false python-versions = ">=3.6" -[[package]] -name = "tomlkit" -version = "0.7.2" -description = "Style preserving TOML library" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - [[package]] name = "typing-extensions" version = "3.10.0.0" @@ -526,7 +426,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "e9b1fa6fa30f86a9d2e33e460ee3f076687d95a450a1e06ea78f7e646c32eb3f" +content-hash = "c29d5a63dbafdc47edb9ab5fa9bcfa1e973918dad5f9fb2e4063d032943d948c" [metadata.files] atomicwrites = [ @@ -541,14 +441,6 @@ attrs = [ {file = "backports.entry_points_selectable-1.1.0-py2.py3-none-any.whl", hash = "sha256:a6d9a871cde5e15b4c4a53e3d43ba890cc6861ec1332c9c2428c92f977192acc"}, {file = "backports.entry_points_selectable-1.1.0.tar.gz", hash = "sha256:988468260ec1c196dab6ae1149260e2f5472c9110334e5d51adcb77867361f6a"}, ] -binaryornot = [ - {file = "binaryornot-0.4.4-py2.py3-none-any.whl", hash = "sha256:b8b71173c917bddcd2c16070412e369c3ed7f0528926f70cac18a6c97fd563e4"}, - {file = "binaryornot-0.4.4.tar.gz", hash = "sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061"}, -] -"boolean.py" = [ - {file = "boolean.py-3.8-py2.py3-none-any.whl", hash = "sha256:d75da0fd0354425fa64f6bbc6cec6ae1485d0eec3447b73187ff8cbf9b572e26"}, - {file = "boolean.py-3.8.tar.gz", hash = "sha256:cc24e20f985d60cd4a3a5a1c0956dd12611159d32a75081dabd0c9ab981acaa4"}, -] certifi = [ {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"}, {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, @@ -557,10 +449,6 @@ cfgv = [ {file = "cfgv-3.3.0-py2.py3-none-any.whl", hash = "sha256:b449c9c6118fe8cca7fa5e00b9ec60ba08145d281d52164230a69211c5d597a1"}, {file = "cfgv-3.3.0.tar.gz", hash = "sha256:9e600479b3b99e8af981ecdfc80a0296104ee610cab48a5ae4ffd0b668650eb1"}, ] -chardet = [ - {file = "chardet-4.0.0-py2.py3-none-any.whl", hash = "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"}, - {file = "chardet-4.0.0.tar.gz", hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"}, -] charset-normalizer = [ {file = "charset-normalizer-2.0.3.tar.gz", hash = "sha256:c46c3ace2d744cfbdebceaa3c19ae691f53ae621b39fd7570f59d14fb7f2fd12"}, {file = "charset_normalizer-2.0.3-py3-none-any.whl", hash = "sha256:88fce3fa5b1a84fdcb3f603d889f723d1dd89b26059d0123ca435570e848d5e1"}, @@ -636,70 +524,6 @@ iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] -jinja2 = [ - {file = "Jinja2-2.11.3-py2.py3-none-any.whl", hash = "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419"}, - {file = "Jinja2-2.11.3.tar.gz", hash = "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"}, -] -license-expression = [ - {file = "license-expression-21.6.14.tar.gz", hash = "sha256:9de87a427c9a449eee7913472fb9ed03b63036295547369fdbf95f76a8b924b2"}, - {file = "license_expression-21.6.14-py3-none-any.whl", hash = "sha256:324246eed8e138b4139fefdc0e9dc4161d5075e3929e56983966d37298dca30e"}, -] -markupsafe = [ - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, - {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, -] nodeenv = [ {file = "nodeenv-1.6.0-py2.py3-none-any.whl", hash = "sha256:621e6b7076565ddcacd2db0294c0381e01fd28945ab36bcf00f41c5daf63bef7"}, {file = "nodeenv-1.6.0.tar.gz", hash = "sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b"}, @@ -736,11 +560,6 @@ pytest-cov = [ {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, ] -python-debian = [ - {file = "python-debian-0.1.40.tar.gz", hash = "sha256:385dfb965eca75164d256486c7cf9bae772d24144249fd18b9d15d3cffb70eea"}, - {file = "python_debian-0.1.40-py3-none-any.whl", hash = "sha256:55d33ff6d78be995aba5a14a82d83aae8a8f5bb9a36712796dac179cc68fab0c"}, - {file = "python_debian-0.1.40-py3.9.egg", hash = "sha256:ee943a2442f5e6ff51ccf2088796748abbc9089b49c0a0e178346519b6dff1bc"}, -] pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, @@ -776,10 +595,6 @@ requests = [ {file = "requests-2.26.0-py2.py3-none-any.whl", hash = "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24"}, {file = "requests-2.26.0.tar.gz", hash = "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"}, ] -reuse = [ - {file = "reuse-0.13.0-py3-none-any.whl", hash = "sha256:49d89aee8f76794e734ad6416c6be0d2ad9a415f4472fd4547754039e8630e0f"}, - {file = "reuse-0.13.0.tar.gz", hash = "sha256:89c87bd49308c8059cc36f8116872d73dc6e5788a29af8869be6532202bff801"}, -] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -807,10 +622,6 @@ tomli = [ {file = "tomli-1.2.1-py3-none-any.whl", hash = "sha256:8dd0e9524d6f386271a36b41dbf6c57d8e32fd96fd22b6584679dc569d20899f"}, {file = "tomli-1.2.1.tar.gz", hash = "sha256:a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442"}, ] -tomlkit = [ - {file = "tomlkit-0.7.2-py2.py3-none-any.whl", hash = "sha256:173ad840fa5d2aac140528ca1933c29791b79a374a0861a80347f42ec9328117"}, - {file = "tomlkit-0.7.2.tar.gz", hash = "sha256:d7a454f319a7e9bd2e249f239168729327e4dd2d27b17dc68be264ad1ce36754"}, -] typing-extensions = [ {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, {file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"}, diff --git a/pyproject.toml b/pyproject.toml index 99d1bb7..142a5ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,12 +30,8 @@ splunktalib = "^2.0.0" [tool.poetry.dev-dependencies] pytest = "^6.2" pytest-cov = "^3" -tomlkit = "^0" -reuse = "*" pre-commit = "^2.15.0" -[tool.poetry-dynamic-versioning] -enable = true [build-system] requires = ["poetry>=1.0.0"] From eb7bfc4959bdb219e74a35ec75762ef96b379932 Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Tue, 12 Oct 2021 17:22:15 +0530 Subject: [PATCH 12/13] test: updated publish stage --- .github/workflows/build-test-release.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 4954a00..a0133a3 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -139,7 +139,7 @@ jobs: path: dist/ publish: - if: github.event_name != 'pull_request' + if: always() needs: - pre-commit - semgrep @@ -147,7 +147,26 @@ jobs: - build - review_secrets runs-on: ubuntu-latest + env: + NEEDS: ${{ toJson(needs) }} steps: + - name: check if tests have passed or skipped + if: github.event_name != 'pull_request' + id: check + shell: bash + run: | + RUN_PUBLISH=$(echo "$NEEDS" | jq ".[] | select( ( .result != \"skipped\" ) and .result != \"success\" ) | length == 0") + if [[ $RUN_PUBLISH != *'false'* ]] + then + echo "::set-output name=run-publish::true" + else + echo "::set-output name=run-publish::false" + fi + - name: exit without publish + if: ${{ steps.check.outputs.run-publish == 'false' || github.event_name == 'pull_request'}} + run: | + echo " some test job failed. " + exit 1 - name: Checkout uses: actions/checkout@v2 with: From 92f90f95d8a4391bb24be555b8a0fd17091f84ed Mon Sep 17 00:00:00 2001 From: harshilgajera-crest Date: Wed, 13 Oct 2021 18:58:15 +0530 Subject: [PATCH 13/13] test: updated token in publish stage --- .github/workflows/build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index a0133a3..dba4dab 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -181,7 +181,7 @@ jobs: @semantic-release/git @google/semantic-release-replace-plugin env: - GITHUB_TOKEN: ${{ secrets.SEMREL_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }} PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} update-semver: