cihai-cli 0.28.0__tar.gz → 0.30.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.
- cihai_cli-0.30.0/.codecov.yml +15 -0
- cihai_cli-0.30.0/.github/dependabot.yml +7 -0
- cihai_cli-0.30.0/.github/workflows/docs.yml +76 -0
- cihai_cli-0.30.0/.github/workflows/tests.yml +79 -0
- cihai_cli-0.30.0/.gitignore +58 -0
- cihai_cli-0.30.0/.prettierrc +3 -0
- cihai_cli-0.30.0/.python-version +1 -0
- cihai_cli-0.30.0/.tmuxp.yaml +23 -0
- cihai_cli-0.30.0/.tool-versions +2 -0
- cihai_cli-0.30.0/.vim/coc-settings.json +19 -0
- cihai_cli-0.30.0/CHANGES +622 -0
- cihai_cli-0.30.0/MANIFEST.in +3 -0
- cihai_cli-0.30.0/MIGRATION +41 -0
- cihai_cli-0.30.0/Makefile +64 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/PKG-INFO +15 -17
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/README.md +1 -1
- cihai_cli-0.30.0/docs/Makefile +189 -0
- cihai_cli-0.30.0/docs/_static/css/custom.css +20 -0
- cihai_cli-0.30.0/docs/_static/favicon.ico +0 -0
- cihai_cli-0.30.0/docs/_static/img/cihai.svg +154 -0
- cihai_cli-0.30.0/docs/_static/img/icons/icon-128x128.png +0 -0
- cihai_cli-0.30.0/docs/_static/img/icons/icon-144x144.png +0 -0
- cihai_cli-0.30.0/docs/_static/img/icons/icon-152x152.png +0 -0
- cihai_cli-0.30.0/docs/_static/img/icons/icon-192x192.png +0 -0
- cihai_cli-0.30.0/docs/_static/img/icons/icon-384x384.png +0 -0
- cihai_cli-0.30.0/docs/_static/img/icons/icon-512x512-centered.png +0 -0
- cihai_cli-0.30.0/docs/_static/img/icons/icon-512x512.png +0 -0
- cihai_cli-0.30.0/docs/_static/img/icons/icon-72x72.png +0 -0
- cihai_cli-0.30.0/docs/_static/img/icons/icon-96x96.png +0 -0
- cihai_cli-0.30.0/docs/_templates/layout.html +45 -0
- cihai_cli-0.30.0/docs/_templates/sidebar/projects.html +69 -0
- cihai_cli-0.30.0/docs/api.md +29 -0
- cihai_cli-0.30.0/docs/cli/completion.md +78 -0
- cihai_cli-0.30.0/docs/cli/index.md +36 -0
- cihai_cli-0.30.0/docs/cli/info.md +15 -0
- cihai_cli-0.30.0/docs/cli/reverse.md +15 -0
- cihai_cli-0.30.0/docs/conf.py +229 -0
- cihai_cli-0.30.0/docs/history.md +5 -0
- cihai_cli-0.30.0/docs/index.md +26 -0
- cihai_cli-0.30.0/docs/manifest.json +53 -0
- cihai_cli-0.30.0/docs/migration.md +5 -0
- cihai_cli-0.30.0/docs/quickstart.md +52 -0
- cihai_cli-0.30.0/docs/redirects.txt +2 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/pyproject.toml +88 -54
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/src/cihai_cli/__about__.py +1 -1
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/src/cihai_cli/cli.py +2 -2
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/conftest.py +10 -10
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/test_cli.py +1 -0
- cihai_cli-0.30.0/tox.ini +5 -0
- cihai_cli-0.30.0/uv.lock +1565 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/LICENSE +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/src/cihai_cli/__init__.py +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/__init__.py +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/fixtures/Unihan_DictionaryIndices.txt +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/fixtures/Unihan_DictionaryLikeData.txt +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/fixtures/Unihan_IRGSources.txt +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/fixtures/Unihan_NumericValues.txt +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/fixtures/Unihan_OtherMappings.txt +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/fixtures/Unihan_RadicalStrokeCounts.txt +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/fixtures/Unihan_Readings.txt +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/fixtures/Unihan_Variants.txt +0 -0
- {cihai_cli-0.28.0 → cihai_cli-0.30.0}/tests/fixtures/test_config.yml +0 -0
|
@@ -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@v5
|
|
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.9', '3.13']
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Install uv
|
|
17
|
+
uses: astral-sh/setup-uv@v5
|
|
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@v5
|
|
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 @@
|
|
|
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,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
|
+
}
|