Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unihan-etl 33.1 (UNIHAN 15.1.0) #366

Merged
merged 6 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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