abysshub 1.0.1.dev13__tar.gz → 1.0.1.dev15__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 (28) hide show
  1. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/PKG-INFO +4 -1
  2. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/pyproject.toml +14 -2
  3. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/test_package.py +27 -0
  4. abysshub-1.0.1.dev15/vulture_whitelist.py +6 -0
  5. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/.gitignore +0 -0
  6. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/LICENSE +0 -0
  7. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/README.md +0 -0
  8. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/__init__.py +0 -0
  9. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/__main__.py +0 -0
  10. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/_async_client.py +0 -0
  11. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/_client.py +0 -0
  12. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/_command.py +0 -0
  13. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/_env.py +0 -0
  14. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/_error.py +0 -0
  15. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/_files.py +0 -0
  16. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/_http.py +0 -0
  17. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/_run.py +0 -0
  18. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/_types.py +0 -0
  19. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/src/abysshub/py.typed +0 -0
  20. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/caller.py +0 -0
  21. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/conftest.py +0 -0
  22. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/fake_server.py +0 -0
  23. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/test_client.py +0 -0
  24. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/test_command.py +0 -0
  25. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/test_files.py +0 -0
  26. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/test_http.py +0 -0
  27. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/test_replay.py +0 -0
  28. {abysshub-1.0.1.dev13 → abysshub-1.0.1.dev15}/tests/test_timeout.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: abysshub
3
- Version: 1.0.1.dev13
3
+ Version: 1.0.1.dev15
4
4
  Summary: Run a hosted tool, an Abyss Widget, from your own Python code and get its result and files. The official library for the Abyss API.
5
5
  Project-URL: Homepage, https://abysshub.com/docs#api
6
6
  Project-URL: Documentation, https://abysshub.com/docs
@@ -14,7 +14,10 @@ Classifier: Typing :: Typed
14
14
  Requires-Python: >=3.9
15
15
  Requires-Dist: httpx<1,>=0.27
16
16
  Provides-Extra: dev
17
+ Requires-Dist: deptry; extra == 'dev'
17
18
  Requires-Dist: pytest; extra == 'dev'
19
+ Requires-Dist: ruff; extra == 'dev'
20
+ Requires-Dist: vulture; extra == 'dev'
18
21
  Description-Content-Type: text/markdown
19
22
 
20
23
  # abysshub
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "abysshub"
7
- version = "1.0.1.dev13"
7
+ version = "1.0.1.dev15"
8
8
  description = "Run a hosted tool, an Abyss Widget, from your own Python code and get its result and files. The official library for the Abyss API."
9
9
  keywords = [
10
10
  "abyss",
@@ -32,7 +32,7 @@ classifiers = [
32
32
  abysshub = "abysshub._command:main"
33
33
 
34
34
  [project.optional-dependencies]
35
- dev = ["pytest"]
35
+ dev = ["deptry", "pytest", "ruff", "vulture"]
36
36
 
37
37
  [project.urls]
38
38
  Homepage = "https://abysshub.com/docs#api"
@@ -42,3 +42,15 @@ Issues = "https://github.com/Abysshub/abysshub-sdk/issues"
42
42
 
43
43
  [tool.pytest.ini_options]
44
44
  testpaths = ["tests"]
45
+
46
+ # The dead-code checks, run by tests/test_package.py. vulture's whitelist is today's
47
+ # findings, recorded so only a new one fails; it only shrinks.
48
+ [tool.vulture]
49
+ paths = ["src", "tests", "vulture_whitelist.py"]
50
+ min_confidence = 80
51
+
52
+ [tool.deptry]
53
+ pep621_dev_dependency_groups = ["dev"]
54
+
55
+ [tool.ruff.lint]
56
+ select = ["ERA001"]
@@ -1,3 +1,5 @@
1
+ import ast
2
+ import re
1
3
  import subprocess
2
4
  import sys
3
5
  from importlib.metadata import metadata, requires
@@ -5,6 +7,8 @@ from pathlib import Path
5
7
 
6
8
  from packaging.requirements import Requirement
7
9
 
10
+ PROJECT = Path(__file__).resolve().parent.parent
11
+
8
12
 
9
13
  def test_httpx_is_the_only_runtime_dependency():
10
14
  reqs = [Requirement(r) for r in requires("abysshub") or []]
@@ -25,3 +29,26 @@ def test_the_command_runs_as_abysshub_and_as_python_m_abysshub():
25
29
  done = subprocess.run([*command, "publish", "--help"], capture_output=True, text=True)
26
30
  assert done.returncode == 0, done.stderr
27
31
  assert "folder" in done.stdout
32
+
33
+
34
+ def check(tool, *args):
35
+ return subprocess.run([sys.executable, "-m", tool, *args], cwd=PROJECT, capture_output=True, text=True)
36
+
37
+
38
+ def test_vulture_finds_no_dead_code_beyond_its_whitelist_and_the_whitelist_only_shrinks():
39
+ done = check("vulture")
40
+ assert done.returncode == 0, done.stdout
41
+ whitelist = ast.parse((PROJECT / "vulture_whitelist.py").read_text())
42
+ recorded = {node.value.id for node in whitelist.body}
43
+ found = set(re.findall(r"'([^']+)'", check("vulture", "src", "tests").stdout))
44
+ assert recorded <= found, f"no longer found, so remove from vulture_whitelist.py: {recorded - found}"
45
+
46
+
47
+ def test_deptry_finds_every_import_declared_and_every_dependency_imported():
48
+ done = check("deptry", "src")
49
+ assert done.returncode == 0, done.stdout + done.stderr
50
+
51
+
52
+ def test_ruff_finds_no_commented_out_code():
53
+ done = check("ruff", "check", "src", "tests")
54
+ assert done.returncode == 0, done.stdout
@@ -0,0 +1,6 @@
1
+ # vulture's findings when the dead-code check began, which it no longer reports. A name
2
+ # leaves when its last finding is gone (tests/test_package.py checks that each still is).
3
+ exc_type # unused variable (src/abysshub/_async_client.py:147, src/abysshub/_client.py:384)
4
+ exc # unused variable (src/abysshub/_async_client.py:148, src/abysshub/_client.py:385)
5
+ tb # unused variable (src/abysshub/_async_client.py:149, src/abysshub/_client.py:386)
6
+ format # unused variable (tests/fake_server.py:53)
File without changes
File without changes