Skip to content

Commit

Permalink
docs update & bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pkjmesra committed Dec 29, 2023
1 parent a4462d4 commit f226025
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
11 changes: 4 additions & 7 deletions pkscreener/classes/Screener.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,15 +1355,12 @@ def validatePriceRisingByAtLeast2Percent(self, data, screenDict, saveDict):

if percent1 >= 2 and percent2 >= 2 and percent3 >= 2:
pct_change_text = (
(" (%.1f%%," % percent1)
+ (" %.1f%%," % percent2)
("%.1f%%" % percent1)
+ (" (%.1f%%," % percent2)
+ (" %.1f%%)" % percent3)
)
pct_change = colorText.GREEN + pct_change_text + colorText.END
screenDict["LTP"] = (
colorText.GREEN + ("%.2f" % round(day0, 2)) + pct_change + colorText.END
)
saveDict["LTP"] = round(day0, 2) # + pct_change_text
saveDict["%Chng"] = pct_change_text
screenDict["%Chng"] = colorText.GREEN + pct_change_text + colorText.END
return True and self.getCandleType(data.head(1))
return False

Expand Down
2 changes: 1 addition & 1 deletion pkscreener/classes/Utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def tableToImage(table, styledTable, filename, label, backtestSummary=None, back
bt_text_width_artfont, _ = font.getsize_multiline(backtestSummary)

startColValue = 100
im_width = int(0.72*bt_text_width) if (bt_text_width > text_width) else (int(1.1*text_width) + int(startColValue*4))
im_width = int(0.72*bt_text_width) if (bt_text_width > text_width) else (text_width + int(startColValue*2))

wrapper = textwrap.TextWrapper(width=2*int(len(table.split('\n')[0]) if len(table) >0 else len(backtestSummary.split('\n')[0])))
word_list = wrapper.wrap(text=legendText)
Expand Down
2 changes: 1 addition & 1 deletion pkscreener/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,8 +1345,8 @@ def reformatTable(summaryText, headerDict, colored_text, sorting=True):
colored_text = colored_text.replace('</tr>', "")
colored_text = colored_text.replace('</tbody>', "")
colored_text = colored_text.replace('</table>', "")
colored_text = colored_text.replace(f"<td>{colorText.GREEN}","<td class='g'>")
colored_text = colored_text.replace(colorText.BOLD,"")
colored_text = colored_text.replace(f"<td>{colorText.GREEN}","<td class='g'>")
colored_text = colored_text.replace(f"<td>{colorText.FAIL}","<td class='r'>")
colored_text = colored_text.replace(f"<td>{colorText.WARN}","<td class='y'>")
colored_text = colored_text.replace(colorText.END,"")
Expand Down
2 changes: 1 addition & 1 deletion readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down

0 comments on commit f226025

Please sign in to comment.