diff --git a/.github/workflows/black-format-code.yml b/.github/workflows/black-format-code.yml deleted file mode 100644 index 99796d1a..00000000 --- a/.github/workflows/black-format-code.yml +++ /dev/null @@ -1,53 +0,0 @@ -# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project # noqa E501 -# -# SPDX-License-Identifier: MPL-2.0 - -# Copied from https://github.com/psf/black/actions/runs/17913292/workflow - -# GitHub Action that uses Black to reformat the Python code in an incoming pull request. -# If all Python code in the pull request is compliant with Black then this Action -# does nothing. Otherwise, Black is run and its changes are committed to the -# incoming pull request. See https://github.com/cclauss/autoblack for a similar example. - -name: Black Format Code - -on: [pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.10'] - - steps: - # Checkout - - name: Checkout - uses: actions/checkout@v2 - # Setup - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - # Install black - - name: Install Black - run: pip install black==23.9.1 pydocstyle==6.1.1 docformatter==1.5.0 toml==0.10.2 - # Run black --check - - name: Run black --check . and PydocStyle check - run: | - black --check . - pydocstyle . - # Run black (if needed) - - name: If needed, commit black changes to the pull request - if: failure() - run: | - black . - docformatter openstef --recursive --wrap-summaries 120 --in-place - git config --global user.name 'black' - git config --global user.email 'action@github.com' - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY - git fetch - git checkout ${{ github.head_ref }} - git commit --signoff -am "Format Python code with Black" - git push diff --git a/.github/workflows/docs-check.yaml b/.github/workflows/docs-check.yaml deleted file mode 100644 index da391663..00000000 --- a/.github/workflows/docs-check.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project -# -# SPDX-License-Identifier: MPL-2.0 -name: Docs Check - -# Check docs when directly editing develop or main -# and on pull request -on: - push: - branches: - - main - pull_request: - branches: - - "**" - -jobs: - docs: - runs-on: ubuntu-latest - steps: - # Checkout - - name: Checkout code - uses: actions/checkout@v2 - - # Setup python version - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - # Build documentation - - name: Build documentation - run: | - cp requirements.txt docs/requirements.txt &&\ - printf "\npydata-sphinx-theme==0.12.0\n" >> docs/requirements.txt &&\ - printf "\njinja2==3.0.0\n" >> docs/requirements.txt &&\ - printf "\nsphinx_autodoc_typehints==1.19.4\n" >> docs/requirements.txt &&\ - printf "\nmkdocs==1.2.3\n" >> docs/requirements.txt &&\ - pip install -r docs/requirements.txt &&\ - sphinx-apidoc -o docs openstef diff --git a/.github/workflows/docs-publish.yaml b/.github/workflows/docs-publish.yaml deleted file mode 100644 index 9081479f..00000000 --- a/.github/workflows/docs-publish.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project # noqa E501 -# -# SPDX-License-Identifier: MPL-2.0 -name: Deploy Sphinx documentation to Pages - -# Runs on pushes targeting the default branch -on: - push: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-python@v2 - - uses: actions/checkout@master - with: - fetch-depth: 0 # otherwise, you will fail to push refs to dest repo - - # Setup python version - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - # Run pre-build command - - run: | - cp requirements.txt docs/requirements.txt &&\ - printf "\npydata-sphinx-theme==0.12.0\n" >> docs/requirements.txt &&\ - printf "\njinja2==3.0.0\n" >> docs/requirements.txt &&\ - printf "\nsphinx_autodoc_typehints==1.19.4\n" >> docs/requirements.txt &&\ - printf "\nmkdocs==1.2.3\n" >> docs/requirements.txt &&\ - pip install -r docs/requirements.txt &&\ - sphinx-apidoc -o docs openstef - - - name: Build and commit - uses: sphinx-notes/pages@v2 - with: - requirements_path: ./docs/requirements.txt - - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages diff --git a/.github/workflows/pr-labeler.yaml b/.github/workflows/pr-labeler.yaml deleted file mode 100644 index 19cd88b4..00000000 --- a/.github/workflows/pr-labeler.yaml +++ /dev/null @@ -1,19 +0,0 @@ - -# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project # noqa E501 -# -# SPDX-License-Identifier: MPL-2.0 -# Automatically label PRs, config in ../pr-labler.yml -name: PR Labeler -on: - pull_request: - types: [opened] - -jobs: - pr-labeler: - runs-on: ubuntu-latest - steps: - - uses: TimonVS/pr-labeler-action@v3 - with: - configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python-build.yaml b/.github/workflows/python-build.yaml index 18172fd1..e86d1379 100644 --- a/.github/workflows/python-build.yaml +++ b/.github/workflows/python-build.yaml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ["3.10", "3.9"] diff --git a/.github/workflows/python-upload-package.yaml b/.github/workflows/python-upload-package.yaml deleted file mode 100644 index 81520cba..00000000 --- a/.github/workflows/python-upload-package.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project # noqa E501 -# -# SPDX-License-Identifier: MPL-2.0 -name: Python Upload Package - -on: - - release - -jobs: - deploy: - runs-on: ubuntu-latest - environment: release - permissions: - # IMPORTANT: this permission is mandatory for trusted publishing - id-token: write - steps: - # Checkout - - name: Checkout code - uses: actions/checkout@v2 - # Setup - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - # Install (packaging) dependencies - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - # Build and publish - - name: Build - run: python setup.py sdist bdist_wheel - - name: Publish - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 3b34356f..00000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project # noqa E501 -# -# SPDX-License-Identifier: MPL-2.0 - -name: Release - -# Trigger when a python file is changed on main branch either from pull request or push -# but not when only setup.py is changed due to version bump -on: - push: - branches: - - 'main' - paths: - - '**.py' - - '!setup.py' - - 'requirements.txt' - -jobs: - # Releases new Python version when Pull Requests are merged into "main" - release: - runs-on: ubuntu-latest - steps: - # Checkout - - name: Checkout - uses: actions/checkout@v2 - with: - persist-credentials: false - # Setup - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - # Bump and commit version. The upload to pypi step happens after github release. - - name: Bump version and commit bumped version back to branch - env: - GITHUB_ACCESS_TOKEN: ${{ secrets.OPENSTEF_GITHUB_TOKEN }} - id: version - run: | - version=$(python .github/bump_version.py) - git config --global user.name 'bump_version' - git config --global user.email 'action@github.com' - git remote set-url origin "https://$GITHUB_ACCESS_TOKEN@github.com/$GITHUB_REPOSITORY" - git commit --signoff -am "Bumped minor version" - git push - echo "BUMPED_VERSION=$(echo v$version)" >> $GITHUB_ENV - echo "New version: $version" - # Create new release (does not work with standard github token, but needs PAT) - - name: Create Release - run: gh release create ${{ env.BUMPED_VERSION }} --generate-notes - env: - GITHUB_TOKEN: ${{ secrets.OPENSTEF_GITHUB_TOKEN }} diff --git a/.github/workflows/reuse-compliance.yaml b/.github/workflows/reuse-compliance.yaml deleted file mode 100644 index 869fa2a4..00000000 --- a/.github/workflows/reuse-compliance.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project # noqa E501 -# -# SPDX-License-Identifier: MPL-2.0 -name: REUSE Compliance Check - -on: - - push - -jobs: - test: - runs-on: ubuntu-latest - steps: - # Checkout - - name: checkout - uses: actions/checkout@v2 - # Reuse - - name: REUSE Compliance Check - uses: fsfe/reuse-action@v1