equity-aggregator 0.1.8__py3-none-any.whl → 1.0.1__py3-none-any.whl

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.
@@ -70,6 +70,14 @@ def _score_quote(
70
70
  `name_key`) and the expected name. Applies minimum score thresholds to prevent
71
71
  matching completely unrelated equities.
72
72
 
73
+ Note:
74
+ Symbol comparison uses `partial_ratio` rather than `ratio` because
75
+ exchange symbols follow a `[prefix]ROOT[.suffix]` pattern (e.g.
76
+ `MELE.BR` vs `2MELE`). `partial_ratio` aligns the shorter string
77
+ against the best-matching substring of the longer one, effectively
78
+ matching on the shared root symbol regardless of exchange-specific
79
+ decoration.
80
+
73
81
  Args:
74
82
  quote (dict): The quote dictionary containing at least a "symbol" key and
75
83
  a name field specified by `name_key`.
@@ -80,12 +88,12 @@ def _score_quote(
80
88
  Returns:
81
89
  tuple[int, str, str]: A tuple of (total_score, actual_symbol, actual_name),
82
90
  where total_score is the sum of the symbol and name fuzzy scores.
83
- Returns (0, symbol, name) if either score is below the minimum threshold.
91
+ Returns (0, symbol, name) if either score is below its minimum threshold.
84
92
  """
85
93
  actual_symbol = quote["symbol"]
86
94
  actual_name = quote.get(name_key, "<no-name>")
87
95
 
88
- symbol_score = fuzz.ratio(
96
+ symbol_score = fuzz.partial_ratio(
89
97
  actual_symbol,
90
98
  expected_symbol,
91
99
  processor=utils.default_process,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: equity-aggregator
3
- Version: 0.1.8
3
+ Version: 1.0.1
4
4
  Summary: Financial equity data aggregation toolkit
5
5
  Project-URL: Homepage, https://github.com/gregorykelleher/equity-aggregator
6
6
  Project-URL: Repository, https://github.com/gregorykelleher/equity-aggregator
@@ -42,7 +42,7 @@ equity_aggregator/adapters/data_sources/enrichment_feeds/yfinance/transport.py,s
42
42
  equity_aggregator/adapters/data_sources/enrichment_feeds/yfinance/yfinance.py,sha256=KVZ5aT-vKG-D3yrM_E83C0wcMtl2c8xcF_Ns8iN6KN4,11287
43
43
  equity_aggregator/adapters/data_sources/enrichment_feeds/yfinance/_utils/__init__.py,sha256=2a5vnt7dDuEUhl9yS4XQGw5vC7tjKjL2eAhXDMRLyfU,212
44
44
  equity_aggregator/adapters/data_sources/enrichment_feeds/yfinance/_utils/backoff.py,sha256=zTHDZZptiPInI-tobT4d_-grNWzqBNj_JLGb0_fU-ZA,917
45
- equity_aggregator/adapters/data_sources/enrichment_feeds/yfinance/_utils/fuzzy.py,sha256=TR1iP3tNsRK7tFPEFy2b4JfvvXP-pg7YWLDNeq2MnmI,3594
45
+ equity_aggregator/adapters/data_sources/enrichment_feeds/yfinance/_utils/fuzzy.py,sha256=QmixTLlPKRxiTMohZR0EGWdFVS7yj-8aRjUqM6ptcsg,4003
46
46
  equity_aggregator/adapters/data_sources/enrichment_feeds/yfinance/_utils/json.py,sha256=NwBUhVWtmN2TSUX9sm2jB3aAEU44ZCR-bSeqq9r6psk,955
47
47
  equity_aggregator/adapters/data_sources/enrichment_feeds/yfinance/api/__init__.py,sha256=JoGm1xmjQvEUEVWcC7ffcU9MKcZER9UWcp4vZ9ICxB4,148
48
48
  equity_aggregator/adapters/data_sources/enrichment_feeds/yfinance/api/quote_summary.py,sha256=ue7jdO6JtQGbJF3F3Fl0HLjUIf3sRyCNeMyJ4l9U9x0,4725
@@ -96,8 +96,8 @@ equity_aggregator/storage/cache.py,sha256=pZ2aFuBthuK3WfDjq6YnFOIMg8VqeAfTbnS5Vk
96
96
  equity_aggregator/storage/data_store.py,sha256=ZINcde7b5T2DQDbV8MiNu8vZ0VZrv0ZGhpvU5L1ujFs,5099
97
97
  equity_aggregator/storage/export.py,sha256=QhccHYUH9eDwb3eRijiJiarjoWIPwS2XMQT9yHn7XWw,5537
98
98
  equity_aggregator/storage/metadata.py,sha256=bCjPTKVBTmndhCoDJ3vUxau5Jr_cG6PEkiBbNKorYyE,3095
99
- equity_aggregator-0.1.8.dist-info/METADATA,sha256=qLuEFwbe_35OPlf7Ha9xeubu-qPdVUBB1wz7M1Q6Jq0,27674
100
- equity_aggregator-0.1.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
101
- equity_aggregator-0.1.8.dist-info/entry_points.txt,sha256=pedEbEhWbz-9HIUpN8KTALxu94qKn9jxgrn08AvHb6c,70
102
- equity_aggregator-0.1.8.dist-info/licenses/LICENCE.txt,sha256=lyiWH8xJzlkFXkZpQf2_u8KtlJiPrVCczrZEZNyqSrg,1063
103
- equity_aggregator-0.1.8.dist-info/RECORD,,
99
+ equity_aggregator-1.0.1.dist-info/METADATA,sha256=VusAWDGgB_hPnKvmVvs3NX05wj4jnJH2jv7HfK1udsA,27674
100
+ equity_aggregator-1.0.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
101
+ equity_aggregator-1.0.1.dist-info/entry_points.txt,sha256=pedEbEhWbz-9HIUpN8KTALxu94qKn9jxgrn08AvHb6c,70
102
+ equity_aggregator-1.0.1.dist-info/licenses/LICENCE.txt,sha256=lyiWH8xJzlkFXkZpQf2_u8KtlJiPrVCczrZEZNyqSrg,1063
103
+ equity_aggregator-1.0.1.dist-info/RECORD,,