adanos-cli 1.34.0__tar.gz → 1.34.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.
Files changed (56) hide show
  1. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/CHANGELOG.md +7 -0
  2. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/PKG-INFO +5 -3
  3. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/README.md +3 -1
  4. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/pyproject.toml +1 -1
  5. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/__init__.py +1 -1
  6. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/endpoints.py +2 -2
  7. adanos_cli-1.34.1/tests/test_polymarket_graph.py +81 -0
  8. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_shell.py +2 -1
  9. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/.github/workflows/ci.yml +0 -0
  10. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/.github/workflows/cli-binaries.yml +0 -0
  11. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/.github/workflows/publish-pypi.yml +0 -0
  12. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/.gitignore +0 -0
  13. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/LICENSE +0 -0
  14. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/install.ps1 +0 -0
  15. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/install.sh +0 -0
  16. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/scripts/build_cli_binary.py +0 -0
  17. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/scripts/cli_audit.py +0 -0
  18. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/scripts/generate_homebrew_formula.py +0 -0
  19. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/scripts/pyinstaller_entrypoint.py +0 -0
  20. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/__main__.py +0 -0
  21. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/activity_log.py +0 -0
  22. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/assets/__init__.py +0 -0
  23. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/assets/adanos-mark-color.svg +0 -0
  24. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/commands/__init__.py +0 -0
  25. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/commands/auth.py +0 -0
  26. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/commands/config.py +0 -0
  27. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/commands/extensions.py +0 -0
  28. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/commands/secrets.py +0 -0
  29. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/config.py +0 -0
  30. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/main.py +0 -0
  31. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/nlp.py +0 -0
  32. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/shell_history.py +0 -0
  33. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/summaries.py +0 -0
  34. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/tty.py +0 -0
  35. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/update_notifier.py +0 -0
  36. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/utils.py +0 -0
  37. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/src/adanos_cli/watchlists.py +0 -0
  38. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/__init__.py +0 -0
  39. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/conftest.py +0 -0
  40. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_account.py +0 -0
  41. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_activity_log.py +0 -0
  42. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_agent_contract.py +0 -0
  43. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_api_154.py +0 -0
  44. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_auth.py +0 -0
  45. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_cli_audit.py +0 -0
  46. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_config_runtime.py +0 -0
  47. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_diagnostics.py +0 -0
  48. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_distribution.py +0 -0
  49. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_endpoint_coverage.py +0 -0
  50. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_extensions.py +0 -0
  51. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_logs.py +0 -0
  52. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_onboarding.py +0 -0
  53. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_power_features.py +0 -0
  54. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_tty.py +0 -0
  55. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_update_notifier.py +0 -0
  56. {adanos_cli-1.34.0 → adanos_cli-1.34.1}/tests/test_watchlists.py +0 -0
@@ -7,6 +7,13 @@ Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.34.1] - 2026-11-16
11
+
12
+ ### Changed
13
+ - Require Python SDK `adanos>=2.8.1` so CLI installs include the API `1.55.0` Polymarket response fixes.
14
+ - Document API `1.55.0` Polymarket Graph keys, ticker migration, and error behavior in the README and endpoint descriptions.
15
+ - Add local HTTP command regressions for Graph keys, nullable compare metrics, and nonzero exits for `404`, `422`, and `503`.
16
+
10
17
  ## [1.34.0] - 2026-10-13
11
18
 
12
19
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: adanos-cli
3
- Version: 1.34.0
3
+ Version: 1.34.1
4
4
  Summary: CLI for the Adanos Market Sentiment API
5
5
  Project-URL: Homepage, https://adanos.com
6
6
  Project-URL: API_Docs, https://api.adanos.com/docs
@@ -14,7 +14,7 @@ Author: Alexander Schneider
14
14
  License-Expression: MIT
15
15
  License-File: LICENSE
16
16
  Requires-Python: >=3.10
17
- Requires-Dist: adanos<3,>=2.6.0
17
+ Requires-Dist: adanos<3,>=2.8.1
18
18
  Requires-Dist: httpx<1,>=0.23
19
19
  Provides-Extra: dev
20
20
  Requires-Dist: build>=1.2; extra == 'dev'
@@ -35,7 +35,7 @@ It is built for three use cases:
35
35
  - analysts who want repeatable CLI workflows
36
36
  - agents and automation that need stable JSON output
37
37
 
38
- The CLI is versioned independently from the API backend. It supports API 1.54.0 at `https://api.adanos.com/docs` and uses the published Python SDK under the hood.
38
+ The CLI is versioned independently from the API backend. It supports API 1.55.0 at `https://api.adanos.com/docs` and uses the published Python SDK under the hood.
39
39
  The default API host is `https://api.adanos.com`. Explicit `.org` or custom base URLs in saved settings, `ADANOS_BASE_URL`, or `--base-url` still take precedence.
40
40
 
41
41
  ## Install
@@ -261,6 +261,8 @@ adanos endpoint call sentiment.analyze --text "TSLA looks like a short squeeze s
261
261
  adanos endpoint call sentiment.analyze --text "Apple beats estimates while Tesla falls" --target Apple
262
262
  ```
263
263
 
264
+ Polymarket uses Instrument Graph keys in API `1.55.0`: stocks, ADRs, and share classes of one company share a key; ETFs keep their own keys. Use `BRK`, `BNY`, or `EWG`, and keep venue suffixes returned by Search, such as `SAP.DE`. Find replacement keys with Search. For example, `BK` is now `BNY` and `DAX` is `EWG`. Stock detail and raw mentions return `404` for unknown keys and `503` when identity lookup is unavailable. Share classes such as `BRK.B` or `BRK-B`, cashtags, and unknown suffixes return `422`. Compare keeps unknown keys as zero-activity rows without a company name and does not rewrite aliases. A `null` compare `buzz_score` means unavailable data, not zero; `trend_history` can be absent. Raw `strike_price` is `null` for company-value or reported-figure thresholds, such as market capitalization or capex.
265
+
264
266
  Polymarket endpoint output includes both `market_count` for selected-window breadth and `current_market_count` for live-only active-market breadth.
265
267
  For API `1.45.1+`, Polymarket `top_mentions` in stock detail output are representative sentiment evidence, not a liquidity leaderboard. When market status is available, the CLI shows `market_status` alongside the evidence. For API `1.46.0+`, human summaries prefer `daily_trend[].bullish_pct` and `daily_trend[].bearish_pct` over deprecated positive/negative/neutral count fields.
266
268
  Polymarket `unique_traders` can be `null` when retained wallet-level trades do not fully cover the requested window. Across platforms, each `trend_history` value represents its own UTC calendar day; the current partial day's value is not expected to equal the top-level period `buzz_score`.
@@ -9,7 +9,7 @@ It is built for three use cases:
9
9
  - analysts who want repeatable CLI workflows
10
10
  - agents and automation that need stable JSON output
11
11
 
12
- The CLI is versioned independently from the API backend. It supports API 1.54.0 at `https://api.adanos.com/docs` and uses the published Python SDK under the hood.
12
+ The CLI is versioned independently from the API backend. It supports API 1.55.0 at `https://api.adanos.com/docs` and uses the published Python SDK under the hood.
13
13
  The default API host is `https://api.adanos.com`. Explicit `.org` or custom base URLs in saved settings, `ADANOS_BASE_URL`, or `--base-url` still take precedence.
14
14
 
15
15
  ## Install
@@ -235,6 +235,8 @@ adanos endpoint call sentiment.analyze --text "TSLA looks like a short squeeze s
235
235
  adanos endpoint call sentiment.analyze --text "Apple beats estimates while Tesla falls" --target Apple
236
236
  ```
237
237
 
238
+ Polymarket uses Instrument Graph keys in API `1.55.0`: stocks, ADRs, and share classes of one company share a key; ETFs keep their own keys. Use `BRK`, `BNY`, or `EWG`, and keep venue suffixes returned by Search, such as `SAP.DE`. Find replacement keys with Search. For example, `BK` is now `BNY` and `DAX` is `EWG`. Stock detail and raw mentions return `404` for unknown keys and `503` when identity lookup is unavailable. Share classes such as `BRK.B` or `BRK-B`, cashtags, and unknown suffixes return `422`. Compare keeps unknown keys as zero-activity rows without a company name and does not rewrite aliases. A `null` compare `buzz_score` means unavailable data, not zero; `trend_history` can be absent. Raw `strike_price` is `null` for company-value or reported-figure thresholds, such as market capitalization or capex.
239
+
238
240
  Polymarket endpoint output includes both `market_count` for selected-window breadth and `current_market_count` for live-only active-market breadth.
239
241
  For API `1.45.1+`, Polymarket `top_mentions` in stock detail output are representative sentiment evidence, not a liquidity leaderboard. When market status is available, the CLI shows `market_status` alongside the evidence. For API `1.46.0+`, human summaries prefer `daily_trend[].bullish_pct` and `daily_trend[].bearish_pct` over deprecated positive/negative/neutral count fields.
240
242
  Polymarket `unique_traders` can be `null` when retained wallet-level trades do not fully cover the requested window. Across platforms, each `trend_history` value represents its own UTC calendar day; the current partial day's value is not expected to equal the top-level period `buzz_score`.
@@ -11,7 +11,7 @@ license = "MIT"
11
11
  requires-python = ">=3.10"
12
12
  authors = [{ name = "Alexander Schneider" }]
13
13
  dependencies = [
14
- "adanos>=2.6.0,<3",
14
+ "adanos>=2.8.1,<3",
15
15
  "httpx>=0.23,<1",
16
16
  ]
17
17
 
@@ -1,4 +1,4 @@
1
1
  """Adanos CLI package."""
2
2
 
3
3
  __all__ = ["__version__"]
4
- __version__ = "1.34.0"
4
+ __version__ = "1.34.1"
@@ -606,10 +606,10 @@ ENDPOINTS: dict[str, EndpointSpec] = {
606
606
  "polymarket-stocks.trending.countries", "/polymarket/stocks/v1/trending/countries", "Trending Polymarket countries", tuple(), TRENDING_PARAMS, _polymarket_stocks_trending_countries
607
607
  ),
608
608
  "polymarket-stocks.stock": EndpointSpec(
609
- "polymarket-stocks.stock", "/polymarket/stocks/v1/stock/{ticker}", "Stock detail on Polymarket", ("ticker",), PERIOD_PARAMS, _polymarket_stocks_stock
609
+ "polymarket-stocks.stock", "/polymarket/stocks/v1/stock/{ticker}", "Polymarket detail for a Graph company or ETF key", ("ticker",), PERIOD_PARAMS, _polymarket_stocks_stock
610
610
  ),
611
611
  "polymarket-stocks.stock.mentions": EndpointSpec(
612
- "polymarket-stocks.stock.mentions", "/polymarket/stocks/v1/stock/{ticker}/mentions", "Raw Polymarket mentions for a stock", ("ticker",), RAW_MENTION_PARAMS, _polymarket_stocks_mentions
612
+ "polymarket-stocks.stock.mentions", "/polymarket/stocks/v1/stock/{ticker}/mentions", "Raw Polymarket snapshots for a Graph key", ("ticker",), RAW_MENTION_PARAMS, _polymarket_stocks_mentions
613
613
  ),
614
614
  "polymarket-stocks.search": EndpointSpec(
615
615
  "polymarket-stocks.search",
@@ -0,0 +1,81 @@
1
+ """Run the CLI against a local HTTP server with API 1.55 response contracts."""
2
+
3
+ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
4
+ import json
5
+ import os
6
+ import subprocess
7
+ import sys
8
+ from threading import Thread
9
+ from urllib.parse import urlparse, parse_qs
10
+
11
+ import pytest
12
+
13
+
14
+ @pytest.fixture
15
+ def api_server():
16
+ state = {"status": 200, "payload": {}, "paths": []}
17
+
18
+ class Handler(BaseHTTPRequestHandler):
19
+ def do_GET(self):
20
+ state["paths"].append(self.path)
21
+ self.send_response(state["status"])
22
+ self.send_header("Content-Type", "application/json")
23
+ self.end_headers()
24
+ self.wfile.write(json.dumps(state["payload"]).encode())
25
+
26
+ def log_message(self, *args):
27
+ pass
28
+
29
+ with ThreadingHTTPServer(("127.0.0.1", 0), Handler) as server:
30
+ thread = Thread(target=server.serve_forever, daemon=True)
31
+ thread.start()
32
+ try:
33
+ yield f"http://127.0.0.1:{server.server_port}", state
34
+ finally:
35
+ server.shutdown()
36
+ thread.join()
37
+
38
+
39
+ def run_cli(base_url, tmp_path, *args):
40
+ env = {**os.environ, "ADANOS_API_KEY": "test-key", "ADANOS_BASE_URL": base_url,
41
+ "ADANOS_CLI_DISABLE_UPDATE_CHECK": "1", "XDG_CONFIG_HOME": str(tmp_path / "config")}
42
+ result = subprocess.run(
43
+ [sys.executable, "-m", "adanos_cli", "--json", *args],
44
+ env=env, text=True, capture_output=True, timeout=20,
45
+ )
46
+ (tmp_path / "cli-result.json").write_text(json.dumps({
47
+ "command": [sys.executable, "-m", "adanos_cli", "--json", *args],
48
+ "base_url": base_url, "returncode": result.returncode,
49
+ "stdout": result.stdout, "stderr": result.stderr,
50
+ }, indent=2))
51
+ return result
52
+
53
+
54
+ @pytest.mark.parametrize("status,payload,message", [
55
+ (404, {"detail": {"error_code": "unsupported_ticker", "message": "Unsupported ticker BK."}}, "Unsupported ticker BK."),
56
+ (422, {"detail": [{"loc": ["path", "ticker"], "msg": "Invalid Graph key", "type": "string_pattern_mismatch"}]}, "Invalid Graph key"),
57
+ (503, {"detail": "Polymarket identity lookup unavailable"}, "Polymarket identity lookup unavailable"),
58
+ ])
59
+ def test_polymarket_errors_exit_nonzero_without_success_output(api_server, tmp_path, status, payload, message):
60
+ base_url, state = api_server
61
+ state.update(status=status, payload=payload)
62
+ result = run_cli(base_url, tmp_path, "endpoint", "call", "polymarket-stocks.stock.mentions", "--ticker", "BK")
63
+ assert result.returncode != 0
64
+ assert result.stdout == ""
65
+ error = json.loads(result.stderr)
66
+ assert message in error["error"]["message"]
67
+ assert urlparse(state["paths"][0]).path == "/polymarket/stocks/v1/stock/BK/mentions"
68
+
69
+
70
+ def test_polymarket_compare_preserves_graph_keys_and_nullable_metrics(api_server, tmp_path):
71
+ base_url, state = api_server
72
+ row = {"ticker": "BK", "buzz_score": None, "trade_count": 0, "market_count": 0,
73
+ "current_market_count": 0, "total_liquidity": 0.0, "trend_history": []}
74
+ state["payload"] = {"period_days": 7, "stocks": [row]}
75
+ result = run_cli(base_url, tmp_path, "compare", "BNY", "SAP.DE", "BK", "--platform", "polymarket-stocks")
76
+ assert result.returncode == 0, result.stderr
77
+ assert result.stderr == ""
78
+ payload = json.loads(result.stdout)
79
+ assert payload["data"]["stocks"][0]["buzz_score"] is None
80
+ assert "company_name" not in payload["data"]["stocks"][0]
81
+ assert parse_qs(urlparse(state["paths"][0]).query)["tickers"] == ["BNY,SAP.DE,BK"]
@@ -9,6 +9,7 @@ from pathlib import Path
9
9
 
10
10
  import adanos_cli.config as cli_config
11
11
  import adanos_cli.main as cli_main
12
+ from adanos_cli import __version__
12
13
 
13
14
 
14
15
  def _isolate_config(tmp_path: Path, monkeypatch) -> None:
@@ -204,7 +205,7 @@ def test_shell_header_uses_clean_wordmark_without_inline_image(monkeypatch, caps
204
205
  cli_main._print_shell_header("https://api.adanos.org", has_api_key=False)
205
206
  out = capsys.readouterr().out
206
207
 
207
- assert out.startswith("ADANOS Market Sentiment CLI v1.34.0\n")
208
+ assert out.startswith(f"ADANOS Market Sentiment CLI v{__version__}\n")
208
209
  assert "account: not configured | api: https://api.adanos.org" in out
209
210
  assert "cwd:" in out
210
211
  assert "█" not in out
File without changes
File without changes
File without changes
File without changes