litearm-python 1.2.1__tar.gz → 1.2.3__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.
- {litearm_python-1.2.1/src/litearm_python.egg-info → litearm_python-1.2.3}/PKG-INFO +7 -14
- {litearm_python-1.2.1 → litearm_python-1.2.3}/README.md +5 -12
- {litearm_python-1.2.1 → litearm_python-1.2.3}/pyproject.toml +2 -2
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/__init__.py +1 -1
- {litearm_python-1.2.1 → litearm_python-1.2.3/src/litearm_python.egg-info}/PKG-INFO +7 -14
- litearm_python-1.2.3/tests/test_package_metadata.py +48 -0
- litearm_python-1.2.1/tests/test_package_metadata.py +0 -28
- {litearm_python-1.2.1 → litearm_python-1.2.3}/LICENSE +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/setup.cfg +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/__main__.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/_protocol.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/_rot.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/arm.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/cart.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/diagnostics.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/errors.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/log.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/model.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/params.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/payload.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/py.typed +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/state.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/testing.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/tool.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm/transport.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm_python.egg-info/SOURCES.txt +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm_python.egg-info/dependency_links.txt +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm_python.egg-info/entry_points.txt +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm_python.egg-info/requires.txt +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm_python.egg-info/top_level.txt +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_ack_echo.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_arm_offline.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_banner.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_capability.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_cart_errors.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_cart_protocol.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_cart_queue.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_cart_wait.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_cli.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_dfu.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_diagnostics.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_doc_examples.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_error_codes.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_error_hierarchy.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_ff_io.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_fork_guard.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_frame_ownership.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_full_coverage.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_home.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_ik_bench.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_license.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_lifecycle.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_live.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_log.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_model.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_msg.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_offline.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_params.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_payload.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_protocol_crc.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_protocol_sync.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_public_api.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_request_and_get.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_silent_noops.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_status_layout.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_teardown.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_tool_offset.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_transport.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_transport_injection.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_transport_threadsafe.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_zero_g.py +0 -0
- {litearm_python-1.2.1 → litearm_python-1.2.3}/tests/test_zero_g_cart_guard.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: litearm-python
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
4
4
|
Summary: Python SDK for the LiteArm robotic arm
|
|
5
|
-
License:
|
|
5
|
+
License: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
@@ -17,7 +17,7 @@ Python SDK for the LiteArm robotic arm: drive the arm from a PC over one USB ser
|
|
|
17
17
|
straight to its firmware — no server or middleware in between. Trajectory planning, kinematics
|
|
18
18
|
and dynamics are all carried by the firmware.
|
|
19
19
|
|
|
20
|
-
> Full interface reference: [docs/DEVELOPER_GUIDE.md](docs/DEVELOPER_GUIDE.md).
|
|
20
|
+
> Full interface reference: [docs/DEVELOPER_GUIDE.md](https://github.com/nexform-tech/litearm-python/blob/main/docs/DEVELOPER_GUIDE.md).
|
|
21
21
|
|
|
22
22
|
## Features
|
|
23
23
|
|
|
@@ -225,7 +225,7 @@ payload is composited in as a point mass), so nothing on the PC side needs a dyn
|
|
|
225
225
|
nothing new is pulled in as a dependency. The **baseline is not optional**: subtracting it is what
|
|
226
226
|
cancels the arm's own model error — an absolute solve feeds that error straight into the answer.
|
|
227
227
|
The probe's side effects and the acceptance thresholds are in §5.16 of
|
|
228
|
-
[the developer guide](docs/DEVELOPER_GUIDE.md).
|
|
228
|
+
[the developer guide](https://github.com/nexform-tech/litearm-python/blob/main/docs/DEVELOPER_GUIDE.md).
|
|
229
229
|
|
|
230
230
|
### Life / safety
|
|
231
231
|
|
|
@@ -297,13 +297,6 @@ for s in r.samples()[:3]:
|
|
|
297
297
|
print(arm.diag.kin_bench().value) # CAN link diagnostic counters
|
|
298
298
|
```
|
|
299
299
|
|
|
300
|
-
### License and activation
|
|
301
|
-
|
|
302
|
-
An arm that has never been activated rejects `enable()` with `ERR{0x10,0x08}` and answers every
|
|
303
|
-
other command normally, so it stays diagnosable. `arm.license()` reads the record — a bare
|
|
304
|
-
`LicenseInfo`, not a `Msg`; `arm.activate()` submits a vendor-issued credential and needs
|
|
305
|
-
`disable()` first. See [the developer guide §5.15](docs/DEVELOPER_GUIDE.md#515-license-and-activation).
|
|
306
|
-
|
|
307
300
|
### Persistence
|
|
308
301
|
|
|
309
302
|
```python
|
|
@@ -344,7 +337,7 @@ or add `~/.local/bin` to `PATH`.
|
|
|
344
337
|
|
|
345
338
|
## Things to watch out for
|
|
346
339
|
|
|
347
|
-
Start with the [troubleshooting guide](TROUBLESHOOTING.md): it has ready-made commands for
|
|
340
|
+
Start with the [troubleshooting guide](https://github.com/nexform-tech/litearm-python/blob/main/TROUBLESHOOTING.md): it has ready-made commands for
|
|
348
341
|
finding who holds the serial port, what to do about each `enable()` rejection code, and how to
|
|
349
342
|
tell Cartesian failures apart.
|
|
350
343
|
|
|
@@ -452,7 +445,7 @@ the motor bus.
|
|
|
452
445
|
|
|
453
446
|
## Examples
|
|
454
447
|
|
|
455
|
-
See [examples/README.md](examples/README.md):
|
|
448
|
+
See [examples/README.md](https://github.com/nexform-tech/litearm-python/blob/main/examples/README.md):
|
|
456
449
|
|
|
457
450
|
- `01_hello.py` — handshake + firmware version + reading state
|
|
458
451
|
- `02_movej.py` — joint motion
|
|
@@ -505,4 +498,4 @@ On Windows use `env.ps1` / `env.cmd` and `run_example.ps1` / `run_example.cmd`.
|
|
|
505
498
|
|
|
506
499
|
## License
|
|
507
500
|
|
|
508
|
-
|
|
501
|
+
Apache License 2.0 — see [LICENSE](https://github.com/nexform-tech/litearm-python/blob/main/LICENSE).
|
|
@@ -4,7 +4,7 @@ Python SDK for the LiteArm robotic arm: drive the arm from a PC over one USB ser
|
|
|
4
4
|
straight to its firmware — no server or middleware in between. Trajectory planning, kinematics
|
|
5
5
|
and dynamics are all carried by the firmware.
|
|
6
6
|
|
|
7
|
-
> Full interface reference: [docs/DEVELOPER_GUIDE.md](docs/DEVELOPER_GUIDE.md).
|
|
7
|
+
> Full interface reference: [docs/DEVELOPER_GUIDE.md](https://github.com/nexform-tech/litearm-python/blob/main/docs/DEVELOPER_GUIDE.md).
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
@@ -212,7 +212,7 @@ payload is composited in as a point mass), so nothing on the PC side needs a dyn
|
|
|
212
212
|
nothing new is pulled in as a dependency. The **baseline is not optional**: subtracting it is what
|
|
213
213
|
cancels the arm's own model error — an absolute solve feeds that error straight into the answer.
|
|
214
214
|
The probe's side effects and the acceptance thresholds are in §5.16 of
|
|
215
|
-
[the developer guide](docs/DEVELOPER_GUIDE.md).
|
|
215
|
+
[the developer guide](https://github.com/nexform-tech/litearm-python/blob/main/docs/DEVELOPER_GUIDE.md).
|
|
216
216
|
|
|
217
217
|
### Life / safety
|
|
218
218
|
|
|
@@ -284,13 +284,6 @@ for s in r.samples()[:3]:
|
|
|
284
284
|
print(arm.diag.kin_bench().value) # CAN link diagnostic counters
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
### License and activation
|
|
288
|
-
|
|
289
|
-
An arm that has never been activated rejects `enable()` with `ERR{0x10,0x08}` and answers every
|
|
290
|
-
other command normally, so it stays diagnosable. `arm.license()` reads the record — a bare
|
|
291
|
-
`LicenseInfo`, not a `Msg`; `arm.activate()` submits a vendor-issued credential and needs
|
|
292
|
-
`disable()` first. See [the developer guide §5.15](docs/DEVELOPER_GUIDE.md#515-license-and-activation).
|
|
293
|
-
|
|
294
287
|
### Persistence
|
|
295
288
|
|
|
296
289
|
```python
|
|
@@ -331,7 +324,7 @@ or add `~/.local/bin` to `PATH`.
|
|
|
331
324
|
|
|
332
325
|
## Things to watch out for
|
|
333
326
|
|
|
334
|
-
Start with the [troubleshooting guide](TROUBLESHOOTING.md): it has ready-made commands for
|
|
327
|
+
Start with the [troubleshooting guide](https://github.com/nexform-tech/litearm-python/blob/main/TROUBLESHOOTING.md): it has ready-made commands for
|
|
335
328
|
finding who holds the serial port, what to do about each `enable()` rejection code, and how to
|
|
336
329
|
tell Cartesian failures apart.
|
|
337
330
|
|
|
@@ -439,7 +432,7 @@ the motor bus.
|
|
|
439
432
|
|
|
440
433
|
## Examples
|
|
441
434
|
|
|
442
|
-
See [examples/README.md](examples/README.md):
|
|
435
|
+
See [examples/README.md](https://github.com/nexform-tech/litearm-python/blob/main/examples/README.md):
|
|
443
436
|
|
|
444
437
|
- `01_hello.py` — handshake + firmware version + reading state
|
|
445
438
|
- `02_movej.py` — joint motion
|
|
@@ -492,4 +485,4 @@ On Windows use `env.ps1` / `env.cmd` and `run_example.ps1` / `run_example.cmd`.
|
|
|
492
485
|
|
|
493
486
|
## License
|
|
494
487
|
|
|
495
|
-
|
|
488
|
+
Apache License 2.0 — see [LICENSE](https://github.com/nexform-tech/litearm-python/blob/main/LICENSE).
|
|
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "litearm-python"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.3"
|
|
8
8
|
description = "Python SDK for the LiteArm robotic arm"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
|
-
license = { text = "
|
|
11
|
+
license = { text = "Apache-2.0" }
|
|
12
12
|
dependencies = ["pyserial>=3.4"]
|
|
13
13
|
|
|
14
14
|
[project.optional-dependencies]
|
|
@@ -92,7 +92,7 @@ from litearm.state import JointState, RobotState
|
|
|
92
92
|
from litearm.tool import TcpOffset
|
|
93
93
|
from litearm.transport import find_cdc_port
|
|
94
94
|
|
|
95
|
-
__version__ = "1.2.
|
|
95
|
+
__version__ = "1.2.3"
|
|
96
96
|
|
|
97
97
|
__all__ = [
|
|
98
98
|
"Arm", "Msg", "LicenseInfo", "RobotState", "JointState", "find_cdc_port", "main",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: litearm-python
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
4
4
|
Summary: Python SDK for the LiteArm robotic arm
|
|
5
|
-
License:
|
|
5
|
+
License: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
@@ -17,7 +17,7 @@ Python SDK for the LiteArm robotic arm: drive the arm from a PC over one USB ser
|
|
|
17
17
|
straight to its firmware — no server or middleware in between. Trajectory planning, kinematics
|
|
18
18
|
and dynamics are all carried by the firmware.
|
|
19
19
|
|
|
20
|
-
> Full interface reference: [docs/DEVELOPER_GUIDE.md](docs/DEVELOPER_GUIDE.md).
|
|
20
|
+
> Full interface reference: [docs/DEVELOPER_GUIDE.md](https://github.com/nexform-tech/litearm-python/blob/main/docs/DEVELOPER_GUIDE.md).
|
|
21
21
|
|
|
22
22
|
## Features
|
|
23
23
|
|
|
@@ -225,7 +225,7 @@ payload is composited in as a point mass), so nothing on the PC side needs a dyn
|
|
|
225
225
|
nothing new is pulled in as a dependency. The **baseline is not optional**: subtracting it is what
|
|
226
226
|
cancels the arm's own model error — an absolute solve feeds that error straight into the answer.
|
|
227
227
|
The probe's side effects and the acceptance thresholds are in §5.16 of
|
|
228
|
-
[the developer guide](docs/DEVELOPER_GUIDE.md).
|
|
228
|
+
[the developer guide](https://github.com/nexform-tech/litearm-python/blob/main/docs/DEVELOPER_GUIDE.md).
|
|
229
229
|
|
|
230
230
|
### Life / safety
|
|
231
231
|
|
|
@@ -297,13 +297,6 @@ for s in r.samples()[:3]:
|
|
|
297
297
|
print(arm.diag.kin_bench().value) # CAN link diagnostic counters
|
|
298
298
|
```
|
|
299
299
|
|
|
300
|
-
### License and activation
|
|
301
|
-
|
|
302
|
-
An arm that has never been activated rejects `enable()` with `ERR{0x10,0x08}` and answers every
|
|
303
|
-
other command normally, so it stays diagnosable. `arm.license()` reads the record — a bare
|
|
304
|
-
`LicenseInfo`, not a `Msg`; `arm.activate()` submits a vendor-issued credential and needs
|
|
305
|
-
`disable()` first. See [the developer guide §5.15](docs/DEVELOPER_GUIDE.md#515-license-and-activation).
|
|
306
|
-
|
|
307
300
|
### Persistence
|
|
308
301
|
|
|
309
302
|
```python
|
|
@@ -344,7 +337,7 @@ or add `~/.local/bin` to `PATH`.
|
|
|
344
337
|
|
|
345
338
|
## Things to watch out for
|
|
346
339
|
|
|
347
|
-
Start with the [troubleshooting guide](TROUBLESHOOTING.md): it has ready-made commands for
|
|
340
|
+
Start with the [troubleshooting guide](https://github.com/nexform-tech/litearm-python/blob/main/TROUBLESHOOTING.md): it has ready-made commands for
|
|
348
341
|
finding who holds the serial port, what to do about each `enable()` rejection code, and how to
|
|
349
342
|
tell Cartesian failures apart.
|
|
350
343
|
|
|
@@ -452,7 +445,7 @@ the motor bus.
|
|
|
452
445
|
|
|
453
446
|
## Examples
|
|
454
447
|
|
|
455
|
-
See [examples/README.md](examples/README.md):
|
|
448
|
+
See [examples/README.md](https://github.com/nexform-tech/litearm-python/blob/main/examples/README.md):
|
|
456
449
|
|
|
457
450
|
- `01_hello.py` — handshake + firmware version + reading state
|
|
458
451
|
- `02_movej.py` — joint motion
|
|
@@ -505,4 +498,4 @@ On Windows use `env.ps1` / `env.cmd` and `run_example.ps1` / `run_example.cmd`.
|
|
|
505
498
|
|
|
506
499
|
## License
|
|
507
500
|
|
|
508
|
-
|
|
501
|
+
Apache License 2.0 — see [LICENSE](https://github.com/nexform-tech/litearm-python/blob/main/LICENSE).
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Packaging metadata —— PyPI 的副标题和许可证都取自 `pyproject.toml`。
|
|
2
|
+
|
|
3
|
+
副标题 (`[project].description`) 会直接出现在 PyPI 项目页和搜索结果里, 所以它
|
|
4
|
+
必须是英文。许可证 (`[project].license`) 则必须与仓库根目录的 `LICENSE` 一致:
|
|
5
|
+
GitHub 只扫 `LICENSE` 文件, PyPI 只读包元数据, 两处不一致时两个平台会显示不同
|
|
6
|
+
的许可证。这两条用例把上述约束变成可检查的门禁。
|
|
7
|
+
"""
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import re
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
PYPROJECT = Path(__file__).resolve().parents[1] / "pyproject.toml"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _project_description() -> str:
|
|
17
|
+
text = PYPROJECT.read_text(encoding="utf-8")
|
|
18
|
+
match = re.search(r'^description\s*=\s*"([^"]*)"\s*$', text, re.MULTILINE)
|
|
19
|
+
assert match is not None, "pyproject.toml has no [project].description"
|
|
20
|
+
return match.group(1)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _project_license() -> str:
|
|
24
|
+
text = PYPROJECT.read_text(encoding="utf-8")
|
|
25
|
+
match = re.search(
|
|
26
|
+
r'^license\s*=\s*\{\s*text\s*=\s*"([^"]+)"\s*\}\s*$', text, re.MULTILINE
|
|
27
|
+
)
|
|
28
|
+
assert match is not None, "pyproject.toml has no [project].license"
|
|
29
|
+
return match.group(1)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def test_pypi_subtitle_is_english():
|
|
33
|
+
"""PyPI 副标题 (Summary) 必须是英文, 不能是中文。"""
|
|
34
|
+
description = _project_description()
|
|
35
|
+
assert description, "[project].description must not be empty"
|
|
36
|
+
assert description.isascii(), (
|
|
37
|
+
"PyPI shows [project].description as the project subtitle; "
|
|
38
|
+
f"write it in English: {description!r}"
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def test_license_metadata_matches_the_license_file():
|
|
43
|
+
"""PyPI 读 pyproject 的 license 字段, GitHub 扫 LICENSE 文件, 两边必须一致。"""
|
|
44
|
+
declared = _project_license()
|
|
45
|
+
license_file = (PYPROJECT.parent / "LICENSE").read_text(encoding="utf-8")
|
|
46
|
+
assert declared == "Apache-2.0"
|
|
47
|
+
assert "Apache License" in license_file
|
|
48
|
+
assert "Version 2.0" in license_file
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"""Packaging metadata —— PyPI 把 `[project].description` 当作项目副标题展示。
|
|
2
|
-
|
|
3
|
-
副标题会直接出现在 PyPI 项目页和搜索结果里, 所以它必须是英文; 这条用例把
|
|
4
|
-
"别再把中文写回 description" 变成可检查的门禁。
|
|
5
|
-
"""
|
|
6
|
-
from __future__ import annotations
|
|
7
|
-
|
|
8
|
-
import re
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
|
|
11
|
-
PYPROJECT = Path(__file__).resolve().parents[1] / "pyproject.toml"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def _project_description() -> str:
|
|
15
|
-
text = PYPROJECT.read_text(encoding="utf-8")
|
|
16
|
-
match = re.search(r'^description\s*=\s*"([^"]*)"\s*$', text, re.MULTILINE)
|
|
17
|
-
assert match is not None, "pyproject.toml has no [project].description"
|
|
18
|
-
return match.group(1)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def test_pypi_subtitle_is_english():
|
|
22
|
-
"""PyPI 副标题 (Summary) 必须是英文, 不能是中文。"""
|
|
23
|
-
description = _project_description()
|
|
24
|
-
assert description, "[project].description must not be empty"
|
|
25
|
-
assert description.isascii(), (
|
|
26
|
-
"PyPI shows [project].description as the project subtitle; "
|
|
27
|
-
f"write it in English: {description!r}"
|
|
28
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{litearm_python-1.2.1 → litearm_python-1.2.3}/src/litearm_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|