cihai-cli 0.28.0__tar.gz → 0.29.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. cihai_cli-0.29.0/.codecov.yml +15 -0
  2. cihai_cli-0.29.0/.github/dependabot.yml +7 -0
  3. cihai_cli-0.29.0/.github/workflows/docs.yml +76 -0
  4. cihai_cli-0.29.0/.github/workflows/tests.yml +79 -0
  5. cihai_cli-0.29.0/.gitignore +58 -0
  6. cihai_cli-0.29.0/.prettierrc +3 -0
  7. cihai_cli-0.29.0/.python-version +1 -0
  8. cihai_cli-0.29.0/.tmuxp.yaml +23 -0
  9. cihai_cli-0.29.0/.tool-versions +2 -0
  10. cihai_cli-0.29.0/.vim/coc-settings.json +19 -0
  11. cihai_cli-0.29.0/CHANGES +585 -0
  12. cihai_cli-0.29.0/MANIFEST.in +3 -0
  13. cihai_cli-0.29.0/MIGRATION +41 -0
  14. cihai_cli-0.29.0/Makefile +64 -0
  15. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/PKG-INFO +13 -15
  16. cihai_cli-0.29.0/docs/Makefile +189 -0
  17. cihai_cli-0.29.0/docs/_static/css/custom.css +20 -0
  18. cihai_cli-0.29.0/docs/_static/favicon.ico +0 -0
  19. cihai_cli-0.29.0/docs/_static/img/cihai.svg +154 -0
  20. cihai_cli-0.29.0/docs/_static/img/icons/icon-128x128.png +0 -0
  21. cihai_cli-0.29.0/docs/_static/img/icons/icon-144x144.png +0 -0
  22. cihai_cli-0.29.0/docs/_static/img/icons/icon-152x152.png +0 -0
  23. cihai_cli-0.29.0/docs/_static/img/icons/icon-192x192.png +0 -0
  24. cihai_cli-0.29.0/docs/_static/img/icons/icon-384x384.png +0 -0
  25. cihai_cli-0.29.0/docs/_static/img/icons/icon-512x512-centered.png +0 -0
  26. cihai_cli-0.29.0/docs/_static/img/icons/icon-512x512.png +0 -0
  27. cihai_cli-0.29.0/docs/_static/img/icons/icon-72x72.png +0 -0
  28. cihai_cli-0.29.0/docs/_static/img/icons/icon-96x96.png +0 -0
  29. cihai_cli-0.29.0/docs/_templates/layout.html +45 -0
  30. cihai_cli-0.29.0/docs/_templates/sidebar/projects.html +69 -0
  31. cihai_cli-0.29.0/docs/api.md +29 -0
  32. cihai_cli-0.29.0/docs/cli/completion.md +78 -0
  33. cihai_cli-0.29.0/docs/cli/index.md +36 -0
  34. cihai_cli-0.29.0/docs/cli/info.md +15 -0
  35. cihai_cli-0.29.0/docs/cli/reverse.md +15 -0
  36. cihai_cli-0.29.0/docs/conf.py +229 -0
  37. cihai_cli-0.29.0/docs/history.md +5 -0
  38. cihai_cli-0.29.0/docs/index.md +26 -0
  39. cihai_cli-0.29.0/docs/manifest.json +53 -0
  40. cihai_cli-0.29.0/docs/migration.md +5 -0
  41. cihai_cli-0.29.0/docs/quickstart.md +52 -0
  42. cihai_cli-0.29.0/docs/redirects.txt +2 -0
  43. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/pyproject.toml +85 -51
  44. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/src/cihai_cli/__about__.py +1 -1
  45. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/src/cihai_cli/cli.py +1 -1
  46. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/conftest.py +7 -7
  47. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/test_cli.py +1 -0
  48. cihai_cli-0.29.0/tox.ini +5 -0
  49. cihai_cli-0.29.0/uv.lock +1394 -0
  50. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/LICENSE +0 -0
  51. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/README.md +0 -0
  52. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/src/cihai_cli/__init__.py +0 -0
  53. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/__init__.py +0 -0
  54. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/fixtures/Unihan_DictionaryIndices.txt +0 -0
  55. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/fixtures/Unihan_DictionaryLikeData.txt +0 -0
  56. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/fixtures/Unihan_IRGSources.txt +0 -0
  57. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/fixtures/Unihan_NumericValues.txt +0 -0
  58. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/fixtures/Unihan_OtherMappings.txt +0 -0
  59. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/fixtures/Unihan_RadicalStrokeCounts.txt +0 -0
  60. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/fixtures/Unihan_Readings.txt +0 -0
  61. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/fixtures/Unihan_Variants.txt +0 -0
  62. {cihai_cli-0.28.0 → cihai_cli-0.29.0}/tests/fixtures/test_config.yml +0 -0
@@ -0,0 +1,15 @@
1
+ codecov:
2
+ notify:
3
+ require_ci_to_pass: no
4
+
5
+ coverage:
6
+ precision: 2
7
+ round: down
8
+ range: "70...100"
9
+ status:
10
+ project:
11
+ default:
12
+ target: auto
13
+ threshold: 1%
14
+ base: auto
15
+ patch: off
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ # Check for updates to GitHub Actions every week
7
+ interval: "weekly"
@@ -0,0 +1,76 @@
1
+ name: docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ['3.13']
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Filter changed file paths to outputs
18
+ uses: dorny/paths-filter@v3.0.2
19
+ id: changes
20
+ with:
21
+ filters: |
22
+ root_docs:
23
+ - CHANGES
24
+ - README.*
25
+ docs:
26
+ - 'docs/**'
27
+ - 'examples/**'
28
+ python_files:
29
+ - 'src/cihai_cli/**'
30
+ - pyproject.toml
31
+ - uv.lock
32
+
33
+ - name: Should publish
34
+ if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
35
+ run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
36
+
37
+ - name: Install uv
38
+ uses: astral-sh/setup-uv@v3
39
+ with:
40
+ enable-cache: true
41
+
42
+ - name: Set up Python ${{ matrix.python-version }}
43
+ run: uv python install ${{ matrix.python-version }}
44
+
45
+ - name: Install dependencies
46
+ run: uv sync --all-extras --dev
47
+
48
+ - name: Print python versions
49
+ if: env.PUBLISH == 'true'
50
+ run: |
51
+ python -V
52
+ uv run python -V
53
+
54
+ - name: Build documentation
55
+ if: env.PUBLISH == 'true'
56
+ run: |
57
+ pushd docs; make SPHINXBUILD='uv run sphinx-build' html; popd
58
+
59
+ - name: Push documentation to S3
60
+ if: env.PUBLISH == 'true'
61
+ uses: jakejarvis/s3-sync-action@v0.5.1
62
+ with:
63
+ args: --acl public-read --follow-symlinks --delete
64
+ env:
65
+ AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
66
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
67
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
68
+ AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
69
+ SOURCE_DIR: 'docs/_build/html' # optional: defaults to entire repository
70
+
71
+ - name: Purge cache on Cloudflare
72
+ if: env.PUBLISH == 'true'
73
+ uses: jakejarvis/cloudflare-purge-action@v0.3.0
74
+ env:
75
+ CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
76
+ CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
@@ -0,0 +1,79 @@
1
+ name: tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
8
+
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ python-version: ['3.8', '3.13']
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Install uv
17
+ uses: astral-sh/setup-uv@v3
18
+ with:
19
+ enable-cache: true
20
+
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ run: uv python install ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: uv sync --all-extras --dev
26
+
27
+ - name: Print python versions
28
+ run: |
29
+ python -V
30
+ uv run python -V
31
+
32
+ - name: Lint with ruff check
33
+ run: uv run ruff check .
34
+
35
+ - name: Format with ruff format
36
+ run: uv run ruff format . --check
37
+
38
+ - name: Lint with mypy
39
+ run: uv run mypy .
40
+
41
+ - name: Test with pytest
42
+ run: uv run py.test --cov=./ --cov-report=xml
43
+
44
+ - uses: codecov/codecov-action@v5
45
+ with:
46
+ token: ${{ secrets.CODECOV_TOKEN }}
47
+
48
+ release:
49
+ runs-on: ubuntu-latest
50
+ needs: build
51
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
52
+
53
+ strategy:
54
+ matrix:
55
+ python-version: ['3.13']
56
+
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+
60
+ - name: Install uv
61
+ uses: astral-sh/setup-uv@v3
62
+ with:
63
+ enable-cache: true
64
+
65
+ - name: Set up Python ${{ matrix.python-version }}
66
+ run: uv python install ${{ matrix.python-version }}
67
+
68
+ - name: Install dependencies
69
+ run: uv sync --all-extras --dev
70
+
71
+ - name: Build package
72
+ run: uv build
73
+
74
+ - name: Publish package
75
+ uses: pypa/gh-action-pypi-publish@release/v1
76
+ with:
77
+ user: __token__
78
+ password: ${{ secrets.PYPI_API_TOKEN }}
79
+ skip_existing: true
@@ -0,0 +1,58 @@
1
+ *.py[cod]
2
+
3
+ # C extensions
4
+ *.so
5
+
6
+ # Packages
7
+ *.egg
8
+ *.egg-info
9
+ dist
10
+ build
11
+ eggs
12
+ parts
13
+ bin
14
+ var
15
+ sdist
16
+ develop-eggs
17
+ .installed.cfg
18
+ lib
19
+ lib64
20
+ __pycache__
21
+
22
+ # Installer logs
23
+ pip-log.txt
24
+
25
+ # Unit test / coverage reports
26
+ .coverage
27
+ .tox
28
+ nosetests.xml
29
+
30
+ # Translations
31
+ *.mo
32
+
33
+ # Mr Developer
34
+ .mr.developer.cfg
35
+ .project
36
+ .pydevproject
37
+
38
+ .env
39
+ .env3
40
+
41
+ docs/_build
42
+
43
+ .ropeproject
44
+ .idea
45
+
46
+ .DS_Store
47
+
48
+ .*env*/
49
+ .cache/
50
+ .mypy_cache/
51
+ .pytest_cache/
52
+ .eggs/
53
+
54
+ # Monkeytype
55
+ monkeytype.sqlite3
56
+
57
+ # Test data
58
+ .cihai_cache/
@@ -0,0 +1,3 @@
1
+ {
2
+ "printWidth": 100
3
+ }
@@ -0,0 +1 @@
1
+ 3.13.0
@@ -0,0 +1,23 @@
1
+ session_name: cihai-cli
2
+ start_directory: ./ # load session relative to config location (project root).
3
+ windows:
4
+ - window_name: cihai-cli
5
+ focus: True
6
+ layout: main-horizontal
7
+ options:
8
+ main-pane-height: 67%
9
+ panes:
10
+ - focus: true
11
+ - pane
12
+ - make watch_mypy
13
+ - make start
14
+ - window_name: docs
15
+ layout: main-horizontal
16
+ options:
17
+ main-pane-height: 67%
18
+ start_directory: docs/
19
+ panes:
20
+ - focus: true
21
+ - pane
22
+ - pane
23
+ - make start
@@ -0,0 +1,2 @@
1
+ uv 0.5.4
2
+ python 3.13.0 3.12.7 3.11.10 3.10.15 3.9.20 3.8.20 3.7.17
@@ -0,0 +1,19 @@
1
+ {
2
+ "[markdown][python]": {
3
+ "coc.preferences.formatOnSave": true
4
+ },
5
+ "python.analysis.autoSearchPaths": true,
6
+ "python.analysis.typeCheckingMode": "basic",
7
+ "python.analysis.useLibraryCodeForTypes": true,
8
+ "python.formatting.provider": "ruff",
9
+ "python.linting.ruffEnabled": true,
10
+ "python.linting.mypyEnabled": true,
11
+ "python.linting.flake8Enabled": false,
12
+ "python.linting.pyflakesEnabled": false,
13
+ "python.linting.pycodestyleEnabled": false,
14
+ "python.linting.banditEnabled": false,
15
+ "python.linting.pylamaEnabled": false,
16
+ "python.linting.pylintEnabled": false,
17
+ "pyright.organizeimports.provider": "ruff",
18
+ "pyright.testing.provider": "pytest",
19
+ }