From ecc965af3d67c5847bb69fcf54490225af9b5970 Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Tue, 15 Aug 2023 10:26:33 +0200 Subject: [PATCH 1/8] Adding readthedocs config --- .readthedocs.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..1132c0a2d --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,22 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: docs/requirements.txt \ No newline at end of file From d51a3306e255a970cd9c6cc1cd14692bbe78ce11 Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Tue, 15 Aug 2023 10:34:25 +0200 Subject: [PATCH 2/8] Fixing mariadb test invocation --- .github/workflows/tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 182fb18e2..72ded4699 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: Run tests + name: Run tests on: push: @@ -22,10 +22,10 @@ jobs: ports: - 3306/tcp env: - MYSQL_USER: graphite - MYSQL_PASSWORD: graphite - MYSQL_DATABASE: test_graphite - MYSQL_ROOT_PASSWORD: root + MARIADB_USER: graphite + MARIADB_PASSWORD: graphite + MARIADB_DATABASE: test_graphite + MARIADB_ROOT_PASSWORD: root options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 postgres: image: postgres From 284710606ba79dbebe56b36163d418f7a0c53695 Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Tue, 15 Aug 2023 10:36:40 +0200 Subject: [PATCH 3/8] oops, typo --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 72ded4699..6c274435d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ - name: Run tests +name: Run tests on: push: From 86d59f5f0a8d709867f6399539d5812a001a301c Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Tue, 15 Aug 2023 10:45:03 +0200 Subject: [PATCH 4/8] fix mariadb healthcheck --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6c274435d..8ced690a0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,7 @@ jobs: MARIADB_PASSWORD: graphite MARIADB_DATABASE: test_graphite MARIADB_ROOT_PASSWORD: root - options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 + options: --health-cmd="/usr/local/bin/healthcheck.sh --su-mysql --connect --innodb_initialized" --health-interval=5s --health-timeout=2s --health-retries=3 postgres: image: postgres ports: From 73d54707da5e0ff9cb30c60c0f4333d1ac6cc34d Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Tue, 15 Aug 2023 10:54:48 +0200 Subject: [PATCH 5/8] trying new python and django --- .github/workflows/tests.yml | 14 +++++++------- requirements.txt | 2 +- tox.ini | 9 +++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ced690a0..e9f5026e6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,7 +37,7 @@ jobs: strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v1 @@ -81,24 +81,24 @@ jobs: run: | tox - name: Linting - if: ${{ matrix.python-version==3.10 }} + if: ${{ matrix.python-version==3.11 }} env: TOXENV: lint run: | tox - name: Testing documentation - if: ${{ matrix.python-version==3.10 }} + if: ${{ matrix.python-version==3.11 }} env: TOXENV: docs run: | tox - name: Run Codecov - if: ${{ matrix.python-version==3.9 }} + if: ${{ matrix.python-version==3.11 }} env: TOXENV: lint run: | - pip install codecov==2.1.12 + pip install codecov codecov - name: Upload coverage to Codecov - if: ${{ matrix.python-version==3.9 }} - uses: codecov/codecov-action@v2 \ No newline at end of file + if: ${{ matrix.python-version==3.11 }} + uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 18d76b0e0..93ae45f64 100644 --- a/requirements.txt +++ b/requirements.txt @@ -35,7 +35,7 @@ # deactivate # -Django>=3.2,<4 +Django>=3.2,<5 python-memcached==1.58 txAMQP==0.8 django-tagging==0.4.6 diff --git a/tox.ini b/tox.ini index 3a4c5864a..718a098b6 100644 --- a/tox.ini +++ b/tox.ini @@ -4,10 +4,11 @@ python = 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 [tox] envlist = - py{37,38,39,310}-django32-pyparsing3{,-msgpack}, + py{37,38,39,310,311}-django42-pyparsing3{,-msgpack}, lint, docs [testenv] @@ -34,7 +35,7 @@ deps = git+https://github.com/graphite-project/whisper.git#egg=whisper git+https://github.com/graphite-project/ceres.git#egg=ceres pyparsing3: pyparsing>=3.0.6 - django32: Django>=3.2,<4 + django32: Django>=3.2,<5 urllib3 redis rrdtool @@ -44,7 +45,7 @@ deps = pyhash: pyhash [testenv:docs] -basepython = python3.10 +basepython = python3.11 changedir = docs deps = cairocffi @@ -64,7 +65,7 @@ commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html [testenv:lint] -basepython = python3.10 +basepython = python3.11 changedir = {toxinidir} deps = flake8==3.7.9 From 19dbc54d409794f5c6fa1a4e8b4d676f722729aa Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Tue, 15 Aug 2023 10:59:45 +0200 Subject: [PATCH 6/8] Keeping Django 3.2 --- requirements.txt | 2 +- tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 93ae45f64..18d76b0e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -35,7 +35,7 @@ # deactivate # -Django>=3.2,<5 +Django>=3.2,<4 python-memcached==1.58 txAMQP==0.8 django-tagging==0.4.6 diff --git a/tox.ini b/tox.ini index 718a098b6..48bda23b9 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ python = [tox] envlist = - py{37,38,39,310,311}-django42-pyparsing3{,-msgpack}, + py{37,38,39,310,311}-django32-pyparsing3{,-msgpack}, lint, docs [testenv] @@ -35,7 +35,7 @@ deps = git+https://github.com/graphite-project/whisper.git#egg=whisper git+https://github.com/graphite-project/ceres.git#egg=ceres pyparsing3: pyparsing>=3.0.6 - django32: Django>=3.2,<5 + django32: Django>=3.2,<4 urllib3 redis rrdtool From 859fc915543db6dc55d087398d81d5d001e0ae9a Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Tue, 15 Aug 2023 11:14:34 +0200 Subject: [PATCH 7/8] OK, let's stabilize 3.10 first --- .github/workflows/tests.yml | 10 +++++----- tox.ini | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e9f5026e6..b38a8e8f0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,7 +37,7 @@ jobs: strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - uses: actions/checkout@v1 @@ -81,24 +81,24 @@ jobs: run: | tox - name: Linting - if: ${{ matrix.python-version==3.11 }} + if: ${{ matrix.python-version==3.10 }} env: TOXENV: lint run: | tox - name: Testing documentation - if: ${{ matrix.python-version==3.11 }} + if: ${{ matrix.python-version==3.10 }} env: TOXENV: docs run: | tox - name: Run Codecov - if: ${{ matrix.python-version==3.11 }} + if: ${{ matrix.python-version==3.10 }} env: TOXENV: lint run: | pip install codecov codecov - name: Upload coverage to Codecov - if: ${{ matrix.python-version==3.11 }} + if: ${{ matrix.python-version==3.10 }} uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/tox.ini b/tox.ini index 48bda23b9..3a4c5864a 100644 --- a/tox.ini +++ b/tox.ini @@ -4,11 +4,10 @@ python = 3.8: py38 3.9: py39 3.10: py310 - 3.11: py311 [tox] envlist = - py{37,38,39,310,311}-django32-pyparsing3{,-msgpack}, + py{37,38,39,310}-django32-pyparsing3{,-msgpack}, lint, docs [testenv] @@ -45,7 +44,7 @@ deps = pyhash: pyhash [testenv:docs] -basepython = python3.11 +basepython = python3.10 changedir = docs deps = cairocffi @@ -65,7 +64,7 @@ commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html [testenv:lint] -basepython = python3.11 +basepython = python3.10 changedir = {toxinidir} deps = flake8==3.7.9 From 83bcfd0f89e7d0df44836ad56c07240623177a80 Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Tue, 15 Aug 2023 11:35:19 +0200 Subject: [PATCH 8/8] Let's try Django 4.2 --- docs/requirements.txt | 14 ++++++++++---- requirements.txt | 2 +- tox.ini | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index ff4a6f45e..6d10324f0 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,8 +1,14 @@ ## Requirements for documentation -Django>=1.11.19,<2.3 +cairocffi django-tagging==0.4.6 -sphinx -sphinx_rtd_theme pytz git+https://github.com/graphite-project/whisper.git#egg=whisper -scandir;python_version<"3.5" +git+https://github.com/graphite-project/ceres.git#egg=ceres +Django<5 +pyparsing>=3.0.6 +alabaster==0.7.12 +Sphinx==1.3.6 +jinja2<3.1.0 +sphinx_rtd_theme +urllib3 +scandir;python_version<"3.5" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 18d76b0e0..93ae45f64 100644 --- a/requirements.txt +++ b/requirements.txt @@ -35,7 +35,7 @@ # deactivate # -Django>=3.2,<4 +Django>=3.2,<5 python-memcached==1.58 txAMQP==0.8 django-tagging==0.4.6 diff --git a/tox.ini b/tox.ini index 3a4c5864a..a3947ef76 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,7 @@ deps = git+https://github.com/graphite-project/whisper.git#egg=whisper git+https://github.com/graphite-project/ceres.git#egg=ceres pyparsing3: pyparsing>=3.0.6 - django32: Django>=3.2,<4 + django32: Django>=3.2,<5 urllib3 redis rrdtool @@ -52,7 +52,7 @@ deps = pytz git+https://github.com/graphite-project/whisper.git#egg=whisper git+https://github.com/graphite-project/ceres.git#egg=ceres - Django<4 + Django<5 pyparsing3: pyparsing>=3.0.6 alabaster==0.7.12 Sphinx==1.3.6