From c9c3c38bcc5f642d508e481232148ef2750b1879 Mon Sep 17 00:00:00 2001 From: Noah Pendleton <2538614+noahp@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:15:59 -0400 Subject: [PATCH] Update emoji dictionaries Fix a few misc things. Remove 3.7 support, add 3.12 support. --- .github/workflows/main.yml | 17 +++++++++++------ .python-version | 10 +++++----- .vscode/settings.json | 3 +++ MANIFEST.in | 2 -- README.md | 12 ++++-------- emojilib | 2 +- gemoji | 2 +- setup.py | 20 ++------------------ tox.ini | 11 ++++++++++- 9 files changed, 37 insertions(+), 42 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 MANIFEST.in diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a960e7..34759b8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,8 @@ on: branches: - main + workflow_dispatch: + jobs: ci: runs-on: ubuntu-22.04 @@ -19,20 +21,23 @@ jobs: strategy: matrix: - python: [py37, py38, py39, py310, py311] + python: [py38, py39, py310, py311, py312] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - name: ๐Ÿงช Run Tox Tests + - name: ๐Ÿงช Run Tox Python Tests run: | tox -e ${{ matrix.python }} - # upload-artifact is used to save the py27 wheel. this wheel is compatible - # with python2 and python3 - - uses: actions/upload-artifact@v1 + - name: ๐Ÿ” Other Tox Checks + run: | + tox -e ruff -e check-wheel-contents + + - name: ๐Ÿ“ฆ Upload Wheel Artifacts + uses: actions/upload-artifact@v4 with: name: ${{ matrix.python }}-wheel-output path: .tox/${{ matrix.python }}/dist/ diff --git a/.python-version b/.python-version index 0e74b15..647d4ca 100644 --- a/.python-version +++ b/.python-version @@ -1,5 +1,5 @@ -3.7.15 -3.8.15 -3.9.15 -3.10.8 -3.11.0 +3.8.19 +3.9.19 +3.10.14 +3.11.8 +3.12.2 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..23fd35f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": true +} \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 33d5702..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include emojilib/emojis.json -include emojilib/LICENSE diff --git a/README.md b/README.md index b5e4996..ce2d58a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)](https://github.com/ambv/black) [![GitHub Workflow -Status](https://img.shields.io/github/workflow/status/noahp/emoji-fzf/main-ci?style=for-the-badge)](https://github.com/noahp/emoji-fzf/actions) +Status](https://img.shields.io/github/actions/workflow/status/noahp/emoji-fzf/main.yml?branch=main?style=for-the-badge)](https://github.com/noahp/emoji-fzf/actions) [![PyPI version](https://img.shields.io/pypi/v/emoji-fzf.svg?style=for-the-badge)](https://pypi.org/project/emoji-fzf/) [![PyPI @@ -20,6 +20,7 @@ MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=for-the-badg - [Building package for publishing](#building-package-for-publishing) + # emoji-fzf Small utility for manipulating emojis via @@ -114,15 +115,10 @@ aliases and not replace them. ```json [ { - "๐Ÿ‘": [ - "my-custom-alias", - "good-boy" - ] + "๐Ÿ‘": ["my-custom-alias", "good-boy"] }, { - "๐Ÿ’ฏ": [ - "epic-victory-royale" - ] + "๐Ÿ’ฏ": ["epic-victory-royale"] } ] ``` diff --git a/emojilib b/emojilib index ad336cd..28cffb5 160000 --- a/emojilib +++ b/emojilib @@ -1 +1 @@ -Subproject commit ad336cd48370a01cd3c9a8a4fbe6b2ee09d6afc3 +Subproject commit 28cffb5c7eb2309073c7291493dc79a2bd90fcd5 diff --git a/gemoji b/gemoji index ed57eb8..5476a66 160000 --- a/gemoji +++ b/gemoji @@ -1 +1 @@ -Subproject commit ed57eb86fd5215ff7f1bc68e12eaeee90133f359 +Subproject commit 5476a66d2794e0d1551b1f96e449afc72e9f7bec diff --git a/setup.py b/setup.py index e87104e..20d7fd8 100644 --- a/setup.py +++ b/setup.py @@ -94,22 +94,6 @@ def generate_emoji_db(root_dir, outfile="emoji_fzf/emoji_fzf_emojilib.py"): """ ) - # Unfortunately this doesn't work; we end up with literals like '\\U0001f600' ๐Ÿ˜• - # not suitable for printing alas. For now, just archive the py2 output, - # which on both - # - # # we want the emojilib file to have the literal symbols represented as ascii - # # literals with \u escape sequences, which we can safely use in python2 with - # # codecs.getwriter('utf-8') to print the symbol. to make sure the emojilib - # # is formatted correctly when the wheel is built with python3, use a little - # # goofy logic. - # import sys - # if sys.version_info >= (3,): - # for key, val in EMOJI_DICT.items(): - # EMOJI_DICT[key]["emoji"] = ( - # val["emoji"].encode("ascii", "backslashreplace").decode("utf-8") - # ) - genfile.write("EMOJIS = {}".format(emoji_dict)) @@ -120,7 +104,7 @@ def generate_emoji_db(root_dir, outfile="emoji_fzf/emoji_fzf_emojilib.py"): # I think using `-` instead of `_` is more user-friendly, but due to python # import directives not allowing `-`, keep everything consistent with `_`. name="emoji-fzf", - version="0.8.0", + version="0.9.0", description="Emoji searcher for use with fzf", author="Noah Pendleton", author_email="2538614+noahp@users.noreply.github.com", @@ -139,11 +123,11 @@ def generate_emoji_db(root_dir, outfile="emoji_fzf/emoji_fzf_emojilib.py"): entry_points={"console_scripts": ["emoji-fzf = emoji_fzf.emoji_fzf:cli"]}, classifiers=[ "License :: OSI Approved :: MIT License", - "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", "Operating System :: OS Independent", ], ) diff --git a/tox.ini b/tox.ini index 5c080d3..eb8b4a6 100644 --- a/tox.ini +++ b/tox.ini @@ -12,16 +12,18 @@ requires = [ "setuptools == 40.6.3", "wheel == 0.32.3"] [tox] isolated_build = True envlist = - py37 py38 py39 py310 py311 + py312 check-wheel-contents + ruff [testenv] deps = pylint==2.15.8 + setuptools>=38.6.0 whitelist_externals = /usr/bin/bash /usr/bin/echo @@ -64,3 +66,10 @@ basepython=python3 commands= python setup.py bdist_wheel --bdist-dir {envdir}/bdist --dist-dir {envdir}/dist bash -c "check-wheel-contents {envdir}/dist/*.whl" + +[testenv:ruff] +deps= + ruff==0.1.3 +basepython=python3 +commands= + ruff check setup.py emoji_fzf/