minethon 1.0.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 (65) hide show
  1. minethon-1.0.0/.github/assets/banner.png +0 -0
  2. minethon-1.0.0/.github/workflows/publish.yml +50 -0
  3. minethon-1.0.0/.gitignore +981 -0
  4. minethon-1.0.0/.idea/.gitignore +20 -0
  5. minethon-1.0.0/.python-version +1 -0
  6. minethon-1.0.0/CLAUDE.md +850 -0
  7. minethon-1.0.0/LICENSE +661 -0
  8. minethon-1.0.0/PKG-INFO +139 -0
  9. minethon-1.0.0/README.md +130 -0
  10. minethon-1.0.0/examples/01_hello_bot/README.md +20 -0
  11. minethon-1.0.0/examples/01_hello_bot/main.py +30 -0
  12. minethon-1.0.0/examples/02_goto_player/README.md +21 -0
  13. minethon-1.0.0/examples/02_goto_player/main.py +55 -0
  14. minethon-1.0.0/examples/03_drasl_auth/.env.example +4 -0
  15. minethon-1.0.0/examples/03_drasl_auth/README.md +38 -0
  16. minethon-1.0.0/examples/03_drasl_auth/main.py +41 -0
  17. minethon-1.0.0/pyflayer.iml +12 -0
  18. minethon-1.0.0/pyproject.toml +48 -0
  19. minethon-1.0.0/src/minethon/__init__.py +62 -0
  20. minethon-1.0.0/src/minethon/_bridge/__init__.py +0 -0
  21. minethon-1.0.0/src/minethon/_bridge/_events.py +36 -0
  22. minethon-1.0.0/src/minethon/_bridge/_util.py +18 -0
  23. minethon-1.0.0/src/minethon/_bridge/event_relay.py +402 -0
  24. minethon-1.0.0/src/minethon/_bridge/js/helpers.js +41 -0
  25. minethon-1.0.0/src/minethon/_bridge/js_bot.py +370 -0
  26. minethon-1.0.0/src/minethon/_bridge/marshalling.py +155 -0
  27. minethon-1.0.0/src/minethon/_bridge/plugin_host.py +129 -0
  28. minethon-1.0.0/src/minethon/_bridge/runtime.py +81 -0
  29. minethon-1.0.0/src/minethon/_internal/__init__.py +0 -0
  30. minethon-1.0.0/src/minethon/api/__init__.py +6 -0
  31. minethon-1.0.0/src/minethon/api/navigation.py +169 -0
  32. minethon-1.0.0/src/minethon/api/observe.py +180 -0
  33. minethon-1.0.0/src/minethon/bot.py +569 -0
  34. minethon-1.0.0/src/minethon/config.py +84 -0
  35. minethon-1.0.0/src/minethon/models/__init__.py +54 -0
  36. minethon-1.0.0/src/minethon/models/block.py +28 -0
  37. minethon-1.0.0/src/minethon/models/entity.py +43 -0
  38. minethon-1.0.0/src/minethon/models/errors.py +39 -0
  39. minethon-1.0.0/src/minethon/models/events.py +89 -0
  40. minethon-1.0.0/src/minethon/models/item.py +27 -0
  41. minethon-1.0.0/src/minethon/models/vec3.py +39 -0
  42. minethon-1.0.0/src/minethon/py.typed +0 -0
  43. minethon-1.0.0/src/minethon/raw.py +44 -0
  44. minethon-1.0.0/tests/__init__.py +0 -0
  45. minethon-1.0.0/tests/conftest.py +0 -0
  46. minethon-1.0.0/tests/integration/__init__.py +0 -0
  47. minethon-1.0.0/tests/integration/conftest.py +18 -0
  48. minethon-1.0.0/tests/integration/test_chat.py +41 -0
  49. minethon-1.0.0/tests/integration/test_connect.py +29 -0
  50. minethon-1.0.0/tests/integration/test_navigation.py +33 -0
  51. minethon-1.0.0/tests/integration/test_world.py +35 -0
  52. minethon-1.0.0/tests/unit/__init__.py +0 -0
  53. minethon-1.0.0/tests/unit/test_block.py +68 -0
  54. minethon-1.0.0/tests/unit/test_bot.py +370 -0
  55. minethon-1.0.0/tests/unit/test_bridge_events.py +49 -0
  56. minethon-1.0.0/tests/unit/test_config.py +94 -0
  57. minethon-1.0.0/tests/unit/test_entity.py +63 -0
  58. minethon-1.0.0/tests/unit/test_event_relay.py +338 -0
  59. minethon-1.0.0/tests/unit/test_events.py +110 -0
  60. minethon-1.0.0/tests/unit/test_item.py +66 -0
  61. minethon-1.0.0/tests/unit/test_marshalling.py +281 -0
  62. minethon-1.0.0/tests/unit/test_navigation.py +246 -0
  63. minethon-1.0.0/tests/unit/test_plugin_host.py +132 -0
  64. minethon-1.0.0/tests/unit/test_vec3.py +42 -0
  65. minethon-1.0.0/uv.lock +223 -0
Binary file
@@ -0,0 +1,50 @@
1
+ name: Release & Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ release:
10
+ name: Release & Publish to PyPI
11
+ runs-on: ubuntu-latest
12
+ if: github.ref_type == 'tag'
13
+ environment: pypi
14
+ permissions:
15
+ id-token: write
16
+ contents: write
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Verify tag is on main
23
+ run: |
24
+ if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
25
+ echo "::error::Tag must be on the main branch"
26
+ exit 1
27
+ fi
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@v6
31
+
32
+ - name: Set up Python
33
+ uses: actions/setup-python@v5
34
+ with:
35
+ python-version: "3.14"
36
+ allow-prereleases: true
37
+
38
+ - name: Run tests
39
+ run: uv run pytest -m "not integration"
40
+
41
+ - name: Build package
42
+ run: uv build
43
+
44
+ - name: Create GitHub Release
45
+ uses: softprops/action-gh-release@v2
46
+ with:
47
+ generate_release_notes: true
48
+
49
+ - name: Publish to PyPI
50
+ uses: pypa/gh-action-pypi-publish@release/v1