diff --git a/.github/actions/setup_dependencies/action.yml b/.github/actions/setup_dependencies/action.yml new file mode 100644 index 00000000..9c33e9db --- /dev/null +++ b/.github/actions/setup_dependencies/action.yml @@ -0,0 +1,40 @@ +name: setup Python environment +description: setup Python environment with all dependencies installed +inputs: + python-version: + required: true + poetry-version: + required: true +runs: + using: "composite" + steps: + - name: set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ inputs.python-version }} + + - name: get full Python version + id: full-python-version + shell: bash + run: echo version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") >> $GITHUB_OUTPUT + + - name: cache Python dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cache/pip + .venv + key: ${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-poetry-${{ hashFiles('poetry.lock') }} + + - name: install Python dependencies + shell: bash + run: | + sudo pip install poetry==${{ inputs.poetry-version }} + + # Because DEB packaging tools set sanitized PATH env variable without /usr/local/* and etc. + # https://manpages.ubuntu.com/manpages/trusty/man1/debuild.1.html (section: Environment variables) + sudo ln -sf /usr/local/bin/poetry /usr/bin + + poetry config virtualenvs.in-project true + poetry install --no-root + \ No newline at end of file diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 92e031a7..2a9f5e91 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,59 +1,60 @@ name: main on: - push: { branches: [main, try_poetry] } - pull_request: { branches: [main] } + push: + branches: [main, try_poetry] + tags: "v*" + pull_request: + branches: [main] concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: - # The latest version with support of Python 3.6 + BUILD_DEB_OUTPUT_DIR: out + BUILD_PYTHON_OUTPUT_DIR: dist + # The latest version supporting Python 3.6 POETRY_VERSION: 1.1.15 + jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: { python-version: "3.11", cache: poetry } - - - run: | - pip install poetry==${{ env.POETRY_VERSION }} - poetry config virtualenvs.in-project true - poetry install --no-root - + - uses: ./.github/actions/setup_dependencies + with: + python-version: "3.10.12" + poetry-version: ${{ env.POETRY_VERSION }} - run: make lint tests: needs: lint - runs-on: ubuntu-latest + runs-on: ubuntu-${{ matrix.target.ubuntu }} + env: + CLICKHOUSE_VERSION: ${{ matrix.clickhouse }} strategy: + fail-fast: false matrix: target: - - {python: "3.6.15", ubuntu: "20.04"} - - {python: "3.10.12", ubuntu: "latest"} + - { python: "3.6.15", ubuntu: "20.04" } + - { python: "3.10.12", ubuntu: "latest" } clickhouse: - - "21.8.15.7" - - "22.3.20.29" - - "22.8.19.10" - - "23.3.4.17" - - "23.4.4.16" - - "23.5.3.24" - - "latest" - env: - CLICKHOUSE_VERSION=${{ matrix.clickhouse }} + # - "21.8.15.7" + # - "22.3.20.29" + # - "22.8.19.10" + # - "23.3.4.17" + # - "23.4.4.16" + # - "23.5.3.24" + - "latest" steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: ./.github/actions/setup_dependencies with: python-version: ${{ matrix.target.python }} - cache: poetry - - run: | - pip install poetry==${{ env.POETRY_VERSION }} - poetry config virtualenvs.in-project true - poetry install --no-root - - run: make unit_tests - - run: make integration_tests + poetry-version: ${{ env.POETRY_VERSION }} + + - run: make unit-tests + # - run: make integration-tests + - name: publish test report uses: mikepenz/action-junit-report@v3 if: always() @@ -61,27 +62,29 @@ jobs: report_paths: 'tests/reports/*.xml' - # push_to_dockerhub: - # runs-on: ubuntu-latest - # env: - # CLICKHOUSE_VERSIONS: "21.8.15.7, 22.3.20.29, 22.8.19.10, 23.3.4.17, 23.4.4.16, 23.5.3.24, latest" - # if: ${{ github.event_name == 'push' }} - # steps: - # - uses: actions/checkout@v3 - # - name: login to dockerhub - # uses: docker/login-action@v2 - # with: - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} - # - name: build and push base images - # uses: docker/bake-action@v3 - # with: - # files: tests/bake.hcl - # push: true + push_to_dockerhub: + runs-on: ubuntu-latest + env: + CLICKHOUSE_VERSIONS: "21.8.15.7, 22.3.20.29, 22.8.19.10, 23.3.4.17, 23.4.4.16, 23.5.3.24, latest" + if: ${{ github.event_name == 'push' }} + steps: + - uses: actions/checkout@v3 + - name: login to dockerhub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: build and push base images + uses: docker/bake-action@v3 + with: + files: tests/bake.hcl + push: true + build: needs: tests strategy: + fail-fast: false matrix: target: - {python: "3.6.15", ubuntu: "20.04"} @@ -92,76 +95,71 @@ jobs: steps: - uses: actions/checkout@v3 - - name: set up python ${{ matrix.target.python }} - uses: actions/setup-python@v4 + - uses: ./.github/actions/setup_dependencies with: python-version: ${{ matrix.target.python }} - cache: poetry - - - name: install dependencies - run: | - pip install poetry==${{ env.POETRY_VERSION }} - poetry config virtualenvs.in-project true - poetry install --no-root + poetry-version: ${{ env.POETRY_VERSION }} - name: build project - run: make build + run: make build-python-packages - name: upload wheel uses: actions/upload-artifact@v3 with: name: ch_tools_py${{ matrix.target.python }}.whl - path: dist/*.whl + path: ${{ env.BUILD_PYTHON_OUTPUT_DIR }}/*.whl if-no-files-found: error - - name: upload sdist + - name: upload source distribution uses: actions/upload-artifact@v3 with: name: ch_tools_py${{ matrix.target.python }}.tar.gz - path: dist/*.tar.gz + path: ${{ env.BUILD_PYTHON_OUTPUT_DIR }}/*.tar.gz if-no-files-found: error - - name: prepare build deb - run: sudo apt install python3-venv debhelper devscripts + - name: install prerequisites for DEB packaging tools + run: sudo make prepare-build-deb - - name: build deb - run: | - # deb building implicitly cleans dist/ - cp dist/*.tar.gz ch_tools.tar.gz - cp dist/*.whl ch_tools.whl + - name: build DEB package + run: | + # Speedup Debian package building echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io sudo make build-deb-package - - name: test deb + - name: test DEB package run: | sudo make uninstall - sudo apt-get install -q -y ./out/ch-tools*.deb + sudo apt-get install -q -y ./${{ env.BUILD_DEB_OUTPUT_DIR }}/ch-tools*.deb sudo chadmin --help sudo ch-monitoring --no-user-check --help sudo keeper-monitoring --help sudo ch-s3-credentials --help - - name: upload deb package artifact + - name: upload DEB package artifact uses: actions/upload-artifact@v3 with: name: ch-tools_py-${{ matrix.target.python }}_ubuntu-${{ matrix.target.ubuntu }}.deb - path: out/ch-tools*.deb + path: ${{ env.BUILD_DEB_OUTPUT_DIR }}/ch-tools*.deb if-no-files-found: error - # - name: create a release - # uses: softprops/action-gh-release@v1 - # if: ${{ matrix.target.ubuntu == 'latest' && startsWith(github.ref, 'refs/tags/') }} - # with: - # generate_release_notes: true - # fail_on_unmatched_files: true - # files: | - # *.whl - # *.tar.gz - # out/ch-tools*.deb - - # - name: publish to pypi - # if: ${{ matrix.target.ubuntu == 'latest' && startsWith(github.ref, 'refs/tags/') }} - # run: flit publish --no-use-vcs - # env: - # FLIT_USERNAME: "__token__" - # FLIT_PASSWORD: "${{ secrets.PYPI_TOKEN }}" + - name: create a release + uses: softprops/action-gh-release@v1 + if: ${{ matrix.target.ubuntu == 'latest' && startsWith(github.ref, 'refs/tags/') }} + with: + generate_release_notes: true + fail_on_unmatched_files: true + files: | + ${{ env.BUILD_PYTHON_OUTPUT_DIR }}/*.whl + ${{ env.BUILD_PYTHON_OUTPUT_DIR }}/*.tar.gz + ${{ env.BUILD_DEB_OUTPUT_DIR }}/ch-tools*.deb + + - name: publish to pypi + if: ${{ matrix.target.ubuntu == 'latest' && startsWith(github.ref, 'refs/tags/') }} + continue-on-error: true + run: poetry publish + env: + POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__" + POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.ALEXFVK_TEST_PYPI_TOKEN }} + # POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.PYPI_TOKEN }}" + # Disable using keyring for poetry to get password from env variables + PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring diff --git a/Makefile b/Makefile index ae1e168e..eef59ced 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,8 @@ MAKEFLAGS += --no-builtin-rules PYTHON ?= python3 PREFIX ?= /opt/yandex/ch-tools -OUTPUT_DIR ?= out +BUILD_PYTHON_OUTPUT_DIR ?= dist +BUILD_DEB_OUTPUT_DIR ?= out # It is used by DEB building tools to install a program to temporary # directory before packaging @@ -33,12 +34,17 @@ INSTALL_DEPS_MARKER = .install-deps install: install-python-package install-symlinks install-bash-completions configure-logs ; +.PHONY: uninstall +uninstall: uninstall-python-package uninstall-symlinks uninstall-bash-completions uninstall-logrotate ; + + .PHONY: install-dependencies install-dependencies: $(INSTALL_DEPS_MARKER) ; -.PHONY: uninstall -uninstall: uninstall-python-package uninstall-symlinks uninstall-bash-completions uninstall-logrotate ; +$(INSTALL_DEPS_MARKER): check-poetry venv pyproject.toml + poetry install --no-root + touch $(INSTALL_DEPS_MARKER) .PHONY: check-poetry @@ -49,17 +55,13 @@ check-poetry: fi -$(VENV_DIR): - poetry env use $(PYTHON) - - .PHONY: venv venv: check-poetry $(VENV_DIR) ; -$(INSTALL_DEPS_MARKER): check-poetry venv pyproject.toml - poetry install --no-root - touch $(INSTALL_DEPS_MARKER) +$(VENV_DIR): + poetry env use $(PYTHON) + .PHONY: lint @@ -74,14 +76,14 @@ unit-tests: install-dependencies .PHONY: integration-tests -integration-tests: install-dependencies build-python-package +integration-tests: install-dependencies build-python-packages cd tests poetry run $(PYTHON) -m env_control create poetry run behave --show-timings --junit -D skip_setup .PHONY: install-python-package -install-python-package: build-python-package +install-python-package: build-python-packages echo 'Installing ch-tools' # Prepare new virual environment @@ -90,7 +92,7 @@ install-python-package: build-python-package # Install python package $(BIN_DIR)/pip install --upgrade pip - $(BIN_DIR)/pip install --no-compile dist/$(WHL_FILE) + $(BIN_DIR)/pip install --no-compile $(BUILD_PYTHON_OUTPUT_DIR)/$(WHL_FILE) # Clean python's artefacts find $(INSTALL_DIR) -name __pycache__ -type d -exec rm -rf {} + @@ -102,8 +104,8 @@ install-python-package: build-python-package || true -.PHONY: build-python-package -build-python-package: prepare-version clean-dist +.PHONY: build-python-packages +build-python-packages: prepare-version clean-dist echo 'Building python packages...' poetry build @@ -111,7 +113,7 @@ build-python-package: prepare-version clean-dist .PHONY: clean-dist clean-dist: echo 'Cleaning up residuals from building of Python package' - sudo rm -rf dist + sudo rm -rf $(BUILD_PYTHON_OUTPUT_DIR) .PHONY: uninstall-python-package @@ -186,31 +188,40 @@ prepare-version: $(VERSION_FILE) $(VERSION_FILE): # Generate version - echo "2.$$(git rev-list HEAD --count).$$(git rev-parse --short HEAD | xargs -I {} printf '%d' 0x{})" > $ - # Replace version in src/ch_tools/__init__.py - sed -ie "s/__version__ = \"[0-9\.]\+\"/__version__ = \"$$(cat $@)\"/" src/ch_tools/__init__.py + echo "2.$$(git rev-list HEAD --count).$$(git rev-parse --short HEAD | xargs -I {} printf '%d' 0x{})" > $@ + # Replace version in ch_tools/__init__.py + sed "s/__version__ = \"[0-9\.]\+\"/__version__ = \"$$(cat $@)\"/" ch_tools/__init__.py # Replace version in pyproject.toml poetry version $$(cat $@) +.PHONY: prepare-build-deb +prepare-build-deb: + apt install python3-venv debhelper devscripts + + .PHONY: build-deb-package -build-deb-package: prepare-changelog +build-deb-package: prepare-changelog install-dependencies # Build DEB package (cd debian && poetry run debuild --check-dirname-level 0 --preserve-env --no-lintian --no-tgz-check -uc -us) # Move DEB package to output dir DEB_FILE=$$(echo ../ch-tools*.deb) - mkdir -p $(OUTPUT_DIR) && mv $$DEB_FILE $(OUTPUT_DIR) - # Remove other build artefacts - rm $${DEB_FILE%_*.deb}* + mkdir -p $(BUILD_DEB_OUTPUT_DIR) && mv $$DEB_FILE $(BUILD_DEB_OUTPUT_DIR) + + +.PHONY: clean_debuild +clean_debuild: clean + rm -rf debian/{files,.debhelper,ch-tools*} + rm -f ../ch-tools_*{build,buildinfo,changes,deb,dsc,gz,xz} .PHONY: clean -clean: +clean: clean_debuild echo 'Cleaning up' - rm -rf build - rm -rf debian/files debian/.debhelper - rm -rf debian/ch-tools* + rm -rf $(BUILD_DEB_OUTPUT_DIR) + rm -rf $(BUILD_PYTHON_OUTPUT_DIR) + rm -rf $(VENV_DIR) .PHONY: help @@ -218,9 +229,9 @@ help: echo "Base targets:" echo " prepare-changelog Add an autobuild version entity to changelog" echo " prepare-version Update version based on latest commit" - echo " build-python-package Build 'ch-tools' Python package" + echo " build-python-packages Build 'ch-tools' Python package" echo " build-deb-package Build 'ch-tools' debian package" - echo " clean Clean up after building debian package" + echo " clean Clean-up all produced/generated files inside tree" echo "" echo "--------------------------------------------------------------------------------" echo "" @@ -236,6 +247,7 @@ help: echo " uninstall-bash-completions Uninstall from /etc/bash_completion.d/" echo " configure-logs Install log rotation rules to /etc/logrotate.d/ and create log dirs" echo " uninstall-logrotate Uninstall log rotation rules from /etc/logrotate.d/" + echo " prepare-build-deb Install prerequisites for DEB packaging tool" echo "" echo "--------------------------------------------------------------------------------" echo "" diff --git a/ch_tools/__init__.py b/ch_tools/__init__.py index 8526f52a..066c5c84 100644 --- a/ch_tools/__init__.py +++ b/ch_tools/__init__.py @@ -1,3 +1,3 @@ """A set of tools for administration and diagnostics of ClickHouse DBMS.""" -__version__ = "1.0.0" +__version__ = "2.529.131159744" diff --git a/debian/changelog b/debian/changelog index 5faf2418..17685355 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,33 @@ +ch-tools (2.529.131159744) stable; urgency=medium + + * Autobuild + + -- Yandex LLC Tue, 08 Aug 2023 16:03:28 +0300 + +ch-tools (2.529.131159744) stable; urgency=medium + + * Autobuild + + -- Yandex LLC Tue, 08 Aug 2023 16:02:13 +0300 + +ch-tools (2.529.131159744) stable; urgency=medium + + * Autobuild + + -- Yandex LLC Tue, 08 Aug 2023 15:59:35 +0300 + +ch-tools (2.529.131159744) stable; urgency=medium + + * Autobuild + + -- Yandex LLC Tue, 08 Aug 2023 15:57:24 +0300 + +ch-tools (2.529.131159744) stable; urgency=medium + + * Autobuild + + -- Yandex LLC Tue, 08 Aug 2023 15:54:33 +0300 + ch-tools (2.526.48925339) stable; urgency=medium * Autobuild diff --git a/poetry.lock b/poetry.lock index 55010acd..ca130633 100644 --- a/poetry.lock +++ b/poetry.lock @@ -800,11 +800,11 @@ python-versions = "*" [[package]] name = "pyyaml" -version = "5.4.1" +version = "5.3.1" description = "YAML parser and emitter for Python" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "requests" @@ -1043,7 +1043,7 @@ testing = ["func-timeout", "jaraco.itertools", "pytest (>=4.6)", "pytest-black ( [metadata] lock-version = "1.1" python-versions = "^3.6.2" -content-hash = "8f40a4adc8b33214b233f6098f6a049771ab322b11321c44b2bd85a2fb334929" +content-hash = "7bd4e2110fe7674541ad5a46937c9f74309a47699825ff902154270d32c55034" [metadata.files] atomicwrites = [ @@ -1646,35 +1646,19 @@ pywin32 = [ {file = "pywin32-227-cp39-cp39-win_amd64.whl", hash = "sha256:f27cec5e7f588c3d1051651830ecc00294f90728d19c3bf6916e6dba93ea357c"}, ] pyyaml = [ - {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, - {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, - {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, - {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, - {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, - {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, - {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, - {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, - {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, - {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, - {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, + {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, + {file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"}, + {file = "PyYAML-5.3.1-cp35-cp35m-win32.whl", hash = "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2"}, + {file = "PyYAML-5.3.1-cp35-cp35m-win_amd64.whl", hash = "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c"}, + {file = "PyYAML-5.3.1-cp36-cp36m-win32.whl", hash = "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2"}, + {file = "PyYAML-5.3.1-cp36-cp36m-win_amd64.whl", hash = "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648"}, + {file = "PyYAML-5.3.1-cp37-cp37m-win32.whl", hash = "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a"}, + {file = "PyYAML-5.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf"}, + {file = "PyYAML-5.3.1-cp38-cp38-win32.whl", hash = "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97"}, + {file = "PyYAML-5.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee"}, + {file = "PyYAML-5.3.1-cp39-cp39-win32.whl", hash = "sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a"}, + {file = "PyYAML-5.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e"}, + {file = "PyYAML-5.3.1.tar.gz", hash = "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"}, ] requests = [ {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, diff --git a/pyproject.toml b/pyproject.toml index 402d7796..540423fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "ch-tools" -version = "2.526.48925339" +version = "2.529.131159744" license = "MIT" description = "ch-tools is a set of tools for administration and diagnostics of ClickHouse DBMS." @@ -37,9 +37,8 @@ maintainers = [ ] readme = "README.md" - -repository = "https://github.com/yandex/ch-tools" homepage = "https://github.com/yandex/ch-tools" +repository = "https://github.com/yandex/ch-tools" keywords=[ "clickhouse", @@ -71,13 +70,8 @@ classifiers = [ "Typing :: Typed", ] -# packages - -# [tool.flit.sdist] -# include = ["resources/"] include = ["resources/"] -# requires-python = ">=3.6.2" [tool.poetry.dependencies] python = "^3.6.2" @@ -95,7 +89,7 @@ psutil = "*" pygments = "*" pyopenssl = "*" python-dateutil = "*" -pyyaml = "*" +pyyaml = "<5.4" requests = "*" tabulate = "*" tenacity = "*" diff --git a/pyproject.toml_bak b/pyproject.toml_bak deleted file mode 100644 index c5deb9be..00000000 --- a/pyproject.toml_bak +++ /dev/null @@ -1,131 +0,0 @@ -[build-system] -requires = ["flit_core >=3.2,<4"] -build-backend = "flit_core.buildapi" - -[project] -name = "ch-tools" -license = { file = "LICENSE" } -dynamic = ["version", "description"] - -authors = [ - {name = "Alexander Burmak", email = "alex-burmak@yandex-team.ru"}, - {name = "Dmitry Starov", email="dstaroff@yandex-team.ru"}, - {name = "Anton Ivashkin", email="iantonspb@yandex-team.ru"}, - {name = "Grigory Pervakov", email="pervakovg@yandex-team.ru"}, - {name = "Petr Nuzhnov", email="petrnuzhnov@yandex-team.ru"}, - {name = "Egor Medvedev", email="egor-medvedev@yandex-team.ru"}, - {name = "Aleksei Filatov", email="alexfvk@yandex-team.ru"}, - {name = "Evgeny Dyukov", email="secwall@yandex-team.ru"}, - {name = "Evgeny Strizhnev", email="estrizhnev@yandex-team.ru"}, - {name = "Vadim Volodin", email="vadim-volodin@yandex-team.ru"}, - {name = "Anton Chaporgin", email="chapson@yandex-team.ru"}, - {name = "Evgenii Kopanev", email="ekopanev@yandex-team.ru"}, - {name = "Mikhail Kot", email="myrrc@yandex-team.ru"}, -] - -maintainers = [ - {name = "Alexander Burmak", email = "alex-burmak@yandex-team.ru"}, - {name = "Dmitry Starov", email="dstaroff@yandex-team.ru"}, - {name = "Anton Ivashkin", email="iantonspb@yandex-team.ru"}, - {name = "Grigory Pervakov", email="pervakovg@yandex-team.ru"}, - {name = "Petr Nuzhnov", email="petrnuzhnov@yandex-team.ru"}, - {name = "Egor Medvedev", email="egor-medvedev@yandex-team.ru"}, - {name = "Aleksei Filatov", email="alexfvk@yandex-team.ru"}, - {name = "Evgenii Kopanev", email="ekopanev@yandex-team.ru"}, - {name = "Mikhail Kot", email="myrrc@yandex-team.ru"}, -] - -readme = "README.md" - -keywords=[ - "clickhouse", - "database", - "monitoring", - "diagnostics", - "administration", -] - -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: MIT License", - "Operating System :: MacOS", - "Operating System :: POSIX :: BSD", - "Operating System :: POSIX :: Linux", - "Operating System :: Unix", - "Environment :: Console", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "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", - "Programming Language :: Python :: 3.12", - "Topic :: Database", - "Typing :: Typed", -] - -requires-python = ">=3.6.2" - -dependencies = [ - "boto3", - "click", - "cloup", - "deepdiff", - "dnspython", - "file_read_backwards", - "humanfriendly", - "jinja2", - "kazoo", - "lxml", - "psutil", - "pygments", - "pyopenssl", - "python-dateutil", - "pyyaml", - "requests", - "tabulate", - "tenacity", - "termcolor", - "tqdm", - "xmltodict", - "typing-extensions" -] - -[tool.flit.sdist] -include = ["resources/"] - -[project.urls] -Source = "https://github.com/yandex/ch-tools" - -[project.optional-dependencies] -test = [ - "flit", - "black", - "isort", - "mypy", - "types-pyyaml", - "types-requests", - "types-python-dateutil", - "types-tabulate", - "types-pyOpenSSL", - "types-setuptools", -#pylint = "^2.13" -#bandit = "*" - "behave", - "docker", - "docker-compose", - "pyhamcrest", - "pytest" -] - -[project.scripts] -chadmin = "ch_tools.chadmin.chadmin_cli:main" -ch-monitoring = "ch_tools.monrun_checks.main:main" -keeper-monitoring = "ch_tools.monrun_checks_keeper.main:main" -ch-s3-credentials = "ch_tools.s3_credentials.main:main" - -[tool.isort] -profile = "black"