hkjc 0.3.8__tar.gz → 0.3.9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hkjc
3
- Version: 0.3.8
3
+ Version: 0.3.9
4
4
  Summary: Library for scrapping HKJC data and perform basic analysis
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: cachetools>=6.2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hkjc"
3
- version = "0.3.8"
3
+ version = "0.3.9"
4
4
  description = "Library for scrapping HKJC data and perform basic analysis"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -99,12 +99,8 @@ def generate_all_pla_trades(date: str, venue_code: str, race_number: int, rebate
99
99
  N = len(odds['PLA'])
100
100
  candidates = np.arange(1, N+1)
101
101
 
102
- fit_res = fit_harville_to_odds(
103
- W_obs=odds['WIN'],
104
- Qin_obs=odds['QIN'],
105
- Q_obs=odds['QPL'],
106
- b_obs=odds['PLA']
107
- )
102
+ fit_res = fit_harville_to_odds(odds)
103
+
108
104
  if fit_res['success']:
109
105
  odds['PLA'] = np.nan_to_num(1/fit_res['b_fitted'], posinf=0)
110
106
  odds['QPL'] = np.nan_to_num(1/fit_res['Q_fitted'], posinf=0)
@@ -36,6 +36,7 @@ def speedpro_energy(race_date: str) -> pl.DataFrame:
36
36
 
37
37
  df = (df.with_columns(pl.col('RunnerNumber').str.to_integer())
38
38
  .with_columns(pl.col('SpeedPRO_Energy_Difference').str.to_integer())
39
+ .with_columns(pl.col('FitnessRatings').str.to_integer())
39
40
  .select(['RaceNo', 'RunnerNumber', 'HorseName', 'FitnessRatings','SpeedPRO_Energy_Difference']))
40
41
 
41
42
  return df
@@ -97,7 +97,7 @@ wheels = [
97
97
 
98
98
  [[package]]
99
99
  name = "hkjc"
100
- version = "0.3.8"
100
+ version = "0.3.9"
101
101
  source = { editable = "." }
102
102
  dependencies = [
103
103
  { name = "cachetools" },
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