minethon 0.1.0a1__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-0.1.0a1/.github/assets/banner.png +0 -0
- minethon-0.1.0a1/.github/workflows/ci.yml +69 -0
- minethon-0.1.0a1/.github/workflows/publish.yml +49 -0
- minethon-0.1.0a1/.gitignore +981 -0
- minethon-0.1.0a1/.idea/.gitignore +20 -0
- minethon-0.1.0a1/.python-version +1 -0
- minethon-0.1.0a1/AGENTS.md +123 -0
- minethon-0.1.0a1/CLAUDE.md +5 -0
- minethon-0.1.0a1/LICENSE +661 -0
- minethon-0.1.0a1/PKG-INFO +145 -0
- minethon-0.1.0a1/README.md +136 -0
- minethon-0.1.0a1/examples/01_hello_bot/README.md +20 -0
- minethon-0.1.0a1/examples/01_hello_bot/main.py +30 -0
- minethon-0.1.0a1/examples/02_goto_player/README.md +21 -0
- minethon-0.1.0a1/examples/02_goto_player/main.py +55 -0
- minethon-0.1.0a1/examples/03_drasl_auth/.env.example +5 -0
- minethon-0.1.0a1/examples/03_drasl_auth/README.md +38 -0
- minethon-0.1.0a1/examples/03_drasl_auth/main.py +41 -0
- minethon-0.1.0a1/minethon.iml +13 -0
- minethon-0.1.0a1/pyproject.toml +124 -0
- minethon-0.1.0a1/src/minethon/__init__.py +78 -0
- minethon-0.1.0a1/src/minethon/_bridge/__init__.py +0 -0
- minethon-0.1.0a1/src/minethon/_bridge/_events.py +312 -0
- minethon-0.1.0a1/src/minethon/_bridge/_util.py +18 -0
- minethon-0.1.0a1/src/minethon/_bridge/event_relay.py +2085 -0
- minethon-0.1.0a1/src/minethon/_bridge/js/helpers.js +355 -0
- minethon-0.1.0a1/src/minethon/_bridge/js_bot.py +1377 -0
- minethon-0.1.0a1/src/minethon/_bridge/marshalling.py +218 -0
- minethon-0.1.0a1/src/minethon/_bridge/plugin_host.py +141 -0
- minethon-0.1.0a1/src/minethon/_bridge/runtime.py +81 -0
- minethon-0.1.0a1/src/minethon/_internal/__init__.py +0 -0
- minethon-0.1.0a1/src/minethon/api/__init__.py +7 -0
- minethon-0.1.0a1/src/minethon/api/navigation.py +156 -0
- minethon-0.1.0a1/src/minethon/api/observe.py +138 -0
- minethon-0.1.0a1/src/minethon/api/plugins.py +45 -0
- minethon-0.1.0a1/src/minethon/bot.py +2305 -0
- minethon-0.1.0a1/src/minethon/config.py +82 -0
- minethon-0.1.0a1/src/minethon/models/__init__.py +240 -0
- minethon-0.1.0a1/src/minethon/models/block.py +30 -0
- minethon-0.1.0a1/src/minethon/models/entity.py +44 -0
- minethon-0.1.0a1/src/minethon/models/errors.py +39 -0
- minethon-0.1.0a1/src/minethon/models/events.py +843 -0
- minethon-0.1.0a1/src/minethon/models/experience.py +18 -0
- minethon-0.1.0a1/src/minethon/models/game_state.py +31 -0
- minethon-0.1.0a1/src/minethon/models/item.py +27 -0
- minethon-0.1.0a1/src/minethon/models/player_info.py +23 -0
- minethon-0.1.0a1/src/minethon/models/recipe.py +24 -0
- minethon-0.1.0a1/src/minethon/models/time_state.py +24 -0
- minethon-0.1.0a1/src/minethon/models/vec3.py +37 -0
- minethon-0.1.0a1/src/minethon/models/window.py +49 -0
- minethon-0.1.0a1/src/minethon/py.typed +0 -0
- minethon-0.1.0a1/src/minethon/raw.py +75 -0
- minethon-0.1.0a1/tests/__init__.py +0 -0
- minethon-0.1.0a1/tests/conftest.py +0 -0
- minethon-0.1.0a1/tests/integration/__init__.py +0 -0
- minethon-0.1.0a1/tests/integration/conftest.py +18 -0
- minethon-0.1.0a1/tests/integration/test_chat.py +41 -0
- minethon-0.1.0a1/tests/integration/test_connect.py +29 -0
- minethon-0.1.0a1/tests/integration/test_navigation.py +33 -0
- minethon-0.1.0a1/tests/integration/test_world.py +35 -0
- minethon-0.1.0a1/tests/unit/__init__.py +0 -0
- minethon-0.1.0a1/tests/unit/test_block.py +69 -0
- minethon-0.1.0a1/tests/unit/test_bot.py +376 -0
- minethon-0.1.0a1/tests/unit/test_bridge_events.py +49 -0
- minethon-0.1.0a1/tests/unit/test_config.py +95 -0
- minethon-0.1.0a1/tests/unit/test_entity.py +64 -0
- minethon-0.1.0a1/tests/unit/test_event_relay.py +690 -0
- minethon-0.1.0a1/tests/unit/test_events.py +111 -0
- minethon-0.1.0a1/tests/unit/test_item.py +67 -0
- minethon-0.1.0a1/tests/unit/test_marshalling.py +281 -0
- minethon-0.1.0a1/tests/unit/test_navigation.py +246 -0
- minethon-0.1.0a1/tests/unit/test_plugin_host.py +132 -0
- minethon-0.1.0a1/tests/unit/test_plugins_api.py +40 -0
- minethon-0.1.0a1/tests/unit/test_vec3.py +43 -0
- minethon-0.1.0a1/uv.lock +223 -0
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main, dev]
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: Tests
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v6
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.14"
|
|
27
|
+
allow-prereleases: true
|
|
28
|
+
|
|
29
|
+
- name: Run unit tests
|
|
30
|
+
run: uv run pytest -m "not integration" --tb=short -q
|
|
31
|
+
|
|
32
|
+
lint:
|
|
33
|
+
name: Lint
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
|
|
38
|
+
- name: Install uv
|
|
39
|
+
uses: astral-sh/setup-uv@v6
|
|
40
|
+
|
|
41
|
+
- name: Set up Python
|
|
42
|
+
uses: actions/setup-python@v5
|
|
43
|
+
with:
|
|
44
|
+
python-version: "3.14"
|
|
45
|
+
allow-prereleases: true
|
|
46
|
+
|
|
47
|
+
- name: Check formatting
|
|
48
|
+
run: uv run ruff format --check src/ tests/
|
|
49
|
+
|
|
50
|
+
- name: Check lint
|
|
51
|
+
run: uv run ruff check src/
|
|
52
|
+
|
|
53
|
+
type-check:
|
|
54
|
+
name: Type Check
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
|
|
59
|
+
- name: Install uv
|
|
60
|
+
uses: astral-sh/setup-uv@v6
|
|
61
|
+
|
|
62
|
+
- name: Set up Python
|
|
63
|
+
uses: actions/setup-python@v5
|
|
64
|
+
with:
|
|
65
|
+
python-version: "3.14"
|
|
66
|
+
allow-prereleases: true
|
|
67
|
+
|
|
68
|
+
- name: Run pyright
|
|
69
|
+
run: uv run pyright src/
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
environment: pypi
|
|
13
|
+
permissions:
|
|
14
|
+
id-token: write
|
|
15
|
+
contents: write
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Verify tag is on main
|
|
22
|
+
run: |
|
|
23
|
+
if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
|
|
24
|
+
echo "::error::Tag must be on the main branch"
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
- name: Install uv
|
|
29
|
+
uses: astral-sh/setup-uv@v6
|
|
30
|
+
|
|
31
|
+
- name: Set up Python
|
|
32
|
+
uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.14"
|
|
35
|
+
allow-prereleases: true
|
|
36
|
+
|
|
37
|
+
- name: Run tests
|
|
38
|
+
run: uv run pytest -m "not integration"
|
|
39
|
+
|
|
40
|
+
- name: Build package
|
|
41
|
+
run: uv build
|
|
42
|
+
|
|
43
|
+
- name: Publish to PyPI
|
|
44
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
45
|
+
|
|
46
|
+
- name: Create GitHub Release
|
|
47
|
+
uses: softprops/action-gh-release@v2
|
|
48
|
+
with:
|
|
49
|
+
generate_release_notes: true
|