cihai-cli 0.31.0__tar.gz → 0.31.1__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.31.0 → cihai_cli-0.31.1}/.github/workflows/docs.yml +28 -12
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.github/workflows/tests.yml +9 -7
- cihai_cli-0.31.1/.python-version +1 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.tmuxp.yaml +3 -3
- cihai_cli-0.31.1/.tool-versions +3 -0
- cihai_cli-0.31.1/AGENTS.md +174 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/CHANGES +22 -1
- cihai_cli-0.31.1/CLAUDE.md +1 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/PKG-INFO +2 -2
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_templates/sidebar/projects.html +1 -1
- cihai_cli-0.31.1/docs/justfile +206 -0
- cihai_cli-0.31.1/justfile +143 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/pyproject.toml +4 -4
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/src/cihai_cli/__about__.py +1 -1
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/src/cihai_cli/cli.py +4 -4
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/uv.lock +577 -423
- cihai_cli-0.31.0/.python-version +0 -1
- cihai_cli-0.31.0/.tool-versions +0 -2
- cihai_cli-0.31.0/Makefile +0 -64
- cihai_cli-0.31.0/docs/Makefile +0 -189
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.codecov.yml +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.cursor/rules/avoid-debug-loops.mdc +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.cursor/rules/dev-loop.mdc +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.cursor/rules/git-commits.mdc +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.cursor/rules/notes-llms-txt.mdc +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.github/dependabot.yml +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.gitignore +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.prettierrc +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.vim/coc-settings.json +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/.windsurfrules +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/LICENSE +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/MANIFEST.in +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/MIGRATION +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/README.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/css/custom.css +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/favicon.ico +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/cihai.svg +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/icons/icon-128x128.png +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/icons/icon-144x144.png +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/icons/icon-152x152.png +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/icons/icon-192x192.png +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/icons/icon-384x384.png +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/icons/icon-512x512-centered.png +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/icons/icon-512x512.png +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/icons/icon-72x72.png +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_static/img/icons/icon-96x96.png +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/_templates/layout.html +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/api.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/cli/completion.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/cli/index.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/cli/info.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/cli/reverse.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/conf.py +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/history.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/index.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/manifest.json +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/migration.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/quickstart.md +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/docs/redirects.txt +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/src/cihai_cli/__init__.py +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/__init__.py +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/conftest.py +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/fixtures/Unihan_DictionaryIndices.txt +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/fixtures/Unihan_DictionaryLikeData.txt +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/fixtures/Unihan_IRGSources.txt +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/fixtures/Unihan_NumericValues.txt +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/fixtures/Unihan_OtherMappings.txt +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/fixtures/Unihan_RadicalStrokeCounts.txt +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/fixtures/Unihan_Readings.txt +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/fixtures/Unihan_Variants.txt +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/fixtures/test_config.yml +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tests/test_cli.py +0 -0
- {cihai_cli-0.31.0 → cihai_cli-0.31.1}/tox.ini +0 -0
|
@@ -5,14 +5,19 @@ on:
|
|
|
5
5
|
branches:
|
|
6
6
|
- master
|
|
7
7
|
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
8
12
|
jobs:
|
|
9
13
|
build:
|
|
10
14
|
runs-on: ubuntu-latest
|
|
15
|
+
environment: docs
|
|
11
16
|
strategy:
|
|
12
17
|
matrix:
|
|
13
18
|
python-version: ['3.14']
|
|
14
19
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@v6
|
|
16
21
|
|
|
17
22
|
- name: Filter changed file paths to outputs
|
|
18
23
|
uses: dorny/paths-filter@v3.0.2
|
|
@@ -35,7 +40,7 @@ jobs:
|
|
|
35
40
|
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
|
|
36
41
|
|
|
37
42
|
- name: Install uv
|
|
38
|
-
uses: astral-sh/setup-uv@
|
|
43
|
+
uses: astral-sh/setup-uv@v7
|
|
39
44
|
with:
|
|
40
45
|
enable-cache: true
|
|
41
46
|
|
|
@@ -45,6 +50,9 @@ jobs:
|
|
|
45
50
|
- name: Install dependencies
|
|
46
51
|
run: uv sync --all-extras --dev
|
|
47
52
|
|
|
53
|
+
- name: Install just
|
|
54
|
+
uses: extractions/setup-just@v3
|
|
55
|
+
|
|
48
56
|
- name: Print python versions
|
|
49
57
|
if: env.PUBLISH == 'true'
|
|
50
58
|
run: |
|
|
@@ -54,19 +62,27 @@ jobs:
|
|
|
54
62
|
- name: Build documentation
|
|
55
63
|
if: env.PUBLISH == 'true'
|
|
56
64
|
run: |
|
|
57
|
-
|
|
65
|
+
cd docs && just html
|
|
58
66
|
|
|
59
|
-
- name:
|
|
67
|
+
- name: Configure AWS Credentials
|
|
60
68
|
if: env.PUBLISH == 'true'
|
|
61
|
-
uses:
|
|
69
|
+
uses: aws-actions/configure-aws-credentials@v5
|
|
62
70
|
with:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
role-to-assume: ${{ secrets.CIHAI_CLI_DOCS_ROLE_ARN }}
|
|
72
|
+
aws-region: us-east-1
|
|
73
|
+
|
|
74
|
+
- name: Push documentation to S3
|
|
75
|
+
if: env.PUBLISH == 'true'
|
|
76
|
+
run: |
|
|
77
|
+
aws s3 sync docs/_build/html "s3://${{ secrets.CIHAI_CLI_DOCS_BUCKET }}" \
|
|
78
|
+
--delete --follow-symlinks
|
|
79
|
+
|
|
80
|
+
- name: Invalidate CloudFront
|
|
81
|
+
if: env.PUBLISH == 'true'
|
|
82
|
+
run: |
|
|
83
|
+
aws cloudfront create-invalidation \
|
|
84
|
+
--distribution-id "${{ secrets.CIHAI_CLI_DOCS_DISTRIBUTION }}" \
|
|
85
|
+
--paths "/index.html" "/objects.inv" "/searchindex.js"
|
|
70
86
|
|
|
71
87
|
- name: Purge cache on Cloudflare
|
|
72
88
|
if: env.PUBLISH == 'true'
|
|
@@ -11,10 +11,10 @@ jobs:
|
|
|
11
11
|
matrix:
|
|
12
12
|
python-version: ['3.14']
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
15
|
|
|
16
16
|
- name: Install uv
|
|
17
|
-
uses: astral-sh/setup-uv@
|
|
17
|
+
uses: astral-sh/setup-uv@v7
|
|
18
18
|
with:
|
|
19
19
|
enable-cache: true
|
|
20
20
|
|
|
@@ -49,16 +49,19 @@ jobs:
|
|
|
49
49
|
runs-on: ubuntu-latest
|
|
50
50
|
needs: build
|
|
51
51
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
52
|
+
permissions:
|
|
53
|
+
id-token: write
|
|
54
|
+
attestations: write
|
|
52
55
|
|
|
53
56
|
strategy:
|
|
54
57
|
matrix:
|
|
55
58
|
python-version: ['3.14']
|
|
56
59
|
|
|
57
60
|
steps:
|
|
58
|
-
- uses: actions/checkout@
|
|
61
|
+
- uses: actions/checkout@v6
|
|
59
62
|
|
|
60
63
|
- name: Install uv
|
|
61
|
-
uses: astral-sh/setup-uv@
|
|
64
|
+
uses: astral-sh/setup-uv@v7
|
|
62
65
|
with:
|
|
63
66
|
enable-cache: true
|
|
64
67
|
|
|
@@ -74,6 +77,5 @@ jobs:
|
|
|
74
77
|
- name: Publish package
|
|
75
78
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
76
79
|
with:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
skip_existing: true
|
|
80
|
+
attestations: true
|
|
81
|
+
skip-existing: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -9,8 +9,8 @@ windows:
|
|
|
9
9
|
panes:
|
|
10
10
|
- focus: true
|
|
11
11
|
- pane
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- just watch-mypy
|
|
13
|
+
- just start
|
|
14
14
|
- window_name: docs
|
|
15
15
|
layout: main-horizontal
|
|
16
16
|
options:
|
|
@@ -20,4 +20,4 @@ windows:
|
|
|
20
20
|
- focus: true
|
|
21
21
|
- pane
|
|
22
22
|
- pane
|
|
23
|
-
-
|
|
23
|
+
- just start
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Guidance for AI agents (Cursor, Claude Code, Copilot, etc.) working in this repository.
|
|
4
|
+
|
|
5
|
+
## CRITICAL REQUIREMENTS
|
|
6
|
+
|
|
7
|
+
### Test Success
|
|
8
|
+
- ALL tests must pass (unit, doctest, lint, type checks) before declaring work complete.
|
|
9
|
+
- Do not describe code as "working" if any test fails.
|
|
10
|
+
- Fix regressions rather than disabling or skipping tests unless explicitly approved.
|
|
11
|
+
|
|
12
|
+
## Project Overview
|
|
13
|
+
|
|
14
|
+
gp-libs is the shared tooling stack used across the git-pull ecosystem. This repository, `cihai-cli`, is a command-line interface built on top of the `cihai` library to explore the Unihan (CJK) character database. Key abilities:
|
|
15
|
+
- Lookup CJK characters with `cihai info <char>` and YAML-formatted output.
|
|
16
|
+
- Reverse search definitions with `cihai reverse <term>`.
|
|
17
|
+
- Bootstraps and queries the Unihan dataset via `cihai` / `unihan-etl`.
|
|
18
|
+
- Provides a small, typed argparse-based CLI (`src/cihai_cli/cli.py`) exposed as the `cihai` entry point.
|
|
19
|
+
|
|
20
|
+
## Development Environment
|
|
21
|
+
|
|
22
|
+
This project uses:
|
|
23
|
+
- Python 3.10+
|
|
24
|
+
- [uv](https://github.com/astral-sh/uv) for dependency and task execution
|
|
25
|
+
- [ruff](https://github.com/astral-sh/ruff) for linting/formatting
|
|
26
|
+
- [mypy](https://github.com/python/mypy) with strict settings
|
|
27
|
+
- [pytest](https://docs.pytest.org/) (+ doctests) for testing
|
|
28
|
+
- [gp-libs](https://github.com/gp-libs/gp-libs) for shared docs/testing helpers
|
|
29
|
+
- Sphinx (Furo) for documentation
|
|
30
|
+
|
|
31
|
+
## Common Commands
|
|
32
|
+
|
|
33
|
+
### Setup
|
|
34
|
+
```bash
|
|
35
|
+
# Install dependencies (editable)
|
|
36
|
+
uv pip install --editable .
|
|
37
|
+
uv pip sync
|
|
38
|
+
|
|
39
|
+
# Install with dev extras
|
|
40
|
+
uv pip install --editable . -G dev
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Tests
|
|
44
|
+
```bash
|
|
45
|
+
just test # or: uv run pytest
|
|
46
|
+
uv run pytest tests/test_cli.py # single file
|
|
47
|
+
uv run pytest tests/test_cli.py::test_info_command # single test
|
|
48
|
+
|
|
49
|
+
just start # run tests then watch with pytest-watcher
|
|
50
|
+
uv run ptw . # standalone watcher (doctests enabled by default)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Linting & Types
|
|
54
|
+
```bash
|
|
55
|
+
just ruff # uv run ruff check .
|
|
56
|
+
just ruff-format # uv run ruff format .
|
|
57
|
+
uv run ruff check . --fix --show-fixes
|
|
58
|
+
|
|
59
|
+
just mypy # strict type checking
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Documentation
|
|
63
|
+
```bash
|
|
64
|
+
just build-docs # build Sphinx HTML in docs/_build
|
|
65
|
+
just start-docs # autobuild + livereload
|
|
66
|
+
just design-docs # update CSS/JS assets
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Workflow (recommended)
|
|
70
|
+
1) `uv run ruff format .`
|
|
71
|
+
2) `uv run pytest`
|
|
72
|
+
3) `uv run ruff check . --fix --show-fixes`
|
|
73
|
+
4) `uv run mypy`
|
|
74
|
+
5) `uv run pytest` (verify clean)
|
|
75
|
+
|
|
76
|
+
## Code Architecture (quick map)
|
|
77
|
+
- `src/cihai_cli/cli.py`: argparse entrypoint, implements `info` and `reverse` commands, logging setup.
|
|
78
|
+
- `src/cihai_cli/__about__.py`: package metadata (`__version__`).
|
|
79
|
+
- Tests: `tests/` (unit) plus doctests in `src/` and `docs/`.
|
|
80
|
+
- Docs: `docs/` Sphinx project (Furo theme).
|
|
81
|
+
|
|
82
|
+
## Testing Strategy
|
|
83
|
+
- Pytest with doctests enabled (`addopts` in `pyproject.toml`).
|
|
84
|
+
- Prefer real `cihai` / `unihan_etl` integration over heavy mocking; reuse fixtures where present.
|
|
85
|
+
- Watch mode: `uv run ptw .` (used in `just start`).
|
|
86
|
+
- Coverage via `pytest-cov`; configuration in `pyproject.toml`.
|
|
87
|
+
- Prefer fixtures over mocks (`server`, `session`, etc. when available); use `tmp_path` over `tempfile`, `monkeypatch` over `unittest.mock`.
|
|
88
|
+
|
|
89
|
+
## Coding Standards
|
|
90
|
+
- `from __future__ import annotations` required; enforced by ruff.
|
|
91
|
+
- Namespace imports for stdlib/typing (`import typing as t`); third-party packages may use `from X import Y`.
|
|
92
|
+
- Docstrings follow NumPy style (see `tool.ruff.lint.pydocstyle`).
|
|
93
|
+
- Python target version: 3.10 (`tool.ruff.target-version`).
|
|
94
|
+
- Keep CLI output human-friendly YAML; avoid breaking existing flags/args.
|
|
95
|
+
- Doctests: keep concise, narrative Examples blocks; move complex flows to `tests/examples/`.
|
|
96
|
+
|
|
97
|
+
## Documentation Standards
|
|
98
|
+
|
|
99
|
+
### Code Blocks in Documentation
|
|
100
|
+
|
|
101
|
+
When writing documentation (README, CHANGES, docs/), follow these rules for code blocks:
|
|
102
|
+
|
|
103
|
+
**One command per code block.** This makes commands individually copyable.
|
|
104
|
+
|
|
105
|
+
**Put explanations outside the code block**, not as comments inside.
|
|
106
|
+
|
|
107
|
+
Good:
|
|
108
|
+
|
|
109
|
+
Run the tests:
|
|
110
|
+
|
|
111
|
+
```console
|
|
112
|
+
$ uv run pytest
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Run with coverage:
|
|
116
|
+
|
|
117
|
+
```console
|
|
118
|
+
$ uv run pytest --cov
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Bad:
|
|
122
|
+
|
|
123
|
+
```console
|
|
124
|
+
# Run the tests
|
|
125
|
+
$ uv run pytest
|
|
126
|
+
|
|
127
|
+
# Run with coverage
|
|
128
|
+
$ uv run pytest --cov
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Debugging Tips
|
|
132
|
+
- Lean on `pytest -k <pattern> -vv` for focused failures.
|
|
133
|
+
- For CLI behavior, run `uv run cihai info 好` or `uv run cihai reverse library`.
|
|
134
|
+
- If Unihan DB is missing, CLI bootstraps automatically; avoid altering that flow unless required.
|
|
135
|
+
- Stuck in loops? Pause, minimize to a minimal repro, document exact errors, and restate the hypothesis before another attempt.
|
|
136
|
+
|
|
137
|
+
## Git Commit Standards
|
|
138
|
+
|
|
139
|
+
Commit subjects: `Component/File(commit-type[scope]): Concise description`
|
|
140
|
+
|
|
141
|
+
Body template:
|
|
142
|
+
```
|
|
143
|
+
why: Reason or impact.
|
|
144
|
+
what:
|
|
145
|
+
- Key technical changes
|
|
146
|
+
- Single topic only
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Guidelines:
|
|
150
|
+
- Subject ≤50 chars; body lines ≤72 chars; imperative mood.
|
|
151
|
+
- One topic per commit; separate subject and body with a blank line.
|
|
152
|
+
- Mark breaking changes with `BREAKING:` and include related issue refs when relevant.
|
|
153
|
+
|
|
154
|
+
Common commit types:
|
|
155
|
+
- **feat**: New features or enhancements
|
|
156
|
+
- **fix**: Bug fixes
|
|
157
|
+
- **refactor**: Code restructuring without functional change
|
|
158
|
+
- **docs**: Documentation updates
|
|
159
|
+
- **chore**: Maintenance (dependencies, tooling, config)
|
|
160
|
+
- **test**: Test-related updates
|
|
161
|
+
- **style**: Code style and formatting
|
|
162
|
+
- **py(deps)**: Dependencies
|
|
163
|
+
- **py(deps[dev])**: Dev dependencies
|
|
164
|
+
- **ai(rules[LLM type])**: AI rule updates (e.g., `ai(rules[AGENTS])`)
|
|
165
|
+
|
|
166
|
+
## Notes & Docs Authoring
|
|
167
|
+
- For `notes/**/*.md`, keep content concise and well-structured (headings, bullets, code fences).
|
|
168
|
+
- Use clear link text `[Title](mdc:URL)` and avoid redundancy; follow llms.txt style when possible.
|
|
169
|
+
|
|
170
|
+
## References
|
|
171
|
+
- Project docs: https://cihai-cli.git-pull.com
|
|
172
|
+
- Library docs: https://cihai.git-pull.com
|
|
173
|
+
- Unihan dataset: https://www.unicode.org/charts/unihan.html
|
|
174
|
+
- Shared tooling: https://github.com/gp-libs/gp-libs
|
|
@@ -32,7 +32,28 @@ $ uvx --from 'cihai-cli' --prerelease allow cihai
|
|
|
32
32
|
|
|
33
33
|
<!-- Maintainers, insert changes / features for the next release here -->
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
_Add your latest changes from PRs here_
|
|
36
|
+
|
|
37
|
+
## cihai-cli 0.31.1 (2026-01-24)
|
|
38
|
+
|
|
39
|
+
### Breaking changes
|
|
40
|
+
|
|
41
|
+
- Bump cihai 0.36.0 -> 0.36.1 (#338)
|
|
42
|
+
|
|
43
|
+
### CI
|
|
44
|
+
|
|
45
|
+
- Migrate to PyPI Trusted Publisher (#332)
|
|
46
|
+
|
|
47
|
+
### Development
|
|
48
|
+
|
|
49
|
+
#### Makefile -> Justfile (#333)
|
|
50
|
+
|
|
51
|
+
- Migrate from `Makefile` to `justfile` for running development tasks
|
|
52
|
+
- Update documentation to reference `just` commands
|
|
53
|
+
|
|
54
|
+
### Documentation
|
|
55
|
+
|
|
56
|
+
- Migrate docs deployment to AWS OIDC authentication and AWS CLI
|
|
36
57
|
|
|
37
58
|
## cihai-cli 0.31.0 (2025-11-01)
|
|
38
59
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
AGENTS.md
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cihai-cli
|
|
3
|
-
Version: 0.31.
|
|
3
|
+
Version: 0.31.1
|
|
4
4
|
Summary: Command line frontend for the cihai CJK language library
|
|
5
5
|
Project-URL: Bug Tracker, https://github.com/cihai/cihai-cli/issues
|
|
6
6
|
Project-URL: Documentation, https://cihai-cli.git-pull.com
|
|
@@ -28,7 +28,7 @@ Classifier: Topic :: Software Development :: Localization
|
|
|
28
28
|
Classifier: Topic :: System :: Shells
|
|
29
29
|
Classifier: Topic :: Utilities
|
|
30
30
|
Requires-Python: <4.0,>=3.10
|
|
31
|
-
Requires-Dist: cihai~=0.36.
|
|
31
|
+
Requires-Dist: cihai~=0.36.1
|
|
32
32
|
Requires-Dist: pyyaml
|
|
33
33
|
Description-Content-Type: text/markdown
|
|
34
34
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<p class="indented-block">
|
|
50
50
|
<span class="project-name">web</span>
|
|
51
51
|
<span class="indent">
|
|
52
|
-
<a class="internal" href="https://social-embed.
|
|
52
|
+
<a class="internal" href="https://social-embed.org" class="current">social-embed</a>
|
|
53
53
|
</span>
|
|
54
54
|
</p>
|
|
55
55
|
</div>
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# justfile for cihai-cli documentation
|
|
2
|
+
# https://just.systems/
|
|
3
|
+
|
|
4
|
+
set shell := ["bash", "-uc"]
|
|
5
|
+
|
|
6
|
+
# Configuration
|
|
7
|
+
http_port := "8037"
|
|
8
|
+
builddir := "_build"
|
|
9
|
+
sphinxopts := ""
|
|
10
|
+
sphinxbuild := "uv run sphinx-build"
|
|
11
|
+
sourcedir := "."
|
|
12
|
+
|
|
13
|
+
# File patterns for watching
|
|
14
|
+
watch_files := "find .. -type f -not -path '*/\\.*' | grep -i '.*[.]\\(rst\\|md\\)$\\|.*[.]py$\\|CHANGES\\|TODO\\|.*conf\\.py' 2> /dev/null"
|
|
15
|
+
|
|
16
|
+
# Sphinx options
|
|
17
|
+
allsphinxopts := "-d " + builddir + "/doctrees " + sphinxopts + " ."
|
|
18
|
+
|
|
19
|
+
# List all available commands
|
|
20
|
+
default:
|
|
21
|
+
@just --list
|
|
22
|
+
|
|
23
|
+
# Build HTML documentation
|
|
24
|
+
[group: 'build']
|
|
25
|
+
html:
|
|
26
|
+
{{ sphinxbuild }} -b html {{ allsphinxopts }} {{ builddir }}/html
|
|
27
|
+
@echo ""
|
|
28
|
+
@echo "Build finished. The HTML pages are in {{ builddir }}/html."
|
|
29
|
+
|
|
30
|
+
# Build directory HTML files
|
|
31
|
+
[group: 'build']
|
|
32
|
+
dirhtml:
|
|
33
|
+
{{ sphinxbuild }} -b dirhtml {{ allsphinxopts }} {{ builddir }}/dirhtml
|
|
34
|
+
@echo ""
|
|
35
|
+
@echo "Build finished. The HTML pages are in {{ builddir }}/dirhtml."
|
|
36
|
+
|
|
37
|
+
# Build single HTML file
|
|
38
|
+
[group: 'build']
|
|
39
|
+
singlehtml:
|
|
40
|
+
{{ sphinxbuild }} -b singlehtml {{ allsphinxopts }} {{ builddir }}/singlehtml
|
|
41
|
+
@echo ""
|
|
42
|
+
@echo "Build finished. The HTML page is in {{ builddir }}/singlehtml."
|
|
43
|
+
|
|
44
|
+
# Build EPUB
|
|
45
|
+
[group: 'build']
|
|
46
|
+
epub:
|
|
47
|
+
{{ sphinxbuild }} -b epub {{ allsphinxopts }} {{ builddir }}/epub
|
|
48
|
+
@echo ""
|
|
49
|
+
@echo "Build finished. The epub file is in {{ builddir }}/epub."
|
|
50
|
+
|
|
51
|
+
# Build LaTeX files
|
|
52
|
+
[group: 'build']
|
|
53
|
+
latex:
|
|
54
|
+
{{ sphinxbuild }} -b latex {{ allsphinxopts }} {{ builddir }}/latex
|
|
55
|
+
@echo ""
|
|
56
|
+
@echo "Build finished; the LaTeX files are in {{ builddir }}/latex."
|
|
57
|
+
|
|
58
|
+
# Build PDF via LaTeX
|
|
59
|
+
[group: 'build']
|
|
60
|
+
latexpdf:
|
|
61
|
+
{{ sphinxbuild }} -b latex {{ allsphinxopts }} {{ builddir }}/latex
|
|
62
|
+
@echo "Running LaTeX files through pdflatex..."
|
|
63
|
+
make -C {{ builddir }}/latex all-pdf
|
|
64
|
+
@echo "pdflatex finished; the PDF files are in {{ builddir }}/latex."
|
|
65
|
+
|
|
66
|
+
# Build plain text files
|
|
67
|
+
[group: 'build']
|
|
68
|
+
text:
|
|
69
|
+
{{ sphinxbuild }} -b text {{ allsphinxopts }} {{ builddir }}/text
|
|
70
|
+
@echo ""
|
|
71
|
+
@echo "Build finished. The text files are in {{ builddir }}/text."
|
|
72
|
+
|
|
73
|
+
# Build man pages
|
|
74
|
+
[group: 'build']
|
|
75
|
+
man:
|
|
76
|
+
{{ sphinxbuild }} -b man {{ allsphinxopts }} {{ builddir }}/man
|
|
77
|
+
@echo ""
|
|
78
|
+
@echo "Build finished. The manual pages are in {{ builddir }}/man."
|
|
79
|
+
|
|
80
|
+
# Build JSON output
|
|
81
|
+
[group: 'build']
|
|
82
|
+
json:
|
|
83
|
+
{{ sphinxbuild }} -b json {{ allsphinxopts }} {{ builddir }}/json
|
|
84
|
+
@echo ""
|
|
85
|
+
@echo "Build finished; now you can process the JSON files."
|
|
86
|
+
|
|
87
|
+
# Clean build directory
|
|
88
|
+
[group: 'misc']
|
|
89
|
+
[confirm]
|
|
90
|
+
clean:
|
|
91
|
+
rm -rf {{ builddir }}/*
|
|
92
|
+
|
|
93
|
+
# Build HTML help files
|
|
94
|
+
[group: 'misc']
|
|
95
|
+
htmlhelp:
|
|
96
|
+
{{ sphinxbuild }} -b htmlhelp {{ allsphinxopts }} {{ builddir }}/htmlhelp
|
|
97
|
+
@echo ""
|
|
98
|
+
@echo "Build finished; now you can run HTML Help Workshop with the .hhp project file in {{ builddir }}/htmlhelp."
|
|
99
|
+
|
|
100
|
+
# Build Qt help files
|
|
101
|
+
[group: 'misc']
|
|
102
|
+
qthelp:
|
|
103
|
+
{{ sphinxbuild }} -b qthelp {{ allsphinxopts }} {{ builddir }}/qthelp
|
|
104
|
+
@echo ""
|
|
105
|
+
@echo "Build finished; now you can run 'qcollectiongenerator' with the .qhcp project file in {{ builddir }}/qthelp."
|
|
106
|
+
|
|
107
|
+
# Build Devhelp files
|
|
108
|
+
[group: 'misc']
|
|
109
|
+
devhelp:
|
|
110
|
+
{{ sphinxbuild }} -b devhelp {{ allsphinxopts }} {{ builddir }}/devhelp
|
|
111
|
+
@echo ""
|
|
112
|
+
@echo "Build finished."
|
|
113
|
+
|
|
114
|
+
# Build Texinfo files
|
|
115
|
+
[group: 'misc']
|
|
116
|
+
texinfo:
|
|
117
|
+
{{ sphinxbuild }} -b texinfo {{ allsphinxopts }} {{ builddir }}/texinfo
|
|
118
|
+
@echo ""
|
|
119
|
+
@echo "Build finished. The Texinfo files are in {{ builddir }}/texinfo."
|
|
120
|
+
|
|
121
|
+
# Build Info files from Texinfo
|
|
122
|
+
[group: 'misc']
|
|
123
|
+
info:
|
|
124
|
+
{{ sphinxbuild }} -b texinfo {{ allsphinxopts }} {{ builddir }}/texinfo
|
|
125
|
+
@echo "Running Texinfo files through makeinfo..."
|
|
126
|
+
make -C {{ builddir }}/texinfo info
|
|
127
|
+
@echo "makeinfo finished; the Info files are in {{ builddir }}/texinfo."
|
|
128
|
+
|
|
129
|
+
# Build gettext catalogs
|
|
130
|
+
[group: 'misc']
|
|
131
|
+
gettext:
|
|
132
|
+
{{ sphinxbuild }} -b gettext {{ sphinxopts }} . {{ builddir }}/locale
|
|
133
|
+
@echo ""
|
|
134
|
+
@echo "Build finished. The message catalogs are in {{ builddir }}/locale."
|
|
135
|
+
|
|
136
|
+
# Check all external links
|
|
137
|
+
[group: 'validate']
|
|
138
|
+
linkcheck:
|
|
139
|
+
{{ sphinxbuild }} -b linkcheck {{ allsphinxopts }} {{ builddir }}/linkcheck
|
|
140
|
+
@echo ""
|
|
141
|
+
@echo "Link check complete; look for any errors in the above output or in {{ builddir }}/linkcheck/output.txt."
|
|
142
|
+
|
|
143
|
+
# Run doctests embedded in documentation
|
|
144
|
+
[group: 'validate']
|
|
145
|
+
doctest:
|
|
146
|
+
{{ sphinxbuild }} -b doctest {{ allsphinxopts }} {{ builddir }}/doctest
|
|
147
|
+
@echo "Testing of doctests in the sources finished, look at the results in {{ builddir }}/doctest/output.txt."
|
|
148
|
+
|
|
149
|
+
# Check build from scratch
|
|
150
|
+
[group: 'validate']
|
|
151
|
+
checkbuild:
|
|
152
|
+
rm -rf {{ builddir }}
|
|
153
|
+
{{ sphinxbuild }} -n -q ./ {{ builddir }}
|
|
154
|
+
|
|
155
|
+
# Build redirects configuration
|
|
156
|
+
[group: 'misc']
|
|
157
|
+
redirects:
|
|
158
|
+
{{ sphinxbuild }} -b rediraffewritediff {{ allsphinxopts }} {{ builddir }}/redirects
|
|
159
|
+
@echo ""
|
|
160
|
+
@echo "Build finished. The redirects are in rediraffe_redirects."
|
|
161
|
+
|
|
162
|
+
# Show changes overview
|
|
163
|
+
[group: 'misc']
|
|
164
|
+
changes:
|
|
165
|
+
{{ sphinxbuild }} -b changes {{ allsphinxopts }} {{ builddir }}/changes
|
|
166
|
+
@echo ""
|
|
167
|
+
@echo "The overview file is in {{ builddir }}/changes."
|
|
168
|
+
|
|
169
|
+
# Watch files and rebuild on change
|
|
170
|
+
[group: 'dev']
|
|
171
|
+
watch:
|
|
172
|
+
#!/usr/bin/env bash
|
|
173
|
+
set -euo pipefail
|
|
174
|
+
if command -v entr > /dev/null; then
|
|
175
|
+
${{ watch_files }} | entr -c just html
|
|
176
|
+
else
|
|
177
|
+
just html
|
|
178
|
+
fi
|
|
179
|
+
|
|
180
|
+
# Serve documentation via Python http.server
|
|
181
|
+
[group: 'dev']
|
|
182
|
+
serve:
|
|
183
|
+
@echo '=============================================================='
|
|
184
|
+
@echo ''
|
|
185
|
+
@echo 'docs server running at http://localhost:{{ http_port }}/'
|
|
186
|
+
@echo ''
|
|
187
|
+
@echo '=============================================================='
|
|
188
|
+
python -m http.server {{ http_port }} --directory {{ builddir }}/html
|
|
189
|
+
|
|
190
|
+
# Watch and serve simultaneously
|
|
191
|
+
[group: 'dev']
|
|
192
|
+
dev:
|
|
193
|
+
#!/usr/bin/env bash
|
|
194
|
+
set -euo pipefail
|
|
195
|
+
just watch &
|
|
196
|
+
just serve
|
|
197
|
+
|
|
198
|
+
# Start sphinx-autobuild server
|
|
199
|
+
[group: 'dev']
|
|
200
|
+
start:
|
|
201
|
+
uv run sphinx-autobuild "{{ sourcedir }}" "{{ builddir }}" {{ sphinxopts }} --port {{ http_port }}
|
|
202
|
+
|
|
203
|
+
# Design mode: watch static files and disable incremental builds
|
|
204
|
+
[group: 'dev']
|
|
205
|
+
design:
|
|
206
|
+
uv run sphinx-autobuild "{{ sourcedir }}" "{{ builddir }}" {{ sphinxopts }} --port {{ http_port }} --watch "." -a
|