Skip to content

Commit f8dee48

Browse files
committed
Upgrade python actions
1 parent 045bacb commit f8dee48

5 files changed

Lines changed: 26 additions & 30 deletions

File tree

.github/workflows/workflow.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
33

44
name: CI pipeline
55

@@ -13,31 +13,33 @@ jobs:
1313
lint:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Python
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v3
1919
with:
20-
python-version: 3.6
20+
python-version: 3.12
2121
- name: Install dev dependencies
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install -r dev.requirements.txt
2525
- name: Lint with black
2626
run: black --check emoji_data_python
2727
- name: Lint with pylint
28-
run: pylint --load-plugins pylint_quotes emoji_data_python
28+
run: pylint emoji_data_python
2929
- name : mypy type checking (allowed to fail for now)
3030
run: mypy emoji_data_python || true
3131

3232
test:
3333
runs-on: ubuntu-latest
3434
strategy:
35+
fail-fast: false
3536
matrix:
36-
python-version: [3.6, 3.7, 3.8]
37+
python-version: ["3.9", "3.12"]
38+
3739
steps:
38-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v4
3941
- name: Set up Python ${{ matrix.python-version }}
40-
uses: actions/setup-python@v1
42+
uses: actions/setup-python@v3
4143
with:
4244
python-version: ${{ matrix.python-version }}
4345
- name: Install dev dependencies
@@ -55,11 +57,11 @@ jobs:
5557
- lint
5658
runs-on: ubuntu-latest
5759
steps:
58-
- uses: actions/checkout@v2
60+
- uses: actions/checkout@v4
5961
- name: Set up Python
60-
uses: actions/setup-python@v1
62+
uses: actions/setup-python@v3
6163
with:
62-
python-version: 3.6
64+
python-version: 3.11
6365
- name: Install dependencies
6466
run: |
6567
python -m pip install --upgrade pip
@@ -70,6 +72,6 @@ jobs:
7072
TWINE_USERNAME: alexmick
7173
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
7274
run: |
73-
sed -i "s|version=\"DEV\",|version=\"${GITHUB_REF/refs\/tags\//}\",|g" setup.py
75+
sed -i "s|version=\"0.0.0\",|version=\"${GITHUB_REF/refs\/tags\//}\",|g" setup.py
7476
python setup.py sdist bdist_wheel
7577
twine upload dist/*

.pylintrc

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ disable=missing-class-docstring,
6565
missing-function-docstring,
6666
inherit-non-class,
6767
too-few-public-methods,
68-
unnecessary-pass
68+
unnecessary-pass,
69+
cyclic-import
6970

7071
# Enable the message, report, category or checker with the given id(s). You can
7172
# either give multiple identifier separated by comma (,) or put this option
@@ -260,7 +261,7 @@ max-module-lines=1000
260261
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
261262
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
262263
# `empty-line` allows space-only lines.
263-
no-space-check=
264+
#no-space-check=
264265

265266
# Allow the body of a class to be on the same line as the declaration if body
266267
# contains single statement.
@@ -503,11 +504,5 @@ min-public-methods=1
503504

504505
# Exceptions that will emit a warning when being caught. Defaults to
505506
# "BaseException, Exception".
506-
overgeneral-exceptions=BaseException,
507-
Exception
508-
509-
[OTHER]
510-
511-
string-quote=double-avoid-escape
512-
triple-quote=double
513-
docstring-quote=double
507+
overgeneral-exceptions=builtins.BaseException,
508+
builtins.Exception

dev.requirements.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
requests>=2.25.1,<3.0.0
66

77
# Testing
8-
pytest>=5.3.5,<6.0.0
9-
pytest-cov>=2.8.1,<3.0.0
8+
pytest>=8.2.2,<9.0.0
9+
pytest-cov>=5.0.0,<6.0.0
1010

1111
# Linting
12-
pylint>=2.4.3,<3.0.0
13-
pylint-quotes>=0.2.1,<0.3.0
14-
mypy>=0.761,<1.0.0
15-
black>=19.10b0,<=20.0
12+
pylint>=3.2.5,<4.0.0
13+
mypy>=1.10.1,<2.0.0
14+
black>=24.4.2,<=25.0.0

emoji_data_python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from .search import all_doublebyte, find_by_shortname, find_by_name
99

1010
# Read json data on module load to be cached
11-
with open(path.join(path.dirname(__file__), "data/emoji.json"), "r") as full_data:
11+
with open(path.join(path.dirname(__file__), "data/emoji.json"), "r", encoding="utf-8") as full_data:
1212
# Load and parse emoji data from json into EmojiChar objects
1313
emoji_data = [EmojiChar(data_blob) for data_blob in json.loads(full_data.read())] # type: List[EmojiChar]
1414

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setuptools.setup(
88
name="emoji_data_python",
9-
version="DEV",
9+
version="0.0.0",
1010
url="https://github.com/alexmick/emoji-data-python/",
1111

1212
author="Alexander Micklewright",

0 commit comments

Comments
 (0)