From da2e90a3ee0234507c58316d9715bb96bce59b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 15 May 2023 17:57:04 +0300 Subject: [PATCH 01/67] [DOP-4041] Bump version --- evacuator/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evacuator/VERSION b/evacuator/VERSION index e4c0d46..a6a3a43 100644 --- a/evacuator/VERSION +++ b/evacuator/VERSION @@ -1 +1 @@ -1.0.3 \ No newline at end of file +1.0.4 \ No newline at end of file From 35da761321a1a7d8daed15bbac84e0acca248191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 15 May 2023 18:02:46 +0300 Subject: [PATCH 02/67] [DOP-4041] Update setup.py --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5942a77..5b4b389 100644 --- a/setup.py +++ b/setup.py @@ -39,14 +39,17 @@ def get_version(): include_package_data=True, zip_safe=False, classifiers=[ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", - "Operating System :: OS Independent", + "Typing :: Typed", ], project_urls={ "Documentation": "https://evacuator.readthedocs.io", From 20f4365677eb1acecd66d4557a6f67967e2c46e3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 May 2023 01:48:40 +0000 Subject: [PATCH 03/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - https://github.com/ambv/black → https://github.com/psf/black --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bab8c15..034cc0d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] -- repo: https://github.com/ambv/black +- repo: https://github.com/psf/black rev: 23.3.0 hooks: - id: black From 4c2522ca18420bccc75997418e06e0d25e6de4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Fri, 19 May 2023 11:50:54 +0300 Subject: [PATCH 04/67] [DOP-5430] Update author name --- docs/conf.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 72bfc44..e513bb4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,8 +24,8 @@ # -- Project information ----------------------------------------------------- project = "Evacuator" -copyright = "2023, ONEtools Team" -author = "ONEtools Team" +copyright = "2023, DataOps.ETL" +author = "DataOps.ETL" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/setup.py b/setup.py index 5b4b389..23cd0a7 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def get_version(): license_files=("LICENSE.txt",), url="https://github.com/MobileTeleSystems/evacuator", packages=find_packages(exclude=["docs", "docs.*", "tests", "tests.*"]), - author="ONEtools Team", + author="DataOps.ETL", author_email="onetools@mts.ru", python_requires=">=3.7", include_package_data=True, From 301bba1e1837239acb6afc123fd0c01791acbf32 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 02:19:47 +0000 Subject: [PATCH 05/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.4.0 → v3.6.0](https://github.com/asottile/pyupgrade/compare/v3.4.0...v3.6.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 034cc0d..64a00f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.4.0 + rev: v3.6.0 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] From 94ca0eeb15785dd98a73980f43c8a08652071473 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 20 Jun 2023 02:50:43 +0000 Subject: [PATCH 06/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.2.4 → v2.2.5](https://github.com/codespell-project/codespell/compare/v2.2.4...v2.2.5) - [github.com/asottile/pyupgrade: v3.6.0 → v3.7.0](https://github.com/asottile/pyupgrade/compare/v3.6.0...v3.7.0) - [github.com/asottile/blacken-docs: 1.13.0 → 1.14.0](https://github.com/asottile/blacken-docs/compare/1.13.0...1.14.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 64a00f6..dad85e1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: - id: remove-tabs exclude: ^docs/(make.bat|Makefile) - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.5 hooks: - id: codespell args: [-w] @@ -49,7 +49,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.6.0 + rev: v3.7.0 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] @@ -59,7 +59,7 @@ repos: - id: black language_version: python3 - repo: https://github.com/asottile/blacken-docs - rev: 1.13.0 + rev: 1.14.0 hooks: - id: blacken-docs - repo: meta From 397668b6a61cf7177db7424183a7a3656cdc0877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Wed, 21 Jun 2023 15:54:19 +0300 Subject: [PATCH 07/67] Update release CI --- .github/workflows/dev-release.yml | 51 ++++++++----------------------- .github/workflows/release.yml | 17 ++++++++--- 2 files changed, 25 insertions(+), 43 deletions(-) diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index c2ddb4b..7a2f229 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -8,6 +8,9 @@ on: - master workflow_dispatch: +env: + DEFAULT_PYTHON: '3.11' + concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true @@ -18,52 +21,23 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'MobileTeleSystems/evacuator' # prevent running on forks - steps: - - uses: fountainhead/action-wait-for-check@v1.1.0 - id: wait-for-linters - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Linters - ref: ${{ github.sha }} - timeoutSeconds: 3600 - - - name: Fail the Build - uses: cutenode/action-always-fail@v1 - if: steps.wait-for-linters.outputs.conclusion != 'success' - - - uses: fountainhead/action-wait-for-check@v1.1.0 - id: wait-for-codeql - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: CodeQL - ref: ${{ github.sha }} - timeoutSeconds: 3600 - - - name: Fail the Build - uses: cutenode/action-always-fail@v1 - if: steps.wait-for-codeql.outputs.conclusion != 'success' - - - uses: fountainhead/action-wait-for-check@v1.1.0 - id: wait-for-tests - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Tests done - ref: ${{ github.sha }} - timeoutSeconds: 3600 - - - name: Fail the Build - uses: cutenode/action-always-fail@v1 - if: steps.wait-for-tests.outputs.conclusion != 'success' + environment: + name: test-pypi + url: https://test.pypi.org/p/evacuator + permissions: + id-token: write # to auth in Test PyPI + steps: - name: Checkout code uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up Python 3.11 + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + id: python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ env.DEFAULT_PYTHON }} - name: Upgrade pip run: python -m pip install --upgrade pip setuptools wheel @@ -74,5 +48,4 @@ jobs: - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 006c6a3..21f1813 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,22 +5,33 @@ on: tags: - '[0-9]+.[0-9]+.[0-9]+' +env: + DEFAULT_PYTHON: '3.11' + jobs: release: name: Release package runs-on: ubuntu-latest if: github.repository == 'MobileTeleSystems/evacuator' # prevent running on forks + environment: + name: pypi + url: https://pypi.org/p/evacuator + permissions: + id-token: write # to auth in PyPI + contents: write # to create Github release + steps: - name: Checkout code uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up Python 3.11 + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + id: python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ env.DEFAULT_PYTHON }} - name: Upgrade pip run: python -m pip install --upgrade pip setuptools wheel @@ -30,5 +41,3 @@ jobs: - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} From 3764d5fedd3d0a0e65d1b16e0f2ecdb3ab3f50da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Wed, 21 Jun 2023 16:14:31 +0300 Subject: [PATCH 08/67] Update release CI --- .github/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 21f1813..c00f25e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,3 +41,13 @@ jobs: - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 + + - name: Create Github release + id: create_release + uses: softprops/action-gh-release@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + draft: false + prerelease: false + files: | + dist/* From 7af2957eb52555968cb69c1f1230f215f430d060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Wed, 21 Jun 2023 16:25:28 +0300 Subject: [PATCH 09/67] Add autoapprove action for pre-commit --- .github/workflows/automerge.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/automerge.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..2ab7013 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,27 @@ +name: Automerge + +on: + pull_request_target: + +jobs: + automerge: + name: Enable pull request automerge + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]' + + steps: + - uses: alexwilson/enable-github-automerge-action@1.0.0 + with: + github-token: ${{ secrets.PERSONAL_TOKEN }} + merge-method: REBASE + + autoapprove: + name: Automatically approve pull request + needs: [automerge] + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]' + + steps: + - uses: hmarr/auto-approve-action@v3 + with: + github-token: ${{ secrets.PERSONAL_TOKEN }} From da7b424935d9603d83bfd53fa4df33ff52171a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Wed, 21 Jun 2023 16:30:05 +0300 Subject: [PATCH 10/67] Rename autoapprove token --- .github/workflows/automerge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 2ab7013..be7746b 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: alexwilson/enable-github-automerge-action@1.0.0 with: - github-token: ${{ secrets.PERSONAL_TOKEN }} + github-token: ${{ secrets.AUTOMERGE_TOKEN }} merge-method: REBASE autoapprove: @@ -24,4 +24,4 @@ jobs: steps: - uses: hmarr/auto-approve-action@v3 with: - github-token: ${{ secrets.PERSONAL_TOKEN }} + github-token: ${{ secrets.AUTOMERGE_TOKEN }} From c2123cb9feb4fb2d61c1069adbf82822bcf1a302 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 03:16:54 +0000 Subject: [PATCH 11/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.7.0 → v3.8.0](https://github.com/asottile/pyupgrade/compare/v3.7.0...v3.8.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dad85e1..dc71e28 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.7.0 + rev: v3.8.0 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] From 9c5f4a98078e47b05fb69f8c572ff1e6a4ab91d6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 11 Jul 2023 03:22:26 +0000 Subject: [PATCH 12/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.8.0 → v3.9.0](https://github.com/asottile/pyupgrade/compare/v3.8.0...v3.9.0) - [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0) - [github.com/asottile/blacken-docs: 1.14.0 → 1.15.0](https://github.com/asottile/blacken-docs/compare/1.14.0...1.15.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dc71e28..b899377 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,17 +49,17 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.8.0 + rev: v3.9.0 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black language_version: python3 - repo: https://github.com/asottile/blacken-docs - rev: 1.14.0 + rev: 1.15.0 hooks: - id: blacken-docs - repo: meta From 087799c8b2208575645958eec5e19c0722c75ab3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 03:42:20 +0000 Subject: [PATCH 13/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/macisamuele/language-formatters-pre-commit-hooks: v2.9.0 → v2.10.0](https://github.com/macisamuele/language-formatters-pre-commit-hooks/compare/v2.9.0...v2.10.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b899377..2c2c5fa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: - id: codespell args: [-w] - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.9.0 + rev: v2.10.0 hooks: - id: pretty-format-yaml args: [--autofix, --indent, '2'] From eb27093a00931cccb9d14a5815220518c77629d3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 04:55:16 +0000 Subject: [PATCH 14/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.9.0 → v3.10.1](https://github.com/asottile/pyupgrade/compare/v3.9.0...v3.10.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2c2c5fa..992092c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.10.1 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] From 1c179d0dcca21789c64bc40b0712d304120a3a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 3 Aug 2023 12:12:54 +0300 Subject: [PATCH 15/67] [DOP-7895] Update Python version in ReadTheDocs config --- .readthedocs.yaml | 8 ++++++-- requirements-docs.txt | 4 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8afe6de..8ae799f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,8 +1,12 @@ version: 2 +build: + os: ubuntu-22.04 + tools: + python: '3.11' + python: - version: '3.7' install: - - requirements: requirements-docs.txt + - requirements: requirements/docs.txt - method: pip path: . diff --git a/requirements-docs.txt b/requirements-docs.txt index 2e1f6f1..8f69d91 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -3,6 +3,4 @@ numpydoc packaging sphinx sphinx-copybutton -# ReadTheDocs uses old OpenSSL version -# https://github.com/urllib3/urllib3/issues/2168 -urllib3<2.0 +urllib3 From a10220ba9758976c9e20b1088ceb9a0d8f5e8326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 3 Aug 2023 13:13:30 +0300 Subject: [PATCH 16/67] [DOP-7895] Update Python version in ReadTheDocs config --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8ae799f..a61c65b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,6 +7,6 @@ build: python: install: - - requirements: requirements/docs.txt + - requirements: requirements-docs.txt - method: pip path: . From aa27597b2d1a16dc9233fcf4d1f50af18175187e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 03:53:15 +0000 Subject: [PATCH 17/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/Lucas-C/pre-commit-hooks: v1.5.1 → v1.5.3](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.5.1...v1.5.3) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 992092c..c9b1d6a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: args: [--django] - id: trailing-whitespace - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.1 + rev: v1.5.3 hooks: - id: remove-tabs exclude: ^docs/(make.bat|Makefile) From b09eea97cdfd08ef1429f52c7e5b07a66c8a8888 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 04:08:17 +0000 Subject: [PATCH 18/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/Lucas-C/pre-commit-hooks: v1.5.3 → v1.5.4](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.5.3...v1.5.4) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c9b1d6a..b4f259e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: args: [--django] - id: trailing-whitespace - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.3 + rev: v1.5.4 hooks: - id: remove-tabs exclude: ^docs/(make.bat|Makefile) From f2328c0e2e5b4e16bc159677e812454d0749b69b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 04:16:27 +0000 Subject: [PATCH 19/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/blacken-docs: 1.15.0 → 1.16.0](https://github.com/asottile/blacken-docs/compare/1.15.0...1.16.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4f259e..48c94fc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -59,7 +59,7 @@ repos: - id: black language_version: python3 - repo: https://github.com/asottile/blacken-docs - rev: 1.15.0 + rev: 1.16.0 hooks: - id: blacken-docs - repo: meta From 852dd22f4ff316c3ed294896b93fa9f9fca8227b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 4 Sep 2023 16:18:58 +0300 Subject: [PATCH 20/67] [DOP-8511] Sync CHANGELOG and CONTRIBUTING with onETL --- .github/PULL_REQUEST_TEMPLATE.md | 24 ++ .github/workflows/changelog.yml | 62 +++++ .github/workflows/release.yml | 57 +++++ CONTRIBUTING.rst | 233 ++++++++++++++++-- README.rst | 76 ------ docs/changelog.rst | 9 + docs/changelog/1.0.1.rst | 7 + docs/changelog/1.0.2.rst | 7 + docs/changelog/1.0.3.rst | 8 + docs/changelog/DRAFT.rst | 1 + docs/changelog/NEXT_RELEASE.rst | 5 + docs/changelog/index.rst | 9 + .../next_release/+.improvement.1.rst | 3 + docs/changelog/next_release/.keep | 0 docs/conf.py | 13 +- docs/develop.rst | 2 - docs/index.rst | 2 +- pyproject.toml | 48 ++++ requirements-docs.txt | 4 + 19 files changed, 465 insertions(+), 105 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/changelog.yml create mode 100644 docs/changelog.rst create mode 100644 docs/changelog/1.0.1.rst create mode 100644 docs/changelog/1.0.2.rst create mode 100644 docs/changelog/1.0.3.rst create mode 100644 docs/changelog/DRAFT.rst create mode 100644 docs/changelog/NEXT_RELEASE.rst create mode 100644 docs/changelog/index.rst create mode 100644 docs/changelog/next_release/+.improvement.1.rst create mode 100644 docs/changelog/next_release/.keep delete mode 100644 docs/develop.rst diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..631ac4e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,24 @@ + + + + + +## Change Summary + + + +## Related issue number + + + + +## Checklist + +* [ ] Commit message and PR title is comprehensive +* [ ] Keep the change as small as possible +* [ ] Unit and integration tests for the changes exist +* [ ] Tests pass on CI and coverage does not decrease +* [ ] Documentation reflects the changes where applicable +* [ ] `docs/changelog/next_release/..rst` file added describing change + (see [CONTRIBUTING.rst](https://github.com/MobileTeleSystems/evacuator/blob/develop/CONTRIBUTING.rst) for details.) +* [ ] My PR is ready to review. diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..7d5db94 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,62 @@ +name: Changelog + +on: + pull_request: + types: [opened, synchronize, labeled, unlabeled, reopened] + branches-ignore: + - master + +env: + DEFAULT_PYTHON: '3.11' + +permissions: + contents: read + +jobs: + check-changelog: + name: Changelog Entry Check + runs-on: ubuntu-latest + timeout-minutes: 10 + if: "!contains(github.event.pull_request.labels.*.name, 'ci:skip-changelog') && github.event.pull_request.user.login != 'pre-commit-ci[bot]' && github.event.pull_request.user.login != 'dependabot[bot]'" + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + id: python + uses: actions/setup-python@v4 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Cache pip + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements-docs.txt') }} + restore-keys: | + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements-docs.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog- + + - name: Upgrade pip + run: python -m pip install --upgrade pip setuptools wheel + + - name: Install dependencies + run: | + pip install -I requirements-docs.txt + + - name: Check changelog entry exists + run: | + if [ ! -s docs/changelog/next_release/${{ github.event.pull_request.number }}.*.rst ]; then + echo "Please add corresponding file 'docs/changelog/next_release/..rst' with changes description" + exit 1 + fi + + - name: Validate changelog + run: | + # Fetch the pull request' base branch so towncrier will be able to + # compare the current branch with the base branch. + git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }} + towncrier check --compare-with origin/${{ github.base_ref }} + towncrier --draft diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c00f25e..c21ba4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,15 +33,70 @@ jobs: with: python-version: ${{ env.DEFAULT_PYTHON }} + - name: Cache pip + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release-${{ hashFiles('requirements-docs.txt') }} + restore-keys: | + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release-${{ hashFiles('requirements-docs.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release- + - name: Upgrade pip run: python -m pip install --upgrade pip setuptools wheel + - name: Install dependencies + run: | + pip install -I -r requirements-docs.txt + - name: Build package run: python setup.py sdist bdist_wheel - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 + - name: Get changelog + run: | + cat docs/changelog/${{ github.ref_name }}.rst > changelog.rst + + - name: Fix Github links + run: | + # Replace Github links from Sphinx syntax with Markdown + sed -i -E 's/:github:issue:`(.*)`/#\1/g' changelog.rst + sed -i -E 's/:github:pull:`(.*)`/#\1/g' changelog.rst + sed -i -E 's/:github:user:`(.*)`/@\1/g' changelog.rst + sed -i -E 's/:github:org:`(.*)`/@\1/g' changelog.rst + + - name: Convert changelog to markdown + uses: docker://pandoc/core:2.9 + with: + args: >- + --output=changelog.md + --from=rst + --to=gfm + --wrap=none + changelog.rst + + - name: Fix Github code blocks + run: | + # Replace ``` {.python caption="abc"} with ```python caption="abc" + sed -i -E 's/``` \{\.(.*)\}/```\1/g' changelog.md + + # Replace ``` python with ```python + sed -i -E 's/``` (\w+)/```\1/g' changelog.md + + - name: Get release name + id: release-name + run: | + # Release name looks like: 0.7.0 (2023-05-15) + echo -n name= > "$GITHUB_OUTPUT" + cat changelog.md | head -1 | sed -E "s/#+\s*//g" >> "$GITHUB_OUTPUT" + + - name: Fix headers + run: | + # Remove header with release name + sed -i -e '1,2d' changelog.md + - name: Create Github release id: create_release uses: softprops/action-gh-release@v1 @@ -49,5 +104,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} draft: false prerelease: false + name: ${{ steps.release-name.outputs.name }} + body_path: changelog.md files: | dist/* diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 18aa848..db5e3da 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -6,11 +6,94 @@ reports, improving documentation, submitting feature requests, reviewing new submissions, or contributing code that can be incorporated into the project. -Please, don't use the issue tracker for support questions. Instead use: -`email `__. +Initial setup for local development +----------------------------------- -Feature Requests ----------------- +Install Git +~~~~~~~~~~~ + +Please follow `instruction `_. + +Create a fork +~~~~~~~~~~~~~ + +If you are not a member of a development team building Evacuator, you should create a fork before making any changes. + +Please follow `instruction `_. + +Clone the repo +~~~~~~~~~~~~~~ + +Open terminal and run these commands: + +.. code:: bash + + git clone git@github.com:myuser/evacuator.git -b develop + + cd evacuator + +Setup environment +~~~~~~~~~~~~~~~~~ + +Create virtualenv and install dependencies: + +.. code:: bash + + # create virtual environment + python -m venv venv + source venv/bin/activate + pip install -U wheel + pip install -U pip setuptools + + # install requirements + pip install -U \ + -r requirements-dev.txt \ + -r requirements-docs.txt \ + -r requirements-test.txt + +Enable pre-commit hooks +~~~~~~~~~~~~~~~~~~~~~~~ + +Install pre-commit hooks: + +.. code:: bash + + pre-commit install --install-hooks + +Test pre-commit hooks run: + +.. code:: bash + + pre-commit run + +How to +------ + + +Run tests +~~~~~~~~~ + +.. code:: bash + + # run tests + pytest + + +Build documentation +~~~~~~~~~~~~~~~~~~~ + +Build documentation using Sphinx: + +.. code:: bash + + cd docs + make html + +Then open in browser ``docs/_build/index.html``. + + +Review process +-------------- Please create a new GitHub issue for any significant changes and enhancements that you wish to make. Provide the feature you would like @@ -24,26 +107,126 @@ benefits of the feature. Small Changes can directly be crafted and submitted to the GitHub Repository as a Pull Request. -Pull Request Process --------------------- - -1. Update the README.md with details of changes to the interface, - including new environment variables, exposed ports, proper file - locations, and container parameters. -2. Increase the version numbers in any examples files and the README.md - to the new version that this Pull Request would represent. The - versioning scheme we use is SemVer. -3. You may merge the Pull Request in once you have the sign-off of two - other developers, or if you do not have permission to do that, you - may request the second reviewer to merge it for you. We expect to - have a minimum of one approval from someone else on the core team. - -Review Process --------------- +Create pull request +~~~~~~~~~~~~~~~~~~~ + +Commit your changes: + +.. code:: bash + + git commit -m "Commit message" + git push + +Then open Github interface and `create pull request `_. +Please follow guide from PR body template. + +After pull request is created, it get a corresponding number, e.g. 123 (``pr_number``). + +Write release notes +~~~~~~~~~~~~~~~~~~~ + +``Evacuator`` uses `towncrier `_ +for changelog management. + +To submit a change note about your PR, add a text file into the +`docs/changelog/next_release <./next_release>`_ folder. It should contain an +explanation of what applying this PR will change in the way +end-users interact with the project. One sentence is usually +enough but feel free to add as many details as you feel necessary +for the users to understand what it means. + +**Use the past tense** for the text in your fragment because, +combined with others, it will be a part of the "news digest" +telling the readers **what changed** in a specific version of +the library *since the previous version*. + +You should also use +reStructuredText syntax for highlighting code (inline or block), +linking parts of the docs or external sites. +If you wish to sign your change, feel free to add ``-- by +:user:`github-username``` at the end (replace ``github-username`` +with your own!). + +Finally, name your file following the convention that Towncrier +understands: it should start with the number of an issue or a +PR followed by a dot, then add a patch type, like ``feature``, +``doc``, ``misc`` etc., and add ``.rst`` as a suffix. If you +need to add more than one fragment, you may add an optional +sequence number (delimited with another period) between the type +and the suffix. + +In general the name will follow ``..rst`` pattern, +where the categories are: + +- ``feature``: Any new feature +- ``bugfix``: A bug fix +- ``improvement``: An improvement +- ``doc``: A change to the documentation +- ``dependency``: Dependency-related changes +- ``misc``: Changes internal to the repo like CI, test and build changes + +A pull request may have more than one of these components, for example +a code change may introduce a new feature that deprecates an old +feature, in which case two fragments should be added. It is not +necessary to make a separate documentation fragment for documentation +changes accompanying the relevant code changes. + +Examples for adding changelog entries to your Pull Requests +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: rst + :caption: docs/changelog/next_release/1234.doc.1.rst + + Added a ``:github:user:`` role to Sphinx config -- by :github:user:`someuser` + +.. code-block:: rst + :caption: docs/changelog/next_release/2345.bugfix.rst + + Fixed behavior of ``WebDAV`` connector -- by :github:user:`someuser` + +.. code-block:: rst + :caption: docs/changelog/next_release/3456.feature.rst + + Added support of ``timeout`` in ``S3`` connector + -- by :github:user:`someuser`, :github:user:`anotheruser` and :github:user:`otheruser` + +.. tip:: + + See `pyproject.toml <../../pyproject.toml>`_ for all available categories + (``tool.towncrier.type``). + +.. _Towncrier philosophy: + https://towncrier.readthedocs.io/en/stable/#philosophy + + +Examples for adding changelog entries to your Pull Requests +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: rst + :caption: docs/changelog/next_release/1234.doc.1.rst + + Added a ``:github:user:`` role to Sphinx config -- by :github:user:`someuser` + +.. code-block:: rst + :caption: docs/changelog/next_release/2345.bugfix.rst + + Fixed behavior of ``WebDAV`` connector -- by :github:user:`someuser` + +.. code-block:: rst + :caption: docs/changelog/next_release/3456.feature.rst + + Added support of ``timeout`` in ``S3`` connector + -- by :github:user:`someuser`, :github:user:`anotheruser` and :github:user:`otheruser` + +.. tip:: + + See `pyproject.toml <../../pyproject.toml>`_ for all available categories + (``tool.towncrier.type``). + +.. _Towncrier philosophy: + https://towncrier.readthedocs.io/en/stable/#philosophy -We keep pull requests open for a few days for multiple people to have -the chance to review/comment. +How to skip change notes check? +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -After feedback has been given, we expect responses within two weeks. -After two weeks, we may close the pull request if it isn't showing any -activity. +Just add ``ci:skip-changelog`` label to pull request. diff --git a/README.rst b/README.rst index 892932e..4dfa1a6 100644 --- a/README.rst +++ b/README.rst @@ -62,79 +62,3 @@ Security ------------------- See ``__ - -.. develops - -Develop -------- - -Clone repo -~~~~~~~~~~ - -Clone repo: - -.. code:: bash - - git clone git@github.com:MobileTeleSystems/evacuator.git -b develop - - cd evacuator - -Setup environment -~~~~~~~~~~~~~~~~~ - -Create virtualenv: - -.. code:: bash - - python -m venv venv - source venv/bin/activate - pip install -U wheel - pip install -U pip setuptools - -Install dependencies for development: - -.. code:: bash - - # install linters, formatters, etc - pip install -U -r requirements-dev.txt - -Enable pre-commit hooks -~~~~~~~~~~~~~~~~~~~~~~~ - -Install pre-commit hooks: - -.. code:: bash - - pre-commit install --install-hooks - -Test pre-commit hooks run: - -.. code:: bash - - pre-commit run - -Run tests -~~~~~~~~~ - -.. code:: bash - - # install requirements for testing - pip install -U -r requirements-test.txt - - # run tests - pytest - -Build documentation -~~~~~~~~~~~~~~~~~~~ - -.. code:: bash - - # install requirements for documentation - pip install -U -r requirements-docs.txt - - cd docs - - # generate html documentation - make html - -Then open ``docs/_build/html/index.html`` file in browser. diff --git a/docs/changelog.rst b/docs/changelog.rst new file mode 100644 index 0000000..4d895f9 --- /dev/null +++ b/docs/changelog.rst @@ -0,0 +1,9 @@ +========= +Changelog +========= + +.. toctree:: + :maxdepth: 1 + :caption: Changelog + + changelog/index diff --git a/docs/changelog/1.0.1.rst b/docs/changelog/1.0.1.rst new file mode 100644 index 0000000..1c8a89b --- /dev/null +++ b/docs/changelog/1.0.1.rst @@ -0,0 +1,7 @@ +1.0.1 (2022-07-18) +------------------ + +Bug Fixes +^^^^^^^^^ + +- Fix flake8 warnings diff --git a/docs/changelog/1.0.2.rst b/docs/changelog/1.0.2.rst new file mode 100644 index 0000000..3f532cb --- /dev/null +++ b/docs/changelog/1.0.2.rst @@ -0,0 +1,7 @@ +1.0.2 (2023-02-27) +------------------ + +🎉 Evacuator is now open source 🎉 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +That was long road, but we finally did it! diff --git a/docs/changelog/1.0.3.rst b/docs/changelog/1.0.3.rst new file mode 100644 index 0000000..97e23df --- /dev/null +++ b/docs/changelog/1.0.3.rst @@ -0,0 +1,8 @@ +1.0.2 (2023-05-15) +------------------ + +Improvements +^^^^^^^^^^^^ + +- Change docs there to Furo +- Sync project structure and CI with onetl diff --git a/docs/changelog/DRAFT.rst b/docs/changelog/DRAFT.rst new file mode 100644 index 0000000..d396f60 --- /dev/null +++ b/docs/changelog/DRAFT.rst @@ -0,0 +1 @@ +.. towncrier-draft-entries:: |release| [UNRELEASED] diff --git a/docs/changelog/NEXT_RELEASE.rst b/docs/changelog/NEXT_RELEASE.rst new file mode 100644 index 0000000..5e26856 --- /dev/null +++ b/docs/changelog/NEXT_RELEASE.rst @@ -0,0 +1,5 @@ +.. copy this file with new release name +.. then fill it up using towncrier build +.. and add it to index.rst + +.. towncrier release notes start diff --git a/docs/changelog/index.rst b/docs/changelog/index.rst new file mode 100644 index 0000000..2af61c0 --- /dev/null +++ b/docs/changelog/index.rst @@ -0,0 +1,9 @@ +.. toctree:: + :maxdepth: 1 + :caption: Changelog + + DRAFT + NEXT_RELEASE + 1.0.3 + 1.0.2 + 1.0.1 diff --git a/docs/changelog/next_release/+.improvement.1.rst b/docs/changelog/next_release/+.improvement.1.rst new file mode 100644 index 0000000..2a1ee7f --- /dev/null +++ b/docs/changelog/next_release/+.improvement.1.rst @@ -0,0 +1,3 @@ +Added changelog. + +Changelog is generated from separated news files using `towncrier `_. diff --git a/docs/changelog/next_release/.keep b/docs/changelog/next_release/.keep new file mode 100644 index 0000000..e69de29 diff --git a/docs/conf.py b/docs/conf.py index e513bb4..0ab0548 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,7 +19,9 @@ from packaging import version as Version -sys.path.insert(0, os.fspath(Path(__file__).parent.parent.absolute())) +PROJECT_ROOT_DIR = Path(__file__).parent.parent.resolve() + +sys.path.insert(0, os.fspath(PROJECT_ROOT_DIR)) # -- Project information ----------------------------------------------------- @@ -48,6 +50,8 @@ "sphinx_copybutton", "sphinx.ext.autodoc", "sphinx.ext.autosummary", + "sphinx_toolbox.github", + "sphinxcontrib.towncrier", # provides `towncrier-draft-entries` directive ] numpydoc_show_class_members = False @@ -91,3 +95,10 @@ # Output file base name for HTML help builder. htmlhelp_basename = "evacuator-doc" + +towncrier_draft_autoversion_mode = "draft" +towncrier_draft_include_empty = False +towncrier_draft_working_directory = PROJECT_ROOT_DIR + +github_username = "MobileTeleSystems" +github_repository = "evacuator" diff --git a/docs/develop.rst b/docs/develop.rst deleted file mode 100644 index d9ae1a8..0000000 --- a/docs/develop.rst +++ /dev/null @@ -1,2 +0,0 @@ -.. include:: ../README.rst - :start-after: develops diff --git a/docs/index.rst b/docs/index.rst index df8cc46..027dd95 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -22,6 +22,6 @@ :name: develop :hidden: - develop + changelog contributing security diff --git a/pyproject.toml b/pyproject.toml index 7e56421..080ac12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,3 +15,51 @@ ignore_missing_imports = true pretty = true show_error_codes = true strict_optional = true + +[tool.towncrier] +name = "Evacuator" +package = "evacuator" +filename = "docs/changelog/NEXT_RELEASE.rst" +directory = "docs/changelog/next_release/" +title_format = "{version} ({project_date})" +issue_format = ":github:pull:`{issue}`" + +[[tool.towncrier.type]] +directory = "breaking" +name = "Breaking Changes" +showcontent = true + +[[tool.towncrier.type]] +directory = "significant" +name = "Significant Changes" +showcontent = true + +[[tool.towncrier.type]] +directory = "feature" +name = "Features" +showcontent = true + +[[tool.towncrier.type]] +directory = "improvement" +name = "Improvements" +showcontent = true + +[[tool.towncrier.type]] +directory = "bugfix" +name = "Bug Fixes" +showcontent = true + +[[tool.towncrier.type]] +directory = "dependency" +name = "Dependencies" +showcontent = true + +[[tool.towncrier.type]] +directory = "doc" +name = "Doc only Changes" +showcontent = true + +[[tool.towncrier.type]] +directory = "misc" +name = "Misc" +showcontent = true diff --git a/requirements-docs.txt b/requirements-docs.txt index 8f69d91..4a64feb 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,6 +1,10 @@ furo +importlib-resources<6 numpydoc packaging sphinx sphinx-copybutton +sphinx-toolbox +sphinxcontrib-towncrier +towncrier urllib3 From 3a5c22b463b7630d69e71c9d5a104d2a1da1b0c8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 05:29:27 +0000 Subject: [PATCH 21/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48c94fc..5b069ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black language_version: python3 From c2865dfdb0b4e532d1303f1b45de04a7f7bb4e1b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 04:54:33 +0000 Subject: [PATCH 22/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.10.1 → v3.11.0](https://github.com/asottile/pyupgrade/compare/v3.10.1...v3.11.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5b069ba..b56307d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.10.1 + rev: v3.11.0 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] From 250104984af03672861a711410c817a6a99c579d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 05:09:45 +0000 Subject: [PATCH 23/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.11.0 → v3.13.0](https://github.com/asottile/pyupgrade/compare/v3.11.0...v3.13.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b56307d..0922697 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.11.0 + rev: v3.13.0 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] From 6967b1e0ada23f898b4a3e7150d6d413e90a2d06 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 06:20:26 +0000 Subject: [PATCH 24/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.2.5 → v2.2.6](https://github.com/codespell-project/codespell/compare/v2.2.5...v2.2.6) - [github.com/asottile/pyupgrade: v3.13.0 → v3.14.0](https://github.com/asottile/pyupgrade/compare/v3.13.0...v3.14.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0922697..1bcd5fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: - id: remove-tabs exclude: ^docs/(make.bat|Makefile) - repo: https://github.com/codespell-project/codespell - rev: v2.2.5 + rev: v2.2.6 hooks: - id: codespell args: [-w] @@ -49,7 +49,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.13.0 + rev: v3.14.0 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] From aa4b5bd91828daf12b58bd5c3c0589015a1a5af8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 19:58:00 +0000 Subject: [PATCH 25/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0) - [github.com/asottile/pyupgrade: v3.14.0 → v3.15.0](https://github.com/asottile/pyupgrade/compare/v3.14.0...v3.15.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1bcd5fd..af4a106 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-ast - id: check-case-conflict @@ -49,7 +49,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.14.0 + rev: v3.15.0 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] From 92161f5081f6bfe05dade52b8ceceaf49e0ef278 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:33:12 +0000 Subject: [PATCH 26/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/macisamuele/language-formatters-pre-commit-hooks: v2.10.0 → v2.11.0](https://github.com/macisamuele/language-formatters-pre-commit-hooks/compare/v2.10.0...v2.11.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af4a106..d71c674 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: - id: codespell args: [-w] - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.10.0 + rev: v2.11.0 hooks: - id: pretty-format-yaml args: [--autofix, --indent, '2'] From c4993cdc2ce54a7280233d85e6ff554a67336ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Fri, 20 Oct 2023 11:19:13 +0300 Subject: [PATCH 27/67] [DOP-10124] Update pre-commit hooks --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d71c674..b186b21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,8 +53,8 @@ repos: hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] -- repo: https://github.com/psf/black - rev: 23.9.1 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 23.10.0 hooks: - id: black language_version: python3 From 81e1dd4edf38ca36afc79ca80d52daabb78bba2a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 19:42:41 +0000 Subject: [PATCH 28/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black-pre-commit-mirror: 23.10.0 → 23.10.1](https://github.com/psf/black-pre-commit-mirror/compare/23.10.0...23.10.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b186b21..8c2a2eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.10.0 + rev: 23.10.1 hooks: - id: black language_version: python3 From 77cdcec65156444ac93e3d1e7aa106824c836ecd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:58:48 +0000 Subject: [PATCH 29/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black-pre-commit-mirror: 23.10.1 → 23.11.0](https://github.com/psf/black-pre-commit-mirror/compare/23.10.1...23.11.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c2a2eb..5289415 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.10.1 + rev: 23.11.0 hooks: - id: black language_version: python3 From 289f1ccbbbb098353c3b25681c85242d601e182c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 21 Nov 2023 18:46:11 +0300 Subject: [PATCH 30/67] [DOP-10628] Fix contribution guide --- CONTRIBUTING.rst | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index db5e3da..44add78 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -192,35 +192,7 @@ Examples for adding changelog entries to your Pull Requests .. tip:: - See `pyproject.toml <../../pyproject.toml>`_ for all available categories - (``tool.towncrier.type``). - -.. _Towncrier philosophy: - https://towncrier.readthedocs.io/en/stable/#philosophy - - -Examples for adding changelog entries to your Pull Requests -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: rst - :caption: docs/changelog/next_release/1234.doc.1.rst - - Added a ``:github:user:`` role to Sphinx config -- by :github:user:`someuser` - -.. code-block:: rst - :caption: docs/changelog/next_release/2345.bugfix.rst - - Fixed behavior of ``WebDAV`` connector -- by :github:user:`someuser` - -.. code-block:: rst - :caption: docs/changelog/next_release/3456.feature.rst - - Added support of ``timeout`` in ``S3`` connector - -- by :github:user:`someuser`, :github:user:`anotheruser` and :github:user:`otheruser` - -.. tip:: - - See `pyproject.toml <../../pyproject.toml>`_ for all available categories + See `pyproject.toml `_ for all available categories (``tool.towncrier.type``). .. _Towncrier philosophy: From 72aa7ea498b6ce94df7fd96a88bcc91552c9976b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 19:53:17 +0000 Subject: [PATCH 31/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/isort: 5.12.0 → 5.13.0](https://github.com/pycqa/isort/compare/5.12.0...5.13.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5289415..871665a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: - id: pretty-format-yaml args: [--autofix, --indent, '2'] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.0 hooks: - id: isort - repo: https://github.com/pre-commit/pygrep-hooks From f7073ed5e2fce8746feda4b7cf79dc190e066b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 18 Dec 2023 00:38:11 +0300 Subject: [PATCH 32/67] [DOP-9619] Update release process --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c21ba4c..bc39090 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,7 +59,7 @@ jobs: run: | cat docs/changelog/${{ github.ref_name }}.rst > changelog.rst - - name: Fix Github links + - name: Prepare rST syntax for conversion to Markdown run: | # Replace Github links from Sphinx syntax with Markdown sed -i -E 's/:github:issue:`(.*)`/#\1/g' changelog.rst @@ -77,7 +77,7 @@ jobs: --wrap=none changelog.rst - - name: Fix Github code blocks + - name: Fixing Markdown syntax after conversion run: | # Replace ``` {.python caption="abc"} with ```python caption="abc" sed -i -E 's/``` \{\.(.*)\}/```\1/g' changelog.md @@ -85,6 +85,9 @@ jobs: # Replace ``` python with ```python sed -i -E 's/``` (\w+)/```\1/g' changelog.md + # Replace \# with # + sed -i -E 's/\\#/#/g' changelog.md + - name: Get release name id: release-name run: | From 198f1ba7b10313c3020585d8de43c891412dcd16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 18 Dec 2023 00:40:15 +0300 Subject: [PATCH 33/67] [DOP-9619] Update pre-commit hooks --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 871665a..88a3bac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: - id: pretty-format-yaml args: [--autofix, --indent, '2'] - repo: https://github.com/pycqa/isort - rev: 5.13.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/pre-commit/pygrep-hooks @@ -54,7 +54,7 @@ repos: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.11.0 + rev: 23.12.0 hooks: - id: black language_version: python3 From 6d5f82bdd6440dfd43631f759e5e10478b7bf04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 19 Dec 2023 12:09:11 +0300 Subject: [PATCH 34/67] [DOP-11096] Add tricoder entrypoint --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 23cd0a7..1a416eb 100644 --- a/setup.py +++ b/setup.py @@ -57,4 +57,5 @@ def get_version(): "CI/CD": "https://github.com/MobileTeleSystems/evacuator/actions", "Tracker": "https://github.com/MobileTeleSystems/evacuator/issues", }, + entry_points={"tricoder_package_spy.register": ["evacuator=evacuator"]}, ) From 3abd2d2e16d70994e9d2ce7961fcc240b22bb35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 19 Dec 2023 12:14:26 +0300 Subject: [PATCH 35/67] [DOP-11096] Improve typing --- evacuator/__init__.py | 2 ++ evacuator/core.py | 8 +++++--- setup.cfg | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/evacuator/__init__.py b/evacuator/__init__.py index 1b61b81..5f60737 100644 --- a/evacuator/__init__.py +++ b/evacuator/__init__.py @@ -15,3 +15,5 @@ from evacuator.core import evacuator from evacuator.exception import NeedEvacuation from evacuator.version import __version__ + +__all__ = ["evacuator", "NeedEvacuation", "__version__"] diff --git a/evacuator/core.py b/evacuator/core.py index 2cac9ac..9d1259f 100644 --- a/evacuator/core.py +++ b/evacuator/core.py @@ -18,20 +18,22 @@ import sys from dataclasses import dataclass from functools import wraps -from typing import Callable, NoReturn, Type +from typing import Callable, NoReturn, Type, TypeVar from evacuator.exception import NeedEvacuation logger = logging.getLogger(__name__) +T = TypeVar("T", bound=Callable) + ECANCELED = 125 def evacuator( - func: Callable | None = None, + func: T | None = None, exception: Type[Exception] | tuple[Type[Exception], ...] = NeedEvacuation, exit_code: int = ECANCELED, -): +) -> T | Callable[[T], T]: """Catch specific exception and exit with exit code. Can be used as either decorator or context manager diff --git a/setup.cfg b/setup.cfg index 33ad7bf..fb2bf7e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -251,6 +251,8 @@ ignore = WPS601, # WPS604 Found incorrect node inside `class` body: pass WPS604, +# WPS410 Found wrong metadata variable: __all__ + WPS410 # http://flake8.pycqa.org/en/latest/user/options.html?highlight=per-file-ignores#cmdoption-flake8-per-file-ignores From 2c5080668406d2c343cf134db013181189976cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 19 Dec 2023 12:18:38 +0300 Subject: [PATCH 36/67] [DOP-11096] Check Python 3.12 compatibility --- .github/workflows/changelog.yml | 2 +- .github/workflows/codeql-analysis.yml | 18 +++++++++++------- .github/workflows/dev-release.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 15 +++++++++------ .readthedocs.yaml | 2 +- setup.py | 1 + 7 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 7d5db94..ad97044 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -7,7 +7,7 @@ on: - master env: - DEFAULT_PYTHON: '3.11' + DEFAULT_PYTHON: '3.12' permissions: contents: read diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f1d3b5a..bf27563 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,6 +13,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true +env: + # flake8-commas is failing on Python 3.12 + DEFAULT_PYTHON: '3.11' + jobs: linters: name: Linters @@ -26,19 +30,19 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Set up Python 3.11 + - name: Set up Python ${{ env.DEFAULT_PYTHON }} uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ env.DEFAULT_PYTHON }} - name: Cache pip uses: actions/cache@v3 with: path: ~/.cache/pip - key: ${{ runner.os }}-python-3.11-codeql-${{ hashFiles('requirements*.txt') }} + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }} restore-keys: | - ${{ runner.os }}-python-3.11-codeql-${{ hashFiles('requirements*.txt') }} - ${{ runner.os }}-python-3.11-codeql- + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql- ${{ runner.os }}-python ${{ runner.os }}- @@ -71,10 +75,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Set up Python 3.11 + - name: Set up Python ${{ env.DEFAULT_PYTHON }} uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ env.DEFAULT_PYTHON }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index 7a2f229..f1a9797 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: env: - DEFAULT_PYTHON: '3.11' + DEFAULT_PYTHON: '3.12' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc39090..e762f3e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: - '[0-9]+.[0-9]+.[0-9]+' env: - DEFAULT_PYTHON: '3.11' + DEFAULT_PYTHON: '3.12' jobs: release: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c07283..0e882be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true +env: + DEFAULT_PYTHON: '3.12' + jobs: tests: name: Run tests (${{ matrix.python-version }} on ${{ matrix.os }}) @@ -19,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.7', '3.11', '3.12'] os: [ubuntu-latest] steps: @@ -76,19 +79,19 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Set up Python 3.11 + - name: Set up Python ${{ env. DEFAULT_PYTHON }} uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ env.DEFAULT_PYTHON }} - name: Cache pip uses: actions/cache@v3 with: path: ~/.cache/pip - key: ${{ runner.os }}-python-3.11-coverage-${{ hashFiles('requirements*.txt') }} + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-${{ hashFiles('requirements*.txt') }} restore-keys: | - ${{ runner.os }}-python-3.11-coverage-${{ hashFiles('requirements*.txt') }} - ${{ runner.os }}-python-3.11-coverage- + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-${{ hashFiles('requirements*.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage- ${{ runner.os }}-python ${{ runner.os }}- diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a61c65b..586d275 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: '3.11' + python: '3.12' python: install: diff --git a/setup.py b/setup.py index 1a416eb..a137775 100644 --- a/setup.py +++ b/setup.py @@ -49,6 +49,7 @@ def get_version(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ], project_urls={ From 8b4c0e720929a58270e362414a3f210dee97863d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 19 Dec 2023 12:33:44 +0300 Subject: [PATCH 37/67] [DOP-11096] Update README --- README.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 4dfa1a6..badec13 100644 --- a/README.rst +++ b/README.rst @@ -27,11 +27,12 @@ What is Evacuator? Decorator/context manager designed to catch a certain exception and exit with specific exit code. Designed to be used in `Apache Airflow `__ with: - * ``BashOperator`` - * ``SSHOperator`` - * ``DockerOperator`` - * ``KubernetesPodOperator`` - * any other operator which can handle process exit codes. + * `BashOperator _` + * `PythonVirtualenvOperator `_ + * `ExternalPythonOperator `_ + * `DockerOperator `_ + * `KubernetesPodOperator `_ + * any other operator support skipping task after process is exited with some specific exit code (``skip_exit_code``, ``skip_on_exit_code`` and so on) .. installation From 6d6736d0319dba5f9abbcc2aa30bfc46fb9f5eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 19 Dec 2023 13:59:01 +0300 Subject: [PATCH 38/67] [DOP-11096] Update README --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index badec13..59b2eb9 100644 --- a/README.rst +++ b/README.rst @@ -27,12 +27,12 @@ What is Evacuator? Decorator/context manager designed to catch a certain exception and exit with specific exit code. Designed to be used in `Apache Airflow `__ with: - * `BashOperator _` + * `BashOperator `_ * `PythonVirtualenvOperator `_ * `ExternalPythonOperator `_ * `DockerOperator `_ * `KubernetesPodOperator `_ - * any other operator support skipping task after process is exited with some specific exit code (``skip_exit_code``, ``skip_on_exit_code`` and so on) + * any other operator support skipping task after process is exited with some specific exit code (``skip_on_exit_code`` option) .. installation From 2a8de794cc46511efa03b2d6bdf2ae344d158a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 19 Dec 2023 14:54:48 +0300 Subject: [PATCH 39/67] [DOP-11096] Add Dependabot --- .github/dependabot.yml | 10 ++++++++++ .github/workflows/changelog.yml | 4 ++-- .github/workflows/codeql-analysis.yml | 12 ++++++------ .github/workflows/dev-release.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 12 ++++++------ 6 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..adafa4a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +# Set update schedule for GitHub Actions + +version: 2 +updates: +- package-ecosystem: github-actions + directory: / + schedule: + interval: daily + labels: + - type:ci diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index ad97044..f034c06 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -20,13 +20,13 @@ jobs: if: "!contains(github.event.pull_request.labels.*.name, 'ci:skip-changelog') && github.event.pull_request.user.login != 'pre-commit-ci[bot]' && github.event.pull_request.user.login != 'dependabot[bot]'" steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ env.DEFAULT_PYTHON }} id: python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ env.DEFAULT_PYTHON }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index bf27563..2774b42 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -28,10 +28,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ env.DEFAULT_PYTHON }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ env.DEFAULT_PYTHON }} @@ -73,20 +73,20 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ env.DEFAULT_PYTHON }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ env.DEFAULT_PYTHON }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: python - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: /language:python diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index f1a9797..4a2bed2 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -29,13 +29,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ env.DEFAULT_PYTHON }} id: python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ env.DEFAULT_PYTHON }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e762f3e..662c4bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,13 +23,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ env.DEFAULT_PYTHON }} id: python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ env.DEFAULT_PYTHON }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e882be..cc0f2c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,12 +27,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -65,7 +65,7 @@ jobs: ./pytest_runner.sh - name: Upload coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ matrix.python-version }}-os-${{ matrix.os }} path: reports/* @@ -77,10 +77,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ env. DEFAULT_PYTHON }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ env.DEFAULT_PYTHON }} @@ -102,7 +102,7 @@ jobs: run: pip install -I -r requirements-test.txt - name: Download all coverage reports - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: reports From 8afc23619d122481e9b735a0b2c939e1b969d470 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 19:43:59 +0000 Subject: [PATCH 40/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/macisamuele/language-formatters-pre-commit-hooks: v2.11.0 → v2.12.0](https://github.com/macisamuele/language-formatters-pre-commit-hooks/compare/v2.11.0...v2.12.0) - [github.com/psf/black-pre-commit-mirror: 23.12.0 → 23.12.1](https://github.com/psf/black-pre-commit-mirror/compare/23.12.0...23.12.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 88a3bac..04c8f4c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: - id: codespell args: [-w] - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.11.0 + rev: v2.12.0 hooks: - id: pretty-format-yaml args: [--autofix, --indent, '2'] @@ -54,7 +54,7 @@ repos: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.12.0 + rev: 23.12.1 hooks: - id: black language_version: python3 From 27889c2d20b997707ea52871d01cd7b9dacba726 Mon Sep 17 00:00:00 2001 From: Maxim Martynov Date: Sat, 6 Jan 2024 12:14:49 +0300 Subject: [PATCH 41/67] [DOP-11096] Update README --- README.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 59b2eb9..283e3ce 100644 --- a/README.rst +++ b/README.rst @@ -27,12 +27,13 @@ What is Evacuator? Decorator/context manager designed to catch a certain exception and exit with specific exit code. Designed to be used in `Apache Airflow `__ with: - * `BashOperator `_ - * `PythonVirtualenvOperator `_ - * `ExternalPythonOperator `_ - * `DockerOperator `_ - * `KubernetesPodOperator `_ - * any other operator support skipping task after process is exited with some specific exit code (``skip_on_exit_code`` option) + * `BashOperator `_ (`airflow>2.1`) + * `PythonVirtualenvOperator `_ (`airflow>=2.6`) + * `ExternalPythonOperator `_ (`airflow>=2.6`) + * `DockerOperator `_ (`apache-airflow-providers-docker>=3.5`) + * `KubernetesPodOperator `_ (`apache-airflow-providers-cncf-kubernetes>=6.1`) + * `SSHOperator `_ (`apache-airflow-providers-ssh>=3.10`) + * any other operator support skipping task when process is exited with some specific exit code (``skip_on_exit_code`` option) .. installation From 043af59bb1d12b8542e21561dbefed51ade50269 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:31:07 +0000 Subject: [PATCH 42/67] Bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/changelog.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index f034c06..9c456ef 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -31,7 +31,7 @@ jobs: python-version: ${{ env.DEFAULT_PYTHON }} - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements-docs.txt') }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2774b42..bf543cc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,7 +36,7 @@ jobs: python-version: ${{ env.DEFAULT_PYTHON }} - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 662c4bd..726a62c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: python-version: ${{ env.DEFAULT_PYTHON }} - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release-${{ hashFiles('requirements-docs.txt') }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cc0f2c9..935dc55 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-python-${{ matrix.python-version }}-tests-${{ hashFiles('requirements*.txt') }} @@ -85,7 +85,7 @@ jobs: python-version: ${{ env.DEFAULT_PYTHON }} - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-${{ hashFiles('requirements*.txt') }} From c56f48cf89b2727ad5eba943ab2c00c3aefd4968 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 19:41:43 +0000 Subject: [PATCH 43/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black-pre-commit-mirror: 23.12.1 → 24.1.1](https://github.com/psf/black-pre-commit-mirror/compare/23.12.1...24.1.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 04c8f4c..f65d558 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black language_version: python3 From 1177a4e50ce0f4388ba11a1224fac4a6a5294f71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 11:06:14 +0000 Subject: [PATCH 44/67] Bump codecov/codecov-action from 3 to 4 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 935dc55..299f4cd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -113,7 +113,7 @@ jobs: run: ./combine_coverage.sh - name: Check coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} directory: ./reports From daed70fb3abb261e1e13e0dc870b67864ac120a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 1 Feb 2024 18:01:39 +0300 Subject: [PATCH 45/67] Fix codecov upload action --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 299f4cd..93297f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -116,8 +116,10 @@ jobs: uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - directory: ./reports + file: ./reports/coverage.xml fail_ci_if_error: true + # TODO: remove after fixing https://github.com/codecov/codecov-cli/issues/367 + plugin: gcov - name: All done run: echo 1 From 40f22be9675e4b4f311ee1a13efa3e8886eea5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 1 Feb 2024 18:10:06 +0300 Subject: [PATCH 46/67] Fix YAML offset --- .github/dependabot.yml | 12 +- .github/workflows/automerge.yml | 14 +- .github/workflows/changelog.yml | 84 ++++++------ .github/workflows/codeql-analysis.yml | 104 +++++++-------- .github/workflows/dev-release.yml | 48 +++---- .github/workflows/release.yml | 180 +++++++++++++------------- .github/workflows/test.yml | 180 +++++++++++++------------- .pre-commit-config.yaml | 179 +++++++++++++------------ .readthedocs.yaml | 6 +- 9 files changed, 410 insertions(+), 397 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index adafa4a..a5c01be 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,9 +2,9 @@ version: 2 updates: -- package-ecosystem: github-actions - directory: / - schedule: - interval: daily - labels: - - type:ci + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily + labels: + - type:ci diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index be7746b..eef240e 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -10,10 +10,10 @@ jobs: if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]' steps: - - uses: alexwilson/enable-github-automerge-action@1.0.0 - with: - github-token: ${{ secrets.AUTOMERGE_TOKEN }} - merge-method: REBASE + - uses: alexwilson/enable-github-automerge-action@1.0.0 + with: + github-token: ${{ secrets.AUTOMERGE_TOKEN }} + merge-method: REBASE autoapprove: name: Automatically approve pull request @@ -22,6 +22,6 @@ jobs: if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]' steps: - - uses: hmarr/auto-approve-action@v3 - with: - github-token: ${{ secrets.AUTOMERGE_TOKEN }} + - uses: hmarr/auto-approve-action@v3 + with: + github-token: ${{ secrets.AUTOMERGE_TOKEN }} diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 9c456ef..deedcc6 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -4,7 +4,7 @@ on: pull_request: types: [opened, synchronize, labeled, unlabeled, reopened] branches-ignore: - - master + - master env: DEFAULT_PYTHON: '3.12' @@ -19,44 +19,44 @@ jobs: timeout-minutes: 10 if: "!contains(github.event.pull_request.labels.*.name, 'ci:skip-changelog') && github.event.pull_request.user.login != 'pre-commit-ci[bot]' && github.event.pull_request.user.login != 'dependabot[bot]'" steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.DEFAULT_PYTHON }} - - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements-docs.txt') }} - restore-keys: | - ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements-docs.txt') }} - ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog- - - - name: Upgrade pip - run: python -m pip install --upgrade pip setuptools wheel - - - name: Install dependencies - run: | - pip install -I requirements-docs.txt - - - name: Check changelog entry exists - run: | - if [ ! -s docs/changelog/next_release/${{ github.event.pull_request.number }}.*.rst ]; then - echo "Please add corresponding file 'docs/changelog/next_release/..rst' with changes description" - exit 1 - fi - - - name: Validate changelog - run: | - # Fetch the pull request' base branch so towncrier will be able to - # compare the current branch with the base branch. - git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }} - towncrier check --compare-with origin/${{ github.base_ref }} - towncrier --draft + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + id: python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements-docs.txt') }} + restore-keys: | + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements-docs.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog- + + - name: Upgrade pip + run: python -m pip install --upgrade pip setuptools wheel + + - name: Install dependencies + run: | + pip install -I requirements-docs.txt + + - name: Check changelog entry exists + run: | + if [ ! -s docs/changelog/next_release/${{ github.event.pull_request.number }}.*.rst ]; then + echo "Please add corresponding file 'docs/changelog/next_release/..rst' with changes description" + exit 1 + fi + + - name: Validate changelog + run: | + # Fetch the pull request' base branch so towncrier will be able to + # compare the current branch with the base branch. + git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }} + towncrier check --compare-with origin/${{ github.base_ref }} + towncrier --draft diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index bf543cc..bcc665f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,10 +3,10 @@ name: Code analysis on: push: branches: - - develop + - develop pull_request: branches-ignore: - - master + - master workflow_dispatch: concurrency: @@ -27,41 +27,41 @@ jobs: security-events: write steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python ${{ env.DEFAULT_PYTHON }} - uses: actions/setup-python@v5 - with: - python-version: ${{ env.DEFAULT_PYTHON }} - - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }} - restore-keys: | - ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }} - ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql- - ${{ runner.os }}-python - ${{ runner.os }}- - - - name: Upgrade pip - run: python -m pip install --upgrade pip setuptools wheel - - - name: Install dependencies - run: | - pip install -I -r requirements-dev.txt - - # Set the `CODEQL-PYTHON` environment variable to the Python executable - # that includes the dependencies - echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV - - - name: Run flake8 - run: python3 -m flake8 --config setup.cfg . - - - name: Run mypy - run: python3 -m mypy --config-file setup.cfg evacuator + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql- + ${{ runner.os }}-python + ${{ runner.os }}- + + - name: Upgrade pip + run: python -m pip install --upgrade pip setuptools wheel + + - name: Install dependencies + run: | + pip install -I -r requirements-dev.txt + + # Set the `CODEQL-PYTHON` environment variable to the Python executable + # that includes the dependencies + echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV + + - name: Run flake8 + run: python3 -m flake8 --config setup.cfg . + + - name: Run mypy + run: python3 -m mypy --config-file setup.cfg evacuator codeql: name: CodeQL @@ -72,21 +72,21 @@ jobs: security-events: write steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Set up Python ${{ env.DEFAULT_PYTHON }} - uses: actions/setup-python@v5 - with: - python-version: ${{ env.DEFAULT_PYTHON }} + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.DEFAULT_PYTHON }} # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: python - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: /language:python + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: python + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: /language:python diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index 4a2bed2..dc17552 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -3,9 +3,9 @@ name: Dev release on: push: branches-ignore: - - dependabot/** - - pre-commit-ci-update-config - - master + - dependabot/** + - pre-commit-ci-update-config + - master workflow_dispatch: env: @@ -28,24 +28,24 @@ jobs: id-token: write # to auth in Test PyPI steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.DEFAULT_PYTHON }} - - - name: Upgrade pip - run: python -m pip install --upgrade pip setuptools wheel - - - name: Build package - run: python setup.py sdist bdist_wheel - - - name: Publish package - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + id: python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Upgrade pip + run: python -m pip install --upgrade pip setuptools wheel + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 726a62c..79e3907 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release on: push: tags: - - '[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+' env: DEFAULT_PYTHON: '3.12' @@ -22,92 +22,92 @@ jobs: contents: write # to create Github release steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.DEFAULT_PYTHON }} - - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release-${{ hashFiles('requirements-docs.txt') }} - restore-keys: | - ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release-${{ hashFiles('requirements-docs.txt') }} - ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release- - - - name: Upgrade pip - run: python -m pip install --upgrade pip setuptools wheel - - - name: Install dependencies - run: | - pip install -I -r requirements-docs.txt - - - name: Build package - run: python setup.py sdist bdist_wheel - - - name: Publish package - uses: pypa/gh-action-pypi-publish@release/v1 - - - name: Get changelog - run: | - cat docs/changelog/${{ github.ref_name }}.rst > changelog.rst - - - name: Prepare rST syntax for conversion to Markdown - run: | - # Replace Github links from Sphinx syntax with Markdown - sed -i -E 's/:github:issue:`(.*)`/#\1/g' changelog.rst - sed -i -E 's/:github:pull:`(.*)`/#\1/g' changelog.rst - sed -i -E 's/:github:user:`(.*)`/@\1/g' changelog.rst - sed -i -E 's/:github:org:`(.*)`/@\1/g' changelog.rst - - - name: Convert changelog to markdown - uses: docker://pandoc/core:2.9 - with: - args: >- - --output=changelog.md - --from=rst - --to=gfm - --wrap=none - changelog.rst - - - name: Fixing Markdown syntax after conversion - run: | - # Replace ``` {.python caption="abc"} with ```python caption="abc" - sed -i -E 's/``` \{\.(.*)\}/```\1/g' changelog.md - - # Replace ``` python with ```python - sed -i -E 's/``` (\w+)/```\1/g' changelog.md - - # Replace \# with # - sed -i -E 's/\\#/#/g' changelog.md - - - name: Get release name - id: release-name - run: | - # Release name looks like: 0.7.0 (2023-05-15) - echo -n name= > "$GITHUB_OUTPUT" - cat changelog.md | head -1 | sed -E "s/#+\s*//g" >> "$GITHUB_OUTPUT" - - - name: Fix headers - run: | - # Remove header with release name - sed -i -e '1,2d' changelog.md - - - name: Create Github release - id: create_release - uses: softprops/action-gh-release@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - draft: false - prerelease: false - name: ${{ steps.release-name.outputs.name }} - body_path: changelog.md - files: | - dist/* + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + id: python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release-${{ hashFiles('requirements-docs.txt') }} + restore-keys: | + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release-${{ hashFiles('requirements-docs.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release- + + - name: Upgrade pip + run: python -m pip install --upgrade pip setuptools wheel + + - name: Install dependencies + run: | + pip install -I -r requirements-docs.txt + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + + - name: Get changelog + run: | + cat docs/changelog/${{ github.ref_name }}.rst > changelog.rst + + - name: Prepare rST syntax for conversion to Markdown + run: | + # Replace Github links from Sphinx syntax with Markdown + sed -i -E 's/:github:issue:`(.*)`/#\1/g' changelog.rst + sed -i -E 's/:github:pull:`(.*)`/#\1/g' changelog.rst + sed -i -E 's/:github:user:`(.*)`/@\1/g' changelog.rst + sed -i -E 's/:github:org:`(.*)`/@\1/g' changelog.rst + + - name: Convert changelog to markdown + uses: docker://pandoc/core:2.9 + with: + args: >- + --output=changelog.md + --from=rst + --to=gfm + --wrap=none + changelog.rst + + - name: Fixing Markdown syntax after conversion + run: | + # Replace ``` {.python caption="abc"} with ```python caption="abc" + sed -i -E 's/``` \{\.(.*)\}/```\1/g' changelog.md + + # Replace ``` python with ```python + sed -i -E 's/``` (\w+)/```\1/g' changelog.md + + # Replace \# with # + sed -i -E 's/\\#/#/g' changelog.md + + - name: Get release name + id: release-name + run: | + # Release name looks like: 0.7.0 (2023-05-15) + echo -n name= > "$GITHUB_OUTPUT" + cat changelog.md | head -1 | sed -E "s/#+\s*//g" >> "$GITHUB_OUTPUT" + + - name: Fix headers + run: | + # Remove header with release name + sed -i -e '1,2d' changelog.md + + - name: Create Github release + id: create_release + uses: softprops/action-gh-release@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + draft: false + prerelease: false + name: ${{ steps.release-name.outputs.name }} + body_path: changelog.md + files: | + dist/* diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93297f0..fe00cf2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,10 +2,10 @@ name: Tests on: push: branches: - - develop + - develop pull_request: branches-ignore: - - master + - master workflow_dispatch: concurrency: @@ -26,49 +26,49 @@ jobs: os: [ubuntu-latest] steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-python-${{ matrix.python-version }}-tests-${{ hashFiles('requirements*.txt') }} - restore-keys: | - ${{ runner.os }}-python-${{ matrix.python-version }}-tests-${{ hashFiles('requirements*.txt') }} - ${{ runner.os }}-python-${{ matrix.python-version }}-tests- - ${{ runner.os }}-python - ${{ runner.os }}- - - - name: Upgrade pip - run: python -m pip install --upgrade pip setuptools wheel - - - name: Install dependencies - run: pip install -I -r requirements-test.txt - - - name: Build package - run: | - python setup.py --version - python setup.py bdist_wheel sdist - - - name: Run tests - run: | - mkdir reports/ || echo "Directory exists" - pip install -e . --no-build-isolation - ./pytest_runner.sh - - - name: Upload coverage results - uses: actions/upload-artifact@v4 - with: - name: coverage-${{ matrix.python-version }}-os-${{ matrix.os }} - path: reports/* + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-python-${{ matrix.python-version }}-tests-${{ hashFiles('requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-python-${{ matrix.python-version }}-tests-${{ hashFiles('requirements*.txt') }} + ${{ runner.os }}-python-${{ matrix.python-version }}-tests- + ${{ runner.os }}-python + ${{ runner.os }}- + + - name: Upgrade pip + run: python -m pip install --upgrade pip setuptools wheel + + - name: Install dependencies + run: pip install -I -r requirements-test.txt + + - name: Build package + run: | + python setup.py --version + python setup.py bdist_wheel sdist + + - name: Run tests + run: | + mkdir reports/ || echo "Directory exists" + pip install -e . --no-build-isolation + ./pytest_runner.sh + + - name: Upload coverage results + uses: actions/upload-artifact@v4 + with: + name: coverage-${{ matrix.python-version }}-os-${{ matrix.os }} + path: reports/* all_done: name: Tests done @@ -76,50 +76,50 @@ jobs: needs: [tests] steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python ${{ env. DEFAULT_PYTHON }} - uses: actions/setup-python@v5 - with: - python-version: ${{ env.DEFAULT_PYTHON }} - - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-${{ hashFiles('requirements*.txt') }} - restore-keys: | - ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-${{ hashFiles('requirements*.txt') }} - ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage- - ${{ runner.os }}-python - ${{ runner.os }}- - - - name: Upgrade pip - run: python -m pip install --upgrade pip setuptools wheel - - - name: Install dependencies - run: pip install -I -r requirements-test.txt - - - name: Download all coverage reports - uses: actions/download-artifact@v4 - with: - path: reports - - - name: Move coverage data to the root folder - run: find reports -type f -exec mv '{}' reports \; - - - name: Generate coverate reports - run: ./combine_coverage.sh - - - name: Check coverage - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ./reports/coverage.xml - fail_ci_if_error: true + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{ env. DEFAULT_PYTHON }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-${{ hashFiles('requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-${{ hashFiles('requirements*.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage- + ${{ runner.os }}-python + ${{ runner.os }}- + + - name: Upgrade pip + run: python -m pip install --upgrade pip setuptools wheel + + - name: Install dependencies + run: pip install -I -r requirements-test.txt + + - name: Download all coverage reports + uses: actions/download-artifact@v4 + with: + path: reports + + - name: Move coverage data to the root folder + run: find reports -type f -exec mv '{}' reports \; + + - name: Generate coverate reports + run: ./combine_coverage.sh + + - name: Check coverage + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./reports/coverage.xml + fail_ci_if_error: true # TODO: remove after fixing https://github.com/codecov/codecov-cli/issues/367 - plugin: gcov + plugin: gcov - - name: All done - run: echo 1 + - name: All done + run: echo 1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f65d558..4abccf3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,87 +1,100 @@ +default_language_version: + python: python3.11 + repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 - hooks: - - id: check-ast - - id: check-case-conflict - - id: check-docstring-first - - id: check-merge-conflict - - id: check-toml - - id: check-vcs-permalinks - - id: check-yaml - - id: requirements-txt-fixer - files: ^(requirements.*\.txt)$ - - id: end-of-file-fixer - exclude: ^.*/VERSION$ - - id: fix-byte-order-marker - - id: fix-encoding-pragma - args: [--remove] - - id: name-tests-test - files: ^tests/.*\.py$ - args: [--django] - - id: trailing-whitespace -- repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.4 - hooks: - - id: remove-tabs - exclude: ^docs/(make.bat|Makefile) -- repo: https://github.com/codespell-project/codespell - rev: v2.2.6 - hooks: - - id: codespell - args: [-w] -- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.12.0 - hooks: - - id: pretty-format-yaml - args: [--autofix, --indent, '2'] -- repo: https://github.com/pycqa/isort - rev: 5.13.2 - hooks: - - id: isort -- repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.10.0 - hooks: - - id: python-no-log-warn - - id: python-no-eval - - id: rst-backticks - - id: rst-directive-colons - - id: rst-inline-touching-normal - - id: text-unicode-replacement-char -- repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 - hooks: - - id: pyupgrade - args: [--py37-plus, --keep-runtime-typing] -- repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.1.1 - hooks: - - id: black - language_version: python3 -- repo: https://github.com/asottile/blacken-docs - rev: 1.16.0 - hooks: - - id: blacken-docs -- repo: meta - hooks: - - id: check-hooks-apply - - id: check-useless-excludes -- repo: local - hooks: - - id: flake8 - name: flake8 - entry: python3 -m flake8 . - language: system - types: [python] - pass_filenames: false - - id: mypy - name: mypy - entry: python3 -m mypy --config-file setup.cfg evacuator - language: system - types: [python] - pass_filenames: false + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-ast + - id: check-case-conflict + - id: check-docstring-first + - id: check-merge-conflict + - id: check-toml + - id: check-vcs-permalinks + - id: check-yaml + - id: requirements-txt-fixer + files: ^(requirements.*\.txt)$ + - id: end-of-file-fixer + exclude: ^.*/VERSION$ + - id: fix-byte-order-marker + - id: fix-encoding-pragma + args: [--remove] + - id: name-tests-test + files: ^tests/.*\.py$ + args: [--django] + - id: trailing-whitespace + + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.5.4 + hooks: + - id: remove-tabs + exclude: ^docs/(make.bat|Makefile) + + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + args: [-w] + + - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.12.0 + hooks: + - id: pretty-format-yaml + args: [--autofix, --indent, '2', --offset, '2'] + + - repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: python-no-log-warn + - id: python-no-eval + - id: rst-backticks + - id: rst-directive-colons + - id: rst-inline-touching-normal + - id: text-unicode-replacement-char + + - repo: https://github.com/asottile/pyupgrade + rev: v3.15.0 + hooks: + - id: pyupgrade + args: [--py37-plus, --keep-runtime-typing] + + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.1.1 + hooks: + - id: black + language_version: python3 + + - repo: https://github.com/asottile/blacken-docs + rev: 1.16.0 + hooks: + - id: blacken-docs + + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + + - repo: local + hooks: + - id: flake8 + name: flake8 + entry: python3 -m flake8 . + language: system + types: [python] + pass_filenames: false + - id: mypy + name: mypy + entry: python3 -m mypy --config-file setup.cfg evacuator + language: system + types: [python] + pass_filenames: false ci: skip: - - flake8 # checked with Github Actions - - mypy # checked with Github Actions + - flake8 # checked with Github Actions + - mypy # checked with Github Actions diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 586d275..655c9c1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,6 +7,6 @@ build: python: install: - - requirements: requirements-docs.txt - - method: pip - path: . + - requirements: requirements-docs.txt + - method: pip + path: . From 19de90141e8ed7118bd6fd0a3577e3e2523f18ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 1 Feb 2024 18:17:51 +0300 Subject: [PATCH 47/67] Update blacken-docs --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4abccf3..6316314 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -73,6 +73,8 @@ repos: rev: 1.16.0 hooks: - id: blacken-docs + additional_dependencies: + - black==24.1.1 - repo: meta hooks: From dbbeb405a64e5f46585ed0bb3da8f589cdb43777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Fri, 2 Feb 2024 11:01:50 +0300 Subject: [PATCH 48/67] [DOP-3161] Automatically add license header --- .pre-commit-config.yaml | 17 ++++++++++++++++- .spdx-license-header.txt | 2 ++ LICENSE.txt | 2 +- docs/conf.py | 2 +- docs/make.bat | 20 ++++++++++---------- evacuator/__init__.py | 16 ++-------------- evacuator/core.py | 16 ++-------------- evacuator/exception.py | 17 ++--------------- evacuator/version.py | 16 ++-------------- setup.py | 4 +++- 10 files changed, 41 insertions(+), 71 deletions(-) create mode 100644 .spdx-license-header.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6316314..c66ded4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,8 +27,23 @@ repos: - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.4 hooks: + - id: forbid-tabs - id: remove-tabs - exclude: ^docs/(make.bat|Makefile) + args: [--whitespaces-count, '2'] + - id: chmod + args: ['644'] + exclude_types: [shell] + - id: chmod + args: ['755'] + types: [shell] + - id: insert-license + files: .*\.py$ + exclude: ^(docs/.*\.py|tests/.*\.py)$ + args: + - --license-filepath + - .spdx-license-header.txt + - --use-current-year + - --no-extra-eol - repo: https://github.com/codespell-project/codespell rev: v2.2.6 diff --git a/.spdx-license-header.txt b/.spdx-license-header.txt new file mode 100644 index 0000000..5c16162 --- /dev/null +++ b/.spdx-license-header.txt @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2022-2024 MTS (Mobile Telesystems) +SPDX-License-Identifier: Apache-2.0 diff --git a/LICENSE.txt b/LICENSE.txt index 67c4288..4c5708d 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2023 MTS (Mobile Telesystems). All rights reserved. +Copyright 2022-2024 MTS (Mobile Telesystems). All rights reserved. Apache License Version 2.0, January 2004 diff --git a/docs/conf.py b/docs/conf.py index 0ab0548..b3d2f42 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ # -- Project information ----------------------------------------------------- project = "Evacuator" -copyright = "2023, DataOps.ETL" +copyright = "2022-2024, DataOps.ETL" author = "DataOps.ETL" # The version info for the project you're documenting, acts as replacement for diff --git a/docs/make.bat b/docs/make.bat index 8084272..53ad1e8 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -5,7 +5,7 @@ pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build + set SPHINXBUILD=sphinx-build ) set SOURCEDIR=. set BUILDDIR=_build @@ -14,15 +14,15 @@ if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.https://www.sphinx-doc.org/ - exit /b 1 + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% diff --git a/evacuator/__init__.py b/evacuator/__init__.py index 5f60737..ecaba91 100644 --- a/evacuator/__init__.py +++ b/evacuator/__init__.py @@ -1,17 +1,5 @@ -# Copyright 2023 MTS (Mobile Telesystems) -# -# 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. - +# SPDX-FileCopyrightText: 2022-2024 MTS (Mobile Telesystems) +# SPDX-License-Identifier: Apache-2.0 from evacuator.core import evacuator from evacuator.exception import NeedEvacuation from evacuator.version import __version__ diff --git a/evacuator/core.py b/evacuator/core.py index 9d1259f..381fcc6 100644 --- a/evacuator/core.py +++ b/evacuator/core.py @@ -1,17 +1,5 @@ -# Copyright 2023 MTS (Mobile Telesystems) -# -# 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. - +# SPDX-FileCopyrightText: 2022-2024 MTS (Mobile Telesystems) +# SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import logging diff --git a/evacuator/exception.py b/evacuator/exception.py index 3b31cee..47f9e1b 100644 --- a/evacuator/exception.py +++ b/evacuator/exception.py @@ -1,17 +1,4 @@ -# Copyright 2023 MTS (Mobile Telesystems) -# -# 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. - - +# SPDX-FileCopyrightText: 2022-2024 MTS (Mobile Telesystems) +# SPDX-License-Identifier: Apache-2.0 class NeedEvacuation(RuntimeError): pass diff --git a/evacuator/version.py b/evacuator/version.py index ee0661f..c87df4d 100644 --- a/evacuator/version.py +++ b/evacuator/version.py @@ -1,17 +1,5 @@ -# Copyright 2023 MTS (Mobile Telesystems) -# -# 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. - +# SPDX-FileCopyrightText: 2022-2024 MTS (Mobile Telesystems) +# SPDX-License-Identifier: Apache-2.0 """ __version__ parameter required to be able to output to the console """ diff --git a/setup.py b/setup.py index a137775..5adba32 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2022-2024 MTS (Mobile Telesystems) +# SPDX-License-Identifier: Apache-2.0 import os from pathlib import Path @@ -29,7 +31,7 @@ def get_version(): description="Catch an exception and exit with an exit code", long_description=long_description, long_description_content_type="text/x-rst", - license="Apache License 2.0", + license="Apache-2.0", license_files=("LICENSE.txt",), url="https://github.com/MobileTeleSystems/evacuator", packages=find_packages(exclude=["docs", "docs.*", "tests", "tests.*"]), From 9beedd7b2e09397d53d875e4801af2e8c95b9d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Fri, 2 Feb 2024 11:11:24 +0300 Subject: [PATCH 49/67] [DOP-3161] Update docs copyright --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index b3d2f42..89bca8a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ # -- Project information ----------------------------------------------------- project = "Evacuator" -copyright = "2022-2024, DataOps.ETL" +copyright = "2022-2024 MTS (Mobile Telesystems)" author = "DataOps.ETL" # The version info for the project you're documenting, acts as replacement for From 55212ff9c346b5857ee8aef9d57b49c0d3f3a62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Fri, 2 Feb 2024 11:19:52 +0300 Subject: [PATCH 50/67] [DOP-3161] Fix pre-commit --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c66ded4..f92de64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -115,3 +115,4 @@ ci: skip: - flake8 # checked with Github Actions - mypy # checked with Github Actions + - chmod # failing in pre-commit.ci From d82458ffa9ef0a7153c0c9c5b92eee7fd4cef8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Fri, 2 Feb 2024 11:27:22 +0300 Subject: [PATCH 51/67] [DOP-3161] Automatically add license header --- .pre-commit-config.yaml | 2 +- setup.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f92de64..6d0bc77 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: types: [shell] - id: insert-license files: .*\.py$ - exclude: ^(docs/.*\.py|tests/.*\.py)$ + exclude: ^(setup\.py|docs/.*\.py|tests/.*\.py)$ args: - --license-filepath - .spdx-license-header.txt diff --git a/setup.py b/setup.py index 5adba32..8dc9168 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ -# SPDX-FileCopyrightText: 2022-2024 MTS (Mobile Telesystems) -# SPDX-License-Identifier: Apache-2.0 import os from pathlib import Path From 409a3ac0254a898fb75ce7a1b97dc28076b11589 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:01:31 +0000 Subject: [PATCH 52/67] Bump hmarr/auto-approve-action from 3 to 4 Bumps [hmarr/auto-approve-action](https://github.com/hmarr/auto-approve-action) from 3 to 4. - [Release notes](https://github.com/hmarr/auto-approve-action/releases) - [Commits](https://github.com/hmarr/auto-approve-action/compare/v3...v4) --- updated-dependencies: - dependency-name: hmarr/auto-approve-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/automerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index eef240e..c29d2d6 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -22,6 +22,6 @@ jobs: if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]' steps: - - uses: hmarr/auto-approve-action@v3 + - uses: hmarr/auto-approve-action@v4 with: github-token: ${{ secrets.AUTOMERGE_TOKEN }} From b7178c2028f19834c6ca4bf9bcca67267bbdb626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 15 Feb 2024 14:20:45 +0300 Subject: [PATCH 53/67] [DOP-13156] Add release instruction --- .pre-commit-config.yaml | 4 +- CONTRIBUTING.rst | 86 +++++++++++++++++++++++++++++++++ docs/changelog/NEXT_RELEASE.rst | 4 -- docs/changelog/index.rst | 1 - 4 files changed, 88 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6d0bc77..e14e8ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -79,7 +79,7 @@ repos: args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.1.1 + rev: 24.2.0 hooks: - id: black language_version: python3 @@ -89,7 +89,7 @@ repos: hooks: - id: blacken-docs additional_dependencies: - - black==24.1.1 + - black==24.2.0 - repo: meta hooks: diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 44add78..95ed374 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -202,3 +202,89 @@ How to skip change notes check? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Just add ``ci:skip-changelog`` label to pull request. + +Release Process +^^^^^^^^^^^^^^^ + +Before making a release from the ``develop`` branch, follow these steps: + +0. Checkout to ``develop`` branch and update it to the actual state + +.. code:: bash + + git checkout develop + git pull -p + +1. Backup ``NEXT_RELEASE.rst`` + +.. code:: bash + + cp "docs/changelog/NEXT_RELEASE.rst" "docs/changelog/temp_NEXT_RELEASE.rst" + +2. Build the Release notes with Towncrier + +.. code:: bash + + VERSION=$(cat evacuator/VERSION) + towncrier build "--version=${VERSION}" --yes + +3. Change file with changelog to release version number + +.. code:: bash + + mv docs/changelog/NEXT_RELEASE.rst "docs/changelog/${VERSION}.rst" + +4. Remove content above the version number heading in the ``${VERSION}.rst`` file + +.. code:: bash + + sed "0,/^.*towncrier release notes start/d" -i "docs/changelog/${VERSION}.rst" + +5. Update Changelog Index + +.. code:: bash + + sed -E "s/DRAFT/DRAFT\n ${VERSION}/" -i "docs/changelog/index.rst" + +6. Restore ``NEXT_RELEASE.rst`` file from backup + +.. code:: bash + + mv "docs/changelog/temp_NEXT_RELEASE.rst" "docs/changelog/NEXT_RELEASE.rst" + +7. Commit and push changes to ``develop`` branch + +.. code:: bash + + git add . + git commit -m "Prepare for release ${VERSION}" + git push + +8. Merge ``develop`` branch to ``master``, **WITHOUT** squashing + +.. code:: bash + + git checkout master + git pull + git merge develop + git push + +9. Add git tag to the latest commit in ``master`` branch + +.. code:: bash + + git tag "$VERSION" + git push origin "$VERSION" + +10. Update version in ``develop`` branch **after release**: + +.. code:: bash + + git checkout develop + + NEXT_VERSION=$(echo "$VERSION" | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.) + echo "$NEXT_VERSION" > evacuator/VERSION + + git add . + git commit -m "Bump version" + git push diff --git a/docs/changelog/NEXT_RELEASE.rst b/docs/changelog/NEXT_RELEASE.rst index 5e26856..28a2621 100644 --- a/docs/changelog/NEXT_RELEASE.rst +++ b/docs/changelog/NEXT_RELEASE.rst @@ -1,5 +1 @@ -.. copy this file with new release name -.. then fill it up using towncrier build -.. and add it to index.rst - .. towncrier release notes start diff --git a/docs/changelog/index.rst b/docs/changelog/index.rst index 2af61c0..e8adc03 100644 --- a/docs/changelog/index.rst +++ b/docs/changelog/index.rst @@ -3,7 +3,6 @@ :caption: Changelog DRAFT - NEXT_RELEASE 1.0.3 1.0.2 1.0.1 From e19718eb02c3b70ac3e2e1ac82ed4544c2e79e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 15 Feb 2024 14:22:34 +0300 Subject: [PATCH 54/67] [DOP-13156] Update Readme --- README.rst | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/README.rst b/README.rst index 283e3ce..fba8793 100644 --- a/README.rst +++ b/README.rst @@ -50,17 +50,3 @@ Documentation ------------- See https://evacuator.readthedocs.io/ - -.. contribution - -Contribution guide -------------------- - -See ``__ - -.. security - -Security -------------------- - -See ``__ From 84bd9ce371f0cf9c4e197d8a640a3ea5370dd357 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:16:24 +0000 Subject: [PATCH 55/67] Bump alexwilson/enable-github-automerge-action from 1.0.0 to 2.0.0 Bumps [alexwilson/enable-github-automerge-action](https://github.com/alexwilson/enable-github-automerge-action) from 1.0.0 to 2.0.0. - [Release notes](https://github.com/alexwilson/enable-github-automerge-action/releases) - [Commits](https://github.com/alexwilson/enable-github-automerge-action/compare/1.0.0...2.0.0) --- updated-dependencies: - dependency-name: alexwilson/enable-github-automerge-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/automerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index c29d2d6..40bec67 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -10,7 +10,7 @@ jobs: if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]' steps: - - uses: alexwilson/enable-github-automerge-action@1.0.0 + - uses: alexwilson/enable-github-automerge-action@2.0.0 with: github-token: ${{ secrets.AUTOMERGE_TOKEN }} merge-method: REBASE From 0975d3bf415dde0d00b0e82f58932903d5dae786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 19 Feb 2024 16:15:31 +0300 Subject: [PATCH 56/67] [DOP-13156] Fix release documentation for MacOS --- CONTRIBUTING.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 95ed374..cdad053 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -238,13 +238,13 @@ Before making a release from the ``develop`` branch, follow these steps: .. code:: bash - sed "0,/^.*towncrier release notes start/d" -i "docs/changelog/${VERSION}.rst" + awk '!/^.*towncrier release notes start/' "docs/changelog/${VERSION}.rst" > temp && mv temp "docs/changelog/${VERSION}.rst" 5. Update Changelog Index .. code:: bash - sed -E "s/DRAFT/DRAFT\n ${VERSION}/" -i "docs/changelog/index.rst" + awk -v version=${VERSION} '/DRAFT/{print;print " " version;next}1' docs/changelog/index.rst > temp && mv temp docs/changelog/index.rst 6. Restore ``NEXT_RELEASE.rst`` file from backup From b16c9d4ef1192eae0f3caa7ee9d6265a2baf6c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 19 Feb 2024 16:35:16 +0300 Subject: [PATCH 57/67] [DOP-11877] Group dependabot PRs --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a5c01be..a6fa654 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,3 +8,8 @@ updates: interval: daily labels: - type:ci + # https://til.simonwillison.net/github/dependabot-python-setup + groups: + github-actions: + patterns: + - '*' From 8fd5578977b967ca8ce6375d2d2a1223ea52442c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 19 Feb 2024 16:43:17 +0300 Subject: [PATCH 58/67] [DOP-13209] Add labels sync workflow --- .github/labels.yml | 61 ++++++++++++++++++++++++++ .github/workflows/repo-labels-sync.yml | 27 ++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 .github/labels.yml create mode 100644 .github/workflows/repo-labels-sync.yml diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..805320f --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,61 @@ +# config for https://github.com/marketplace/actions/github-labeler + + - name: attention:help wanted + description: Extra attention is needed + color: bfdadc + from_name: help wanted + + - name: attention:invalid + description: This doesn't seem right + color: ea2357 + from_name: invalid + + - name: ci:skip-changelog + description: Add this label to skip changelog file check + color: 04990f + + - name: kind:bug + description: Something isn't working + color: d73a4a + from_name: bug + + - name: kind:feature + description: New feature or request + color: 389a3f + + - name: kind:improvement + description: Improvement of some existing feature + color: 1a92c2 + from_name: enhancement + + - name: kind:question + description: Further information is requested + color: 0e857c + from_name: question + + - name: resolution:duplicate + description: This issue or pull request already exists + color: cfd3d7 + from_name: duplicate + + - name: resolution:wontfix + description: This will not be worked on + color: ec103b + from_name: wontfix + + - name: type:ci + description: CI-related changes + color: cdb0bd + + - name: type:dependency + description: Dependency-related changes + color: 214efe + + - name: type:documentation + description: Improvements or additions to documentation + color: 6b9f54 + from_name: documentation + + - name: type:tests + description: Tests-related changes + color: 5cca5b diff --git a/.github/workflows/repo-labels-sync.yml b/.github/workflows/repo-labels-sync.yml new file mode 100644 index 0000000..c0b1e4c --- /dev/null +++ b/.github/workflows/repo-labels-sync.yml @@ -0,0 +1,27 @@ +name: Repo labels sync + +on: + push: + branches: + - develop + paths: + - .github/labels.yml + - .github/workflows/repo-labels-sync.yml + pull_request: + paths: + - .github/labels.yml + - .github/workflows/repo-labels-sync.yml + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Run Labeler + uses: crazy-max/ghaction-github-labeler@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + yaml-file: .github/labels.yml + dry-run: ${{ github.event_name == 'pull_request' }} From 1936e833ae96c5cff41465848dcc8310c9c4aa83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 19 Feb 2024 17:07:30 +0300 Subject: [PATCH 59/67] [DOP-11877] Run Dependabot weekly --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a6fa654..6b89502 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ updates: - package-ecosystem: github-actions directory: / schedule: - interval: daily + interval: weekly labels: - type:ci # https://til.simonwillison.net/github/dependabot-python-setup From 342a3573fa39b57c59d3bceb971a4207b400e482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 19 Feb 2024 17:19:15 +0300 Subject: [PATCH 60/67] [DOP-13209] Add pre-commit.ci badge to Readme --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index fba8793..885e7d3 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ Evacuator ========= |Repo Status| |PyPI| |PyPI License| |PyPI Python Version| -|Documentation| |Build Status| |Coverage| +|Documentation| |Build Status| |Coverage| |pre-commit.ci| .. |Repo Status| image:: https://www.repostatus.org/badges/latest/active.svg :target: https://github.com/MobileTeleSystems/evacuator @@ -20,6 +20,8 @@ Evacuator :target: https://evacuator.readthedocs.io/en/stable/ .. |Coverage| image:: https://codecov.io/gh/MobileTeleSystems/evacuator/branch/develop/graph/badge.svg?token=CM6AQWY65P :target: https://codecov.io/gh/MobileTeleSystems/evacuator +.. |pre-commit.ci| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/evacuator/develop.svg + :target: https://results.pre-commit.ci/latest/github/MobileTeleSystems/evacuator/develop What is Evacuator? ------------------ From d5a00c6b2b8dab1a324d668785a30b6a27b7ea20 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 23:24:13 +0000 Subject: [PATCH 61/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/Lucas-C/pre-commit-hooks: v1.5.4 → v1.5.5](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.5.4...v1.5.5) - [github.com/asottile/pyupgrade: v3.15.0 → v3.15.1](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.15.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e14e8ae..1bea10f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.4 + rev: v1.5.5 hooks: - id: forbid-tabs - id: remove-tabs @@ -73,7 +73,7 @@ repos: - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.15.1 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] From da0750dcce9b786ca87e2e086bef03d3eeb694ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:44:30 +0000 Subject: [PATCH 62/67] Bump the github-actions group with 1 update Bumps the github-actions group with 1 update: [softprops/action-gh-release](https://github.com/softprops/action-gh-release). Updates `softprops/action-gh-release` from 1 to 2 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 79e3907..fdf7971 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,7 +102,7 @@ jobs: - name: Create Github release id: create_release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: token: ${{ secrets.GITHUB_TOKEN }} draft: false From 96a324f468aab6a7f0d33b762ecaf30a304ad58f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 21:05:20 +0000 Subject: [PATCH 63/67] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black-pre-commit-mirror: 24.2.0 → 24.3.0](https://github.com/psf/black-pre-commit-mirror/compare/24.2.0...24.3.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1bea10f..b3b2bf7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -79,7 +79,7 @@ repos: args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.2.0 + rev: 24.3.0 hooks: - id: black language_version: python3 From d93856f93cbc93cfcffbf9c6e9f38f7b7beef970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Wed, 20 Mar 2024 10:47:19 +0300 Subject: [PATCH 64/67] [DOP-13779] Update blacken-docs --- .pre-commit-config.yaml | 2 +- README.rst | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b3b2bf7..8c5578e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -89,7 +89,7 @@ repos: hooks: - id: blacken-docs additional_dependencies: - - black==24.2.0 + - black==24.3.0 - repo: meta hooks: diff --git a/README.rst b/README.rst index 885e7d3..3a2879e 100644 --- a/README.rst +++ b/README.rst @@ -3,13 +3,11 @@ Evacuator ========= -|Repo Status| |PyPI| |PyPI License| |PyPI Python Version| +|Repo Status| |PyPI License| |PyPI Python Version| |Documentation| |Build Status| |Coverage| |pre-commit.ci| .. |Repo Status| image:: https://www.repostatus.org/badges/latest/active.svg :target: https://github.com/MobileTeleSystems/evacuator -.. |PyPI| image:: https://img.shields.io/pypi/v/evacuator - :target: https://pypi.org/project/evacuator/ .. |PyPI License| image:: https://img.shields.io/pypi/l/evacuator.svg :target: https://github.com/MobileTeleSystems/evacuator/blob/develop/LICENSE.txt .. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/evacuator.svg From 0b7b827aac0ca5c30b8af045e2b988afa8873c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Wed, 20 Mar 2024 10:50:09 +0300 Subject: [PATCH 65/67] [DOP-13779] Add bandit to pre-commit config --- .pre-commit-config.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c5578e..3ee4eec 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -91,6 +91,16 @@ repos: additional_dependencies: - black==24.3.0 + - repo: https://github.com/pycqa/bandit + rev: 1.7.8 + hooks: + - id: bandit + args: + - --aggregate=file + - -iii + - -ll + require_serial: true + - repo: meta hooks: - id: check-hooks-apply From b11630361faaec30b03c9375e309af9374b72a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Wed, 20 Mar 2024 11:12:10 +0300 Subject: [PATCH 66/67] [DOP-13779] Prepare for release --- docs/changelog/1.0.4.rst | 9 +++++++++ docs/changelog/index.rst | 1 + docs/changelog/next_release/+.improvement.1.rst | 3 --- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 docs/changelog/1.0.4.rst delete mode 100644 docs/changelog/next_release/+.improvement.1.rst diff --git a/docs/changelog/1.0.4.rst b/docs/changelog/1.0.4.rst new file mode 100644 index 0000000..36e74a0 --- /dev/null +++ b/docs/changelog/1.0.4.rst @@ -0,0 +1,9 @@ +1.0.4 (2024-03-20) +================== + +Improvements +------------ + +- Added changelog. + + Changelog is generated from separated news files using `towncrier `_. diff --git a/docs/changelog/index.rst b/docs/changelog/index.rst index e8adc03..775814a 100644 --- a/docs/changelog/index.rst +++ b/docs/changelog/index.rst @@ -3,6 +3,7 @@ :caption: Changelog DRAFT + 1.0.4 1.0.3 1.0.2 1.0.1 diff --git a/docs/changelog/next_release/+.improvement.1.rst b/docs/changelog/next_release/+.improvement.1.rst deleted file mode 100644 index 2a1ee7f..0000000 --- a/docs/changelog/next_release/+.improvement.1.rst +++ /dev/null @@ -1,3 +0,0 @@ -Added changelog. - -Changelog is generated from separated news files using `towncrier `_. From 04e551fc2cd4b7fbaf4f4d033d1f662126e9228d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Wed, 20 Mar 2024 11:18:14 +0300 Subject: [PATCH 67/67] [DOP-13779] Add robots.txt for documentation --- docs/conf.py | 1 + docs/robots.txt | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 docs/robots.txt diff --git a/docs/conf.py b/docs/conf.py index 89bca8a..7ba4ecc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,6 +57,7 @@ # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] +html_extra_path = ["robots.txt"] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/docs/robots.txt b/docs/robots.txt new file mode 100644 index 0000000..dda0be5 --- /dev/null +++ b/docs/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: /*/stable/ +Allow: /en/stable/ # Fallback for bots that don't understand wildcards +Disallow: /