Skip to content

Commit

Permalink
Update emoji dictionaries
Browse files Browse the repository at this point in the history
Fix a few misc things.

Remove 3.7 support, add 3.12 support.
  • Loading branch information
noahp committed Mar 22, 2024
1 parent f0b993e commit c9c3c38
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 42 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches:
- main

workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-22.04
Expand All @@ -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/
10 changes: 5 additions & 5 deletions .python-version
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)

<!-- omit in toc -->

# emoji-fzf

Small utility for manipulating emojis via
Expand Down Expand Up @@ -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"]
}
]
```
Expand Down
2 changes: 1 addition & 1 deletion emojilib
2 changes: 1 addition & 1 deletion gemoji
20 changes: 2 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))


Expand All @@ -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="[email protected]",
Expand All @@ -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",
],
)
11 changes: 10 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/

0 comments on commit c9c3c38

Please sign in to comment.