Skip to content

Commit

Permalink
build(deps): unihan-etl 0.30.1 -> 33.1, UNIHAN 15.1.0 (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Feb 9, 2024
2 parents 65e09c7 + 7fd8f5c commit 29972c9
Show file tree
Hide file tree
Showing 16 changed files with 2,857 additions and 241 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- name: Test with pytest
run: poetry run py.test --cov=./ --cov-report=xml

- name: Test with pytest
run: poetry run ./examples/basic_usage.py

- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
10 changes: 8 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@

### Bug fixes

- Bump unihan-etl 0.29.0 -> 0.30.1
- unihan-etl: 0.29.0 -> 0.33.1

Fix `kRSUnicode` double apostrophes.
- Bump unihan-etl 0.30.1 -> 0.33.1 (#366)

Bump UNIHAN compatibility from 11.0.0 to [15.1.0](https://www.unicode.org/reports/tr38/tr38-35.html#History) (released 2023-09-01, revision 35).

- Bump unihan-etl 0.29.0 -> 0.30.1

Fix `kRSUnicode` double apostrophes.

### Development

Expand Down
8 changes: 4 additions & 4 deletions examples/basic_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ def run(unihan_options: t.Optional[t.Dict[str, object]] = None) -> None:
if not c.unihan.is_bootstrapped: # download and install Unihan to db
c.unihan.bootstrap(unihan_options)

query = c.unihan.lookup_char("")
query = c.unihan.lookup_char("")
glyph = query.first()

assert glyph is not None
print("lookup for : %s" % glyph.kDefinition)
print("lookup for : %s" % glyph.kDefinition)

query = c.unihan.reverse_char("good")
print('matches for "good": %s ' % ", ".join([glph.char for glph in query]))
query = c.unihan.reverse_char("granary")
print('matches for "granary": %s ' % ", ".join([glph.char for glph in query]))


if __name__ == "__main__":
Expand Down
8 changes: 4 additions & 4 deletions examples/basic_usage_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ def run(unihan_options: t.Optional[t.Dict[str, object]] = None) -> None:
if not c.unihan.is_bootstrapped: # download and install Unihan to db
c.unihan.bootstrap(unihan_options)

query = c.unihan.lookup_char("")
query = c.unihan.lookup_char("")
glyph = query.first()
assert glyph is not None
print("lookup for : %s" % glyph.kDefinition)
print("lookup for : %s" % glyph.kDefinition)

query = c.unihan.reverse_char("good")
print('matches for "good": %s ' % ", ".join([glph.char for glph in query]))
query = c.unihan.reverse_char("granary")
print('matches for "granary": %s ' % ", ".join([glph.char for glph in query]))


if __name__ == "__main__":
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ python = "^3.8"
appdirs = "*"
PyYAML = "~6.0"
sqlalchemy = { extras = ["mypy"], version = "~2.0" }
unihan-etl = "~=0.30.1"
unihan-etl = "~=0.33.1"

[tool.poetry.group.docs.dependencies]
### Docs ###
Expand Down
4 changes: 0 additions & 4 deletions src/cihai/data/unihan/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
"kPhonetic",
"kPrimaryNumeric",
"kRSAdobe_Japan1_6",
"kRSJapanese",
"kRSKanWa",
"kRSKangXi",
"kRSKorean",
"kRSUnicode",
"kSemanticVariant",
"kSimplifiedVariant",
Expand Down

0 comments on commit 29972c9

Please sign in to comment.