bootlick 0.2.3__tar.gz → 0.2.4__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: bootlick
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A package for specific websites
5
5
  Author-email: Unknown <unknown@example.com>
6
6
  License-Expression: MIT
@@ -927,8 +927,9 @@ def update_board_meetings(driver, update_historical_bm: bool = False):
927
927
  bm.reset_index(inplace=True, drop=True)
928
928
 
929
929
  # Normalize the 'announce_date' column to ensure consistent data types
930
- bm["announce_date"] = bm["announce_date"].astype(str).replace("nan", "")
931
- bm["announce_date_flag"] = bm["announce_date"].notna()
930
+ bm["announce_date"] = bm["announce_date"].fillna("").astype(str).replace({"nan": "", "None": ""})
931
+ # Keep the earliest real announce time per (symbol, date); blanks only when nothing else exists.
932
+ bm["announce_date_flag"] = bm["announce_date"] != ""
932
933
  bm = (
933
934
  bm.sort_values(by=["announce_date_flag", "announce_date"], ascending=[False, True])
934
935
  .drop_duplicates(["symbol", "date"])
@@ -1152,10 +1153,12 @@ def get_symbol_change(session):
1152
1153
 
1153
1154
  if file_exists_and_valid(dest_file, min_size=1):
1154
1155
  symbolchange_new = read_csv_in_pandas_out(dest_file, encoding="latin1", header=None, dtype=str)
1155
- if symbolchange_new.iloc[0, 3] == "SM_APPLICABLE_FROM":
1156
- symbolchange_new = pd.read_csv(dest_file, encoding="latin1", header=True, dtype=str)
1157
- else:
1158
- symbolchange_new.columns = ["SYMB_COMPANY_NAME", "SM_KEY_SYMBOL", "SM_NEW_SYMBOL", "SM_APPLICABLE_FROM"]
1156
+ # NSE has used SM_APPLICABLE_FROM and EFFECTIVE DATE. Drop any header whose
1157
+ # fourth cell is not a date, then name the columns ourselves.
1158
+ first_date = str(symbolchange_new.iloc[0, 3]).strip()
1159
+ if pd.to_datetime(first_date, format="%d-%b-%Y", errors="coerce") is pd.NaT:
1160
+ symbolchange_new = symbolchange_new.iloc[1:].reset_index(drop=True)
1161
+ symbolchange_new.columns = ["SYMB_COMPANY_NAME", "SM_KEY_SYMBOL", "SM_NEW_SYMBOL", "SM_APPLICABLE_FROM"]
1159
1162
 
1160
1163
  if len(symbolchange_new) > 0:
1161
1164
  # Convert 'SM_APPLICABLE_FROM' to datetime with the specified format
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bootlick
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A package for specific websites
5
5
  Author-email: Unknown <unknown@example.com>
6
6
  License-Expression: MIT
@@ -27,7 +27,7 @@ include-package-data = true
27
27
 
28
28
  [project]
29
29
  name = "bootlick"
30
- version = "0.2.3"
30
+ version = "0.2.4"
31
31
  description = "A package for specific websites"
32
32
  readme = "README.md"
33
33
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes