pythonhere 0.2.0__tar.gz → 0.2.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.
- {pythonhere-0.2.0/pythonhere.egg-info → pythonhere-0.2.1}/PKG-INFO +6 -3
- {pythonhere-0.2.0 → pythonhere-0.2.1}/README.rst +4 -1
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pyproject.toml +2 -2
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/android_here.py +13 -6
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/server_here.py +1 -1
- pythonhere-0.2.1/pythonhere/version_here.py +1 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1/pythonhere.egg-info}/PKG-INFO +6 -3
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere.egg-info/requires.txt +1 -1
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_magic.py +8 -8
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_server_here.py +1 -1
- pythonhere-0.2.0/pythonhere/version_here.py +0 -1
- {pythonhere-0.2.0 → pythonhere-0.2.1}/LICENSE +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/__init__.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/data/logo/logo-128.png +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/data/logo/logo-32.png +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/data/logo/logo-splash.png +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/enum_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/exception_manager_here.kv +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/exception_manager_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/launcher_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/magic_here/__init__.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/magic_here/shortcuts.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/main.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/network_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/patches_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/pythonhere.kv +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/__init__.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/actionbar_here.kv +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/common_here.kv +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/connection_address_here.kv +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/connection_address_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/layout_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/server_screen_here.kv +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/server_screen_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/settings_here.kv +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/ui_here/settings_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere/window_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere.egg-info/SOURCES.txt +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere.egg-info/dependency_links.txt +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/pythonhere.egg-info/top_level.txt +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/setup.cfg +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/setup.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_android_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_exception_manager_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_launcher_here.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_main.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_network.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_patches.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_settings.py +0 -0
- {pythonhere-0.2.0 → pythonhere-0.2.1}/tests/test_window_here.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pythonhere
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Here is the Kivy based app to run code from the Jupyter magic %there
|
|
5
5
|
Author-email: b3b <ash.b3b@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/x-rst
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: herethere[magic]>=0.1
|
|
19
|
+
Requires-Dist: herethere[magic]>=0.2.1
|
|
20
20
|
Requires-Dist: ipython
|
|
21
21
|
Requires-Dist: ipywidgets
|
|
22
22
|
Requires-Dist: Pillow
|
|
@@ -40,7 +40,7 @@ PythonHere
|
|
|
40
40
|
:alt: Supported Python versions
|
|
41
41
|
.. image:: https://github.com/b3b/pythonhere/actions/workflows/tests.yml/badge.svg?branch=master
|
|
42
42
|
:target: https://github.com/b3b/pythonhere/actions/workflows/tests.yml?query=branch%3Amaster
|
|
43
|
-
:alt: CI Status
|
|
43
|
+
:alt: CI Status
|
|
44
44
|
.. image:: https://codecov.io/github/b3b/pythonhere/coverage.svg?branch=master
|
|
45
45
|
:target: https://codecov.io/github/b3b/pythonhere?branch=master
|
|
46
46
|
:alt: Code coverage Status
|
|
@@ -68,6 +68,9 @@ Project documentation: https://herethere.me/pythonhere
|
|
|
68
68
|
Install the Android app
|
|
69
69
|
-----------------------
|
|
70
70
|
|
|
71
|
+
Install *PythonHere* with `Obtainium <https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://github.com/b3b/pythonhere>`_
|
|
72
|
+
to receive updates from GitHub Releases.
|
|
73
|
+
|
|
71
74
|
Ready-to-use *PythonHere* APKs are available from the `GitHub Releases <https://github.com/b3b/pythonhere/releases>`_ page.
|
|
72
75
|
|
|
73
76
|
For APK provenance and signing checks, see `Android APK verification <https://github.com/b3b/pythonhere/blob/master/docs/android-apk-verification.rst>`_.
|
|
@@ -16,7 +16,7 @@ PythonHere
|
|
|
16
16
|
:alt: Supported Python versions
|
|
17
17
|
.. image:: https://github.com/b3b/pythonhere/actions/workflows/tests.yml/badge.svg?branch=master
|
|
18
18
|
:target: https://github.com/b3b/pythonhere/actions/workflows/tests.yml?query=branch%3Amaster
|
|
19
|
-
:alt: CI Status
|
|
19
|
+
:alt: CI Status
|
|
20
20
|
.. image:: https://codecov.io/github/b3b/pythonhere/coverage.svg?branch=master
|
|
21
21
|
:target: https://codecov.io/github/b3b/pythonhere?branch=master
|
|
22
22
|
:alt: Code coverage Status
|
|
@@ -44,6 +44,9 @@ Project documentation: https://herethere.me/pythonhere
|
|
|
44
44
|
Install the Android app
|
|
45
45
|
-----------------------
|
|
46
46
|
|
|
47
|
+
Install *PythonHere* with `Obtainium <https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://github.com/b3b/pythonhere>`_
|
|
48
|
+
to receive updates from GitHub Releases.
|
|
49
|
+
|
|
47
50
|
Ready-to-use *PythonHere* APKs are available from the `GitHub Releases <https://github.com/b3b/pythonhere/releases>`_ page.
|
|
48
51
|
|
|
49
52
|
For APK provenance and signing checks, see `Android APK verification <https://github.com/b3b/pythonhere/blob/master/docs/android-apk-verification.rst>`_.
|
|
@@ -22,7 +22,7 @@ classifiers = [
|
|
|
22
22
|
"Programming Language :: Python :: 3.14",
|
|
23
23
|
]
|
|
24
24
|
dependencies = [
|
|
25
|
-
"herethere[magic]>=0.1
|
|
25
|
+
"herethere[magic]>=0.2.1",
|
|
26
26
|
"ipython",
|
|
27
27
|
"ipywidgets",
|
|
28
28
|
"Pillow",
|
|
@@ -36,7 +36,6 @@ dev = [
|
|
|
36
36
|
"docutils",
|
|
37
37
|
"ifaddr",
|
|
38
38
|
"kivy==2.3.1",
|
|
39
|
-
"nest-asyncio2==1.7.2",
|
|
40
39
|
"pylint",
|
|
41
40
|
"pytest",
|
|
42
41
|
"pytest-asyncio",
|
|
@@ -60,6 +59,7 @@ environments = [
|
|
|
60
59
|
|
|
61
60
|
[tool.pytest.ini_options]
|
|
62
61
|
asyncio_mode = "auto"
|
|
62
|
+
pythonpath = ["pythonhere"]
|
|
63
63
|
|
|
64
64
|
[tool.setuptools]
|
|
65
65
|
packages = [
|
|
@@ -22,7 +22,7 @@ def get_current_intent() -> Intent:
|
|
|
22
22
|
return PythonActivity.mActivity.getIntent()
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
def get_startup_script(intent: None = None) -> str | None:
|
|
25
|
+
def get_startup_script(intent: Intent | None = None) -> str | None:
|
|
26
26
|
"""Return script entrypoint that was passed to a given, or current, intent."""
|
|
27
27
|
if not intent:
|
|
28
28
|
intent = get_current_intent()
|
|
@@ -35,8 +35,7 @@ def restart_app(script: str = None):
|
|
|
35
35
|
Logger.info("PythonHere: restart requested with a script: %s", script)
|
|
36
36
|
activity = PythonActivity.mActivity
|
|
37
37
|
intent = Intent(activity.getApplicationContext(), PythonActivity)
|
|
38
|
-
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
39
|
-
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
|
38
|
+
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
|
40
39
|
|
|
41
40
|
if script:
|
|
42
41
|
intent.setData(Uri.parse(script))
|
|
@@ -59,11 +58,17 @@ def bind_run_script_on_new_intent():
|
|
|
59
58
|
|
|
60
59
|
|
|
61
60
|
def create_shortcut_icon() -> Icon:
|
|
62
|
-
"""Create icon to use for a
|
|
61
|
+
"""Create icon to use for a shortcut."""
|
|
63
62
|
activity = PythonActivity.mActivity
|
|
64
|
-
Drawable = autoclass(f"{activity.getPackageName()}.R$drawable")
|
|
65
63
|
context = cast("android.content.Context", activity.getApplicationContext())
|
|
66
|
-
|
|
64
|
+
|
|
65
|
+
app_info = context.getApplicationInfo()
|
|
66
|
+
icon_res_id = app_info.icon
|
|
67
|
+
|
|
68
|
+
if not icon_res_id:
|
|
69
|
+
raise RuntimeError("Application icon resource id was not found")
|
|
70
|
+
|
|
71
|
+
return Icon.createWithResource(context, icon_res_id)
|
|
67
72
|
|
|
68
73
|
|
|
69
74
|
def resolve_script_path(script: str) -> str:
|
|
@@ -97,4 +102,6 @@ def pin_shortcut(script: str, label: str):
|
|
|
97
102
|
)
|
|
98
103
|
|
|
99
104
|
manager = activity.getSystemService(Context.SHORTCUT_SERVICE)
|
|
105
|
+
if not manager.isRequestPinShortcutSupported():
|
|
106
|
+
raise RuntimeError("Pinned shortcuts are not supported by this launcher")
|
|
100
107
|
manager.requestPinShortcut(shortcut, None)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pythonhere
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Here is the Kivy based app to run code from the Jupyter magic %there
|
|
5
5
|
Author-email: b3b <ash.b3b@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/x-rst
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: herethere[magic]>=0.1
|
|
19
|
+
Requires-Dist: herethere[magic]>=0.2.1
|
|
20
20
|
Requires-Dist: ipython
|
|
21
21
|
Requires-Dist: ipywidgets
|
|
22
22
|
Requires-Dist: Pillow
|
|
@@ -40,7 +40,7 @@ PythonHere
|
|
|
40
40
|
:alt: Supported Python versions
|
|
41
41
|
.. image:: https://github.com/b3b/pythonhere/actions/workflows/tests.yml/badge.svg?branch=master
|
|
42
42
|
:target: https://github.com/b3b/pythonhere/actions/workflows/tests.yml?query=branch%3Amaster
|
|
43
|
-
:alt: CI Status
|
|
43
|
+
:alt: CI Status
|
|
44
44
|
.. image:: https://codecov.io/github/b3b/pythonhere/coverage.svg?branch=master
|
|
45
45
|
:target: https://codecov.io/github/b3b/pythonhere?branch=master
|
|
46
46
|
:alt: Code coverage Status
|
|
@@ -68,6 +68,9 @@ Project documentation: https://herethere.me/pythonhere
|
|
|
68
68
|
Install the Android app
|
|
69
69
|
-----------------------
|
|
70
70
|
|
|
71
|
+
Install *PythonHere* with `Obtainium <https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://github.com/b3b/pythonhere>`_
|
|
72
|
+
to receive updates from GitHub Releases.
|
|
73
|
+
|
|
71
74
|
Ready-to-use *PythonHere* APKs are available from the `GitHub Releases <https://github.com/b3b/pythonhere/releases>`_ page.
|
|
72
75
|
|
|
73
76
|
For APK provenance and signing checks, see `Android APK verification <https://github.com/b3b/pythonhere/blob/master/docs/android-apk-verification.rst>`_.
|
|
@@ -10,7 +10,7 @@ from magic_here import shortcuts # noqa
|
|
|
10
10
|
async def test_kv_command_runcode_called(call_there_group, mocker):
|
|
11
11
|
runcode = mocker.patch.object(ContextObject, "runcode", autospec=True)
|
|
12
12
|
|
|
13
|
-
call_there_group(["kv"], "Label:")
|
|
13
|
+
await call_there_group(["kv"], "Label:")
|
|
14
14
|
|
|
15
15
|
runcode.assert_called_once()
|
|
16
16
|
ctx_obj = runcode.call_args[0][0]
|
|
@@ -20,7 +20,7 @@ async def test_kv_command_runcode_called(call_there_group, mocker):
|
|
|
20
20
|
@pytest.mark.asyncio
|
|
21
21
|
async def test_kv_command_executed(capfd, app_instance, call_there_group):
|
|
22
22
|
assert not getattr(app_instance.root, "text", "")
|
|
23
|
-
call_there_group(["kv"], "Label:\n text: '''Hello there'''")
|
|
23
|
+
await call_there_group(["kv"], "Label:\n text: '''Hello there'''")
|
|
24
24
|
captured = capfd.readouterr()
|
|
25
25
|
assert not captured.out and not captured.err
|
|
26
26
|
assert app_instance.root.text == "Hello there"
|
|
@@ -28,14 +28,14 @@ async def test_kv_command_executed(capfd, app_instance, call_there_group):
|
|
|
28
28
|
|
|
29
29
|
@pytest.mark.asyncio
|
|
30
30
|
async def test_screenshot_command_executed(app_instance, call_there_group):
|
|
31
|
-
call_there_group(["screenshot"], "")
|
|
31
|
+
await call_there_group(["screenshot"], "")
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
@pytest.mark.asyncio
|
|
35
35
|
async def test_screenshot_saved_to_file(tmpdir, app_instance, call_there_group):
|
|
36
36
|
output = Path(tmpdir) / "test.png"
|
|
37
37
|
assert not os.path.exists(output)
|
|
38
|
-
call_there_group(["screenshot", "-o", output], "")
|
|
38
|
+
await call_there_group(["screenshot", "-o", output], "")
|
|
39
39
|
assert os.path.exists(output)
|
|
40
40
|
|
|
41
41
|
|
|
@@ -43,10 +43,10 @@ async def test_screenshot_saved_to_file(tmpdir, app_instance, call_there_group):
|
|
|
43
43
|
async def test_screenshot_resized_to_width(tmpdir, app_instance, call_there_group):
|
|
44
44
|
output = Path(tmpdir) / "test.png"
|
|
45
45
|
|
|
46
|
-
call_there_group(["screenshot", "--width", "100", "-o", output], "")
|
|
46
|
+
await call_there_group(["screenshot", "--width", "100", "-o", output], "")
|
|
47
47
|
|
|
48
48
|
image = shortcuts.PILImage.open(output)
|
|
49
|
-
assert image.size ==
|
|
49
|
+
assert image.size[0] == 100
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
@pytest.mark.asyncio
|
|
@@ -54,7 +54,7 @@ async def test_pin_command_pin_shortcut_called(
|
|
|
54
54
|
mocker, capfd, mocked_android_modules, call_there_group, test_py_script
|
|
55
55
|
):
|
|
56
56
|
pin_shortcut = mocker.patch("android_here.pin_shortcut")
|
|
57
|
-
call_there_group(["pin", test_py_script, "--label", "Test label"], "")
|
|
57
|
+
await call_there_group(["pin", test_py_script, "--label", "Test label"], "")
|
|
58
58
|
captured = capfd.readouterr()
|
|
59
59
|
assert not captured.out and not captured.err
|
|
60
60
|
|
|
@@ -66,7 +66,7 @@ async def test_pin_command_default_label(
|
|
|
66
66
|
mocker, capfd, mocked_android_modules, call_there_group, test_py_script
|
|
67
67
|
):
|
|
68
68
|
pin_shortcut = mocker.patch("android_here.pin_shortcut")
|
|
69
|
-
call_there_group(["pin", test_py_script], "")
|
|
69
|
+
await call_there_group(["pin", test_py_script], "")
|
|
70
70
|
captured = capfd.readouterr()
|
|
71
71
|
assert not captured.out and not captured.err
|
|
72
72
|
|
|
@@ -60,7 +60,7 @@ async def test_run_ssh_server_clears_config_ready_after_start_error(mocker):
|
|
|
60
60
|
start_server.assert_called_once()
|
|
61
61
|
config = start_server.call_args.args[0]
|
|
62
62
|
assert config.host == ""
|
|
63
|
-
assert config.
|
|
63
|
+
assert config.sftp_root == app.upload_dir
|
|
64
64
|
assert config.key_path == Path("./key.rsa").resolve()
|
|
65
65
|
assert not app.ssh_server_config_ready.is_set()
|
|
66
66
|
show_exception_popup.assert_called_once_with(start_error)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.0"
|
|
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
|