From a64798e73a46d541792d2bd9298111d2152d3810 Mon Sep 17 00:00:00 2001 From: Tomer Nosrati Date: Fri, 20 Oct 2023 19:38:17 +0300 Subject: [PATCH] WIP --- docs/build.sh | 2 +- docs/conf.py | 6 +++--- src/pytest_celery/__init__.py | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) mode change 100644 => 100755 docs/build.sh diff --git a/docs/build.sh b/docs/build.sh old mode 100644 new mode 100755 index 935c18436..05251c1f8 --- a/docs/build.sh +++ b/docs/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -export PYTHONPATH=.:$PYTHONPATH +export PYTHONPATH=..:$PYTHONPATH python -m sphinx -T -E -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html diff --git a/docs/conf.py b/docs/conf.py index ee301a85c..a52117e56 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,11 +2,11 @@ globals().update( conf.build_config( - "pytest-celery", + "pytest_celery", __file__, project="pytest-celery", - version_dev="1.0.0a1", - version_stable="0.1.0", + version_dev="2.0", + version_stable="1.0", canonical_url="https://docs.pytest-celery.dev", # Update with your documentation URL webdomain="pytest-celery.dev", # Update with your domain github_project="celery/pytest-celery", diff --git a/src/pytest_celery/__init__.py b/src/pytest_celery/__init__.py index af98926ad..d0e7a26eb 100644 --- a/src/pytest_celery/__init__.py +++ b/src/pytest_celery/__init__.py @@ -8,6 +8,9 @@ __version__ = "1.0.0a1" +import re +from collections import namedtuple + from pytest_celery.api.backend import * from pytest_celery.api.base import * from pytest_celery.api.broker import * @@ -32,3 +35,21 @@ from pytest_celery.vendors.redis.container import * from pytest_celery.vendors.worker.container import * from pytest_celery.vendors.worker.fixtures import * + +version_info_t = namedtuple( + "version_info_t", + ( + "major", + "minor", + "micro", + "releaselevel", + "serial", + ), +) + +# bumpversion can only search for {current_version} +# so we have to parse the version here. +_temp = re.match(r"(\d+)\.(\d+).(\d+)(.+)?", __version__).groups() +VERSION = version_info = version_info_t(int(_temp[0]), int(_temp[1]), int(_temp[2]), _temp[3] or "", "") +del _temp +del re