not1mm 25.6.2__py3-none-any.whl → 25.6.3__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.
@@ -29,14 +29,15 @@ def prefer_prefix_score(query: str, candidate: str, **kwargs) -> int:
29
29
  score = 0.8 * score
30
30
  return int(round(score))
31
31
 
32
+
32
33
  @lru_cache(maxsize=1024) # You can adjust this as needed
33
34
  def prefix_bias_score(query: str, candidate: str, **kwargs) -> int:
34
35
  """Return a score based on the quality of the match."""
35
36
  score = fuzz.QRatio(query, candidate)
36
37
 
37
- if candidate[:len(query)] == query:
38
+ if candidate[: len(query)] == query:
38
39
  return score
39
- return int(score*0.8)
40
+ return int(score * 0.8)
40
41
 
41
42
 
42
43
  class SCP:
@@ -53,18 +54,21 @@ class SCP:
53
54
  - Returns True if successful
54
55
  - Otherwise False
55
56
  """
56
- with requests.Session() as session:
57
- the_request = session.get(MASTER_SCP_URL)
58
- if the_request.status_code == 200:
59
- with open(Path(self.app_data_path) / "MASTER.SCP", "wb+") as file:
60
- file.write(the_request.content)
61
- return True
57
+ try:
58
+ with requests.Session() as session:
59
+ the_request = session.get(MASTER_SCP_URL)
60
+ if the_request.status_code == 200:
61
+ with open(Path(self.app_data_path) / "MASTER.SCP", "wb+") as file:
62
+ file.write(the_request.content)
63
+ return True
64
+ except requests.exceptions.RequestException as exception:
65
+ logger.critical("update_masterscp: %s", exception)
62
66
  return False
63
67
 
64
68
  def read_scp(self):
65
69
  """
66
70
  Reads in a list of known contesters into an internal dictionary
67
- """
71
+ """
68
72
  try:
69
73
  with open(
70
74
  Path(self.app_data_path) / "MASTER.SCP", "r", encoding="utf-8"
@@ -74,22 +78,21 @@ class SCP:
74
78
  except IOError as exception:
75
79
  logger.critical("read_scp: read error: %s", exception)
76
80
 
77
-
78
81
  def super_check(self, acall: str) -> list:
79
82
 
80
83
  if len(acall) > 1:
81
84
  # Compute similarity scores between `acall` and all items in `self.scp`
82
85
  similarity_scores = process.cdist(
83
- [acall], self.scp, scorer=prefix_bias_score, workers=-1,score_cutoff=60
86
+ [acall], self.scp, scorer=prefix_bias_score, workers=-1, score_cutoff=60
84
87
  )
85
88
 
86
89
  # Sort and retrieve the top 20 matches with their indices
87
- top_matches = sorted(
88
- enumerate(similarity_scores[0]), key=lambda x: -x[1]
89
- )[:20]
90
+ top_matches = sorted(enumerate(similarity_scores[0]), key=lambda x: -x[1])[
91
+ :20
92
+ ]
90
93
 
91
94
  # Extract the corresponding strings from `self.scp`
92
95
  matches = [self.scp[idx] for idx, score in top_matches if score > 0]
93
96
 
94
97
  return matches
95
- return []
98
+ return []
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "25.6.2"
3
+ __version__ = "25.6.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: not1mm
3
- Version: 25.6.2
3
+ Version: 25.6.3
4
4
  Summary: NOT1MM Logger
5
5
  Author-email: Michael Bridak <michael.bridak@gmail.com>
6
6
  License: GPL-3.0-or-later
@@ -244,6 +244,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
244
244
 
245
245
  ## Recent Changes
246
246
 
247
+ - [25-6-3] Fix creash caused by SSL cert expiration from supercheckpartial.com.
247
248
  - [25-6-2] Crash Fix. Change initial self.pref from None to a dict.
248
249
  - [25-6-1] Merged changes from @term73, updating ES Field Day.
249
250
 
@@ -119,8 +119,8 @@ not1mm/lib/new_contest.py,sha256=IznTDMq7yXHB6zBoGUEC_WDYPCPpsSZW4wwMJi16zK0,816
119
119
  not1mm/lib/plugin_common.py,sha256=nqiUq11T9Wz8RDrRen4Zvp-KXVWUYcIp5JPZwqmu2Oo,13913
120
120
  not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
121
121
  not1mm/lib/settings.py,sha256=5xnsagH48qGeCDhfxPWW9yaXtv8wT13yoIVvYt8h_Qs,16023
122
- not1mm/lib/super_check_partial.py,sha256=Hp89cPHQOwVuGjAjdMaJPdHEyrJiN3xNu841MdiZAjo,2948
123
- not1mm/lib/version.py,sha256=dBiyUcajZgmjLwNr2OG7KC2bJLiBds26sZX-sQtqbIM,47
122
+ not1mm/lib/super_check_partial.py,sha256=jX7DjHesEV4KNVQbddJui0wAsYHerikH7W0iPv7PXQw,3110
123
+ not1mm/lib/version.py,sha256=pEfUK-LuTe2An8wVtpqOavyJNC-gs53UknzFXprZDZQ,47
124
124
  not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
125
125
  not1mm/plugins/10_10_fall_cw.py,sha256=oJh3JKqjOpnWElSlZpiQ631UnaOd8qra5s9bl_QoInk,14783
126
126
  not1mm/plugins/10_10_spring_cw.py,sha256=p7dSDtbFK0e6Xouw2V6swYn3VFVgHKyx4IfRWyBjMZY,14786
@@ -184,9 +184,9 @@ not1mm/plugins/ukeidx.py,sha256=ZsIFXgOSwjuKNmN4W_C0TAgGqgnabJGNLMHwGkl3_bk,1910
184
184
  not1mm/plugins/vhf_sprint.py,sha256=a9QFTpv8XUbZ_GLjdVCh7svykFa-gXOWwKFZ6MD3uQM,19289
185
185
  not1mm/plugins/weekly_rtty.py,sha256=C8Xs3Q5UgSYx-mFFar8BVARWtmqlyrbeC98Ubzb4UN8,20128
186
186
  not1mm/plugins/winter_field_day.py,sha256=hmAMgkdqIXtnCNyUp8J9Bb8liN8wj10wps6ROuG-Bok,15284
187
- not1mm-25.6.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
188
- not1mm-25.6.2.dist-info/METADATA,sha256=yB2SIfHLStaoq9r49o9HEgqZkTf8chEOl-bNFxbctpY,34118
189
- not1mm-25.6.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
190
- not1mm-25.6.2.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
191
- not1mm-25.6.2.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
192
- not1mm-25.6.2.dist-info/RECORD,,
187
+ not1mm-25.6.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
188
+ not1mm-25.6.3.dist-info/METADATA,sha256=rjNMCTx5DOKW54te0fFicxrnv00vpYinmXd1RcYMKfU,34198
189
+ not1mm-25.6.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
190
+ not1mm-25.6.3.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
191
+ not1mm-25.6.3.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
192
+ not1mm-25.6.3.dist-info/RECORD,,