Migrate changelog from outdated fuzzywuzzy to a new thefuzz

This commit is contained in:
Mikhail f. Shiryaev 2024-06-04 13:37:36 +02:00
parent c0aad2a2b5
commit bad3f2d384
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4
4 changed files with 16 additions and 11 deletions

View File

@ -15,7 +15,6 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes \
file \
libxml2-utils \
moreutils \
python3-fuzzywuzzy \
python3-pip \
yamllint \
locales \
@ -23,8 +22,18 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes \
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
# python-magic is the same version as in Ubuntu 22.04
RUN pip3 install black==23.12.0 boto3 codespell==2.2.1 mypy==1.8.0 PyGithub unidiff pylint==3.1.0 \
python-magic==0.4.24 requests types-requests \
RUN pip3 install \
PyGithub \
black==23.12.0 \
boto3 \
codespell==2.2.1 \
mypy==1.8.0 \
pylint==3.1.0 \
python-magic==0.4.24 \
requests \
thefuzz \
types-requests \
unidiff \
&& rm -rf /root/.cache/pip
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen en_US.UTF-8

View File

@ -6,7 +6,7 @@ Generate github token:
Dependencies:
```
sudo apt-get update
sudo apt-get install git python3 python3-fuzzywuzzy python3-github
sudo apt-get install git python3 python3-thefuzz python3-github
python3 changelog.py -h
```
@ -15,10 +15,7 @@ Usage example:
Note: The working directory is ClickHouse/utils/changelog
```bash
export GITHUB_TOKEN="<your token>"
git fetch --tags # changelog.py depends on having the tags available, this will fetch them.
# If you are working from a branch in your personal fork, then you may need `git fetch --all`
GITHUB_TOKEN="<your token>"
python3 changelog.py --output=changelog-v22.4.1.2305-prestable.md --gh-user-or-token="$GITHUB_TOKEN" v21.6.2.7-prestable
python3 changelog.py --output=changelog-v22.4.1.2305-prestable.md --gh-user-or-token="$USER" --gh-password="$PASSWORD" v21.6.2.7-prestable

View File

@ -10,9 +10,9 @@ from datetime import date, timedelta
from subprocess import DEVNULL, CalledProcessError
from typing import Dict, List, Optional, TextIO
from fuzzywuzzy.fuzz import ratio # type: ignore
from github.GithubException import RateLimitExceededException, UnknownObjectException
from github.NamedUser import NamedUser
from thefuzz.fuzz import ratio # type: ignore
from git_helper import git_runner as runner
from git_helper import is_shallow

View File

@ -1,3 +1,2 @@
fuzzywuzzy
thefuzz
PyGitHub
python-Levenshtein