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.
- minethon-1.0.0/.github/assets/banner.png +0 -0
- minethon-1.0.0/.github/workflows/publish.yml +50 -0
- minethon-1.0.0/.gitignore +981 -0
- minethon-1.0.0/.idea/.gitignore +20 -0
- minethon-1.0.0/.python-version +1 -0
- minethon-1.0.0/CLAUDE.md +850 -0
- minethon-1.0.0/LICENSE +661 -0
- minethon-1.0.0/PKG-INFO +139 -0
- minethon-1.0.0/README.md +130 -0
- minethon-1.0.0/examples/01_hello_bot/README.md +20 -0
- minethon-1.0.0/examples/01_hello_bot/main.py +30 -0
- minethon-1.0.0/examples/02_goto_player/README.md +21 -0
- minethon-1.0.0/examples/02_goto_player/main.py +55 -0
- minethon-1.0.0/examples/03_drasl_auth/.env.example +4 -0
- minethon-1.0.0/examples/03_drasl_auth/README.md +38 -0
- minethon-1.0.0/examples/03_drasl_auth/main.py +41 -0
- minethon-1.0.0/pyflayer.iml +12 -0
- minethon-1.0.0/pyproject.toml +48 -0
- minethon-1.0.0/src/minethon/__init__.py +62 -0
- minethon-1.0.0/src/minethon/_bridge/__init__.py +0 -0
- minethon-1.0.0/src/minethon/_bridge/_events.py +36 -0
- minethon-1.0.0/src/minethon/_bridge/_util.py +18 -0
- minethon-1.0.0/src/minethon/_bridge/event_relay.py +402 -0
- minethon-1.0.0/src/minethon/_bridge/js/helpers.js +41 -0
- minethon-1.0.0/src/minethon/_bridge/js_bot.py +370 -0
- minethon-1.0.0/src/minethon/_bridge/marshalling.py +155 -0
- minethon-1.0.0/src/minethon/_bridge/plugin_host.py +129 -0
- minethon-1.0.0/src/minethon/_bridge/runtime.py +81 -0
- minethon-1.0.0/src/minethon/_internal/__init__.py +0 -0
- minethon-1.0.0/src/minethon/api/__init__.py +6 -0
- minethon-1.0.0/src/minethon/api/navigation.py +169 -0
- minethon-1.0.0/src/minethon/api/observe.py +180 -0
- minethon-1.0.0/src/minethon/bot.py +569 -0
- minethon-1.0.0/src/minethon/config.py +84 -0
- minethon-1.0.0/src/minethon/models/__init__.py +54 -0
- minethon-1.0.0/src/minethon/models/block.py +28 -0
- minethon-1.0.0/src/minethon/models/entity.py +43 -0
- minethon-1.0.0/src/minethon/models/errors.py +39 -0
- minethon-1.0.0/src/minethon/models/events.py +89 -0
- minethon-1.0.0/src/minethon/models/item.py +27 -0
- minethon-1.0.0/src/minethon/models/vec3.py +39 -0
- minethon-1.0.0/src/minethon/py.typed +0 -0
- minethon-1.0.0/src/minethon/raw.py +44 -0
- minethon-1.0.0/tests/__init__.py +0 -0
- minethon-1.0.0/tests/conftest.py +0 -0
- minethon-1.0.0/tests/integration/__init__.py +0 -0
- minethon-1.0.0/tests/integration/conftest.py +18 -0
- minethon-1.0.0/tests/integration/test_chat.py +41 -0
- minethon-1.0.0/tests/integration/test_connect.py +29 -0
- minethon-1.0.0/tests/integration/test_navigation.py +33 -0
- minethon-1.0.0/tests/integration/test_world.py +35 -0
- minethon-1.0.0/tests/unit/__init__.py +0 -0
- minethon-1.0.0/tests/unit/test_block.py +68 -0
- minethon-1.0.0/tests/unit/test_bot.py +370 -0
- minethon-1.0.0/tests/unit/test_bridge_events.py +49 -0
- minethon-1.0.0/tests/unit/test_config.py +94 -0
- minethon-1.0.0/tests/unit/test_entity.py +63 -0
- minethon-1.0.0/tests/unit/test_event_relay.py +338 -0
- minethon-1.0.0/tests/unit/test_events.py +110 -0
- minethon-1.0.0/tests/unit/test_item.py +66 -0
- minethon-1.0.0/tests/unit/test_marshalling.py +281 -0
- minethon-1.0.0/tests/unit/test_navigation.py +246 -0
- minethon-1.0.0/tests/unit/test_plugin_host.py +132 -0
- minethon-1.0.0/tests/unit/test_vec3.py +42 -0
- 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
|