Skip to content

Commit

Permalink
Python 3.11 support #227. Corrected a FutureWarning.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinecarme committed Mar 9, 2023
1 parent 66e761a commit ed43d61
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 226 deletions.
3 changes: 2 additions & 1 deletion tests/basic_checks/hierarchy_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def train_and_force_fail(b , error_message):
df1 = b1.mHierarchy['Data']
print(df1.tail())
cols = df1.columns
b1.mHierarchy['Data'] = df1.append(pd.DataFrame([['Unknown' , 'Other_State' , 'Australia']], columns=cols)).reset_index(drop=True);
b1.mHierarchy['Data'] = pd.concat((df1, pd.DataFrame([['Unknown' , 'Other_State' , 'Australia']], columns=cols))).reset_index(drop=True);
# b1.mHierarchy['Data'] = df1.append(pd.DataFrame([['Unknown' , 'Other_State' , 'Australia']], columns=cols)).reset_index(drop=True);
print(b1.mHierarchy['Data'].tail())
train_and_force_fail(b1 , "PYAF_ERROR_HIERARCHY_BASE_COLUMN_NOT_FOUND Unknown")
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def train_and_force_fail(b , error_message):
df1 = b1.mHierarchy['Data']
print(df1.tail())
cols = df1.columns
b1.mHierarchy['Data'] = df1.append(pd.DataFrame([['Unknown' , 'Other_State' , 'Australia']], columns=cols)).reset_index(drop=True);
b1.mHierarchy['Data'] = pd.concat((df1, pd.DataFrame([['Unknown' , 'Other_State' , 'Australia']], columns=cols))).reset_index(drop=True);
# b1.mHierarchy['Data'] = df1.append(pd.DataFrame([['Unknown' , 'Other_State' , 'Australia']], columns=cols)).reset_index(drop=True);
print(b1.mHierarchy['Data'].tail())
train_and_force_fail(b1 , "PYAF_ERROR_HIERARCHY_BASE_COLUMN_NOT_FOUND Unknown")
2 changes: 1 addition & 1 deletion tests/basic_checks/hierarchy_checks_unkonwn_base_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def train_and_force_fail(b , error_message):
df1 = b1.mHierarchy['Data']
print(df1.tail())
cols = df1.columns
b1.mHierarchy['Data'] = df1.append(pd.DataFrame([['Unknown' , 'Other_State' , 'Australia']], columns=cols)).reset_index(drop=True);
b1.mHierarchy['Data'] = pd.concat((df1, pd.DataFrame([['Unknown' , 'Other_State' , 'Australia']], columns=cols))).reset_index(drop=True);
print(b1.mHierarchy['Data'].tail())
train_and_force_fail(b1 , "PYAF_ERROR_HIERARCHY_BASE_COLUMN_NOT_FOUND Unknown")
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def create_exog_data(b1):
# fake exog data based on date variable
lDate1 = b1.mPastData['Index']
lDate2 = b1.mFutureData['Index'] # not needed. exogenous data are missing when not available.
lDate = lDate1.append(lDate2)
lDate = pd.concat((lDate1, lDate2), axis = 0)
lExogenousDataFrame = pd.DataFrame()
lExogenousDataFrame['Index'] = lDate
lExogenousDataFrame['Index_ex1'] = lDate * lDate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def create_exog_data(b1):
# fake exog data based on date variable
lDate1 = b1.mPastData['Index']
lDate2 = b1.mFutureData['Index'] # not needed. exogenous data are missing when not available.
lDate = lDate1.append(lDate2)
lDate = pd.concat((lDate1, lDate2), axis = 0)
lExogenousDataFrame = pd.DataFrame()
lExogenousDataFrame['Index'] = lDate
lExogenousDataFrame['Index_ex1'] = lDate * lDate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def create_exog_data(b1):
# fake exog data based on date variable
lDate1 = b1.mPastData['Date']
lDate2 = b1.mFutureData['Date'] # not needed. exogfenous data are missing when not available.
lDate = lDate1.append(lDate2)
lDate = pd.concat((lDate1, lDate2), axis = 0)
lExogenousDataFrame = pd.DataFrame()
lExogenousDataFrame['Date'] = lDate
lExogenousDataFrame['Date_second'] = lDate.dt.second
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def create_exog_data(b1):
# fake exog data based on date variable
lDate1 = b1.mPastData['Date']
lDate2 = b1.mFutureData['Date'] # not needed. exogfenous data are missing when not available.
lDate = lDate1.append(lDate2)
lDate = pd.concat((lDate1, lDate2), axis = 0)
lExogenousDataFrame = pd.DataFrame()
lExogenousDataFrame['Date'] = lDate
lExogenousDataFrame['Date_second'] = lDate.dt.second
Expand Down
219 changes: 0 additions & 219 deletions tests/references/bugs/issue_76/test_ozone_unicode.log

This file was deleted.

0 comments on commit ed43d61

Please sign in to comment.