diff --git a/.github/workflows/squash.py b/.github/workflows/squash.py index 35821c3..9fe5f55 100644 --- a/.github/workflows/squash.py +++ b/.github/workflows/squash.py @@ -1,41 +1,45 @@ from time import sleep import os -c_msg = "GitHub Action Workflow - Market Data Download (Default Config)" +try: + c_msg = "GitHub Action Workflow - Market Data Download (Default Config)" -print("[+] === SQUASHING COMMITS : actions-data-download branch ===") -print("[+] Saving Commit messages log..") -os.system("git log --pretty=oneline > msg.log") + print("[+] === SQUASHING COMMITS : actions-data-download branch ===") + print("[+] Saving Commit messages log..") + os.system("git log --pretty=oneline > msg.log") -sleep(5) + sleep(5) -lines = None -with open('msg.log','r') as f: - lines = f.readlines() + lines = None + with open('msg.log','r') as f: + lines = f.readlines() + + cnt = 0 + for l in lines: + if c_msg in l: + cnt += 1 + else: + commit_hash = l.split(" ")[0] + cnt -= 1 + break -cnt = 0 -for l in lines: - if c_msg in l: - cnt += 1 - else: - commit_hash = l.split(" ")[0] - cnt -= 1 - break + print(f"[+] Reset at HEAD~{cnt}") + print(f"[+] Reset hash = {commit_hash}") + print(f"git reset --soft {commit_hash}") + print(f"git commit -m '{c_msg}'") -print(f"[+] Reset at HEAD~{cnt}") -print(f"[+] Reset hash = {commit_hash}") -print(f"git reset --soft {commit_hash}") -print(f"git commit -m '{c_msg}'") + if cnt < 1: + print("[+] No Need to Squash! Skipping...") + else: + os.system(f"git reset --soft HEAD~{cnt}") + os.system(f"git commit -m '{c_msg}'") + os.system(f"git push -f") -if cnt < 1: - print("[+] No Need to Squash! Skipping...") -else: - os.system(f"git reset --soft HEAD~{cnt}") - os.system(f"git commit -m '{c_msg}'") - os.system(f"git push -f") + os.remove("msg.log") + sleep(5) -os.remove("msg.log") -sleep(5) + print("[+] === SQUASHING COMMITS : DONE ===") -print("[+] === SQUASHING COMMITS : DONE ===") \ No newline at end of file +except Exception as e: + print(f"Error while squashing commits - Skipping this step!\n{e}") \ No newline at end of file diff --git a/.github/workflows/workflow-download-data.yml b/.github/workflows/workflow-download-data.yml index 1999540..4d29dcc 100644 --- a/.github/workflows/workflow-download-data.yml +++ b/.github/workflows/workflow-download-data.yml @@ -74,4 +74,4 @@ jobs: git config user.email github-actions@github.com git fetch git checkout actions-data-download - python .github/workflows/squash.py \ No newline at end of file + python .github/workflows/squash.py diff --git a/actions-data-download/stock_data_140823.pkl b/actions-data-download/stock_data_140823.pkl new file mode 100644 index 0000000..bb05db9 Binary files /dev/null and b/actions-data-download/stock_data_140823.pkl differ diff --git a/src/classes/Changelog.py b/src/classes/Changelog.py index 973f2f1..37c241d 100644 --- a/src/classes/Changelog.py +++ b/src/classes/Changelog.py @@ -7,7 +7,7 @@ from classes.ColorText import colorText -VERSION = "1.44" +VERSION = "1.45" changelog = colorText.BOLD + '[ChangeLog]\n' + colorText.END + colorText.BLUE + ''' [1.00 - Beta] @@ -196,5 +196,8 @@ [1.44] 1. Migrated ta-lib dependency to pandas_ta +[1.45] +1. Minor bug fixes after dependency change + --- END --- ''' + colorText.END diff --git a/src/classes/ParallelProcessing.py b/src/classes/ParallelProcessing.py index 38742fa..54a94a2 100644 --- a/src/classes/ParallelProcessing.py +++ b/src/classes/ParallelProcessing.py @@ -143,8 +143,10 @@ def screenStocks(self, executeOption, reversalOption, maLength, daysForLowestVol except np.RankWarning: screeningDictionary['Trend'] = 'Unknown' saveDictionary['Trend'] = 'Unknown' - isCandlePattern = candlePatterns.findPattern( - processedData, screeningDictionary, saveDictionary) + + with SuppressOutput(suppress_stderr=True, suppress_stdout=True): + isCandlePattern = candlePatterns.findPattern( + processedData, screeningDictionary, saveDictionary) isConfluence = False isInsideBar = False diff --git a/src/release.md b/src/release.md index 3995857..f360f3c 100644 --- a/src/release.md +++ b/src/release.md @@ -15,9 +15,9 @@ Celebrating more than 6K+ Downloads - Thank You for your support :tada: ## Downloads | Operating System | Executable File | | :-: | --- | - | ![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white) | **[screenipy.exe](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.44/screenipy.exe)** | -| ![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) | **[screenipy.bin](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.44/screenipy.bin)** | -| ![Mac OS](https://img.shields.io/badge/mac%20os-D3D3D3?style=for-the-badge&logo=apple&logoColor=000000) | **[screenipy.run](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.44/screenipy.run)** ([Read Installation Guide](https://github.com/pranjal-joshi/Screeni-py/blob/main/INSTALLATION.md#for-macos)) | + | ![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white) | **[screenipy.exe](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.45/screenipy.exe)** | +| ![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) | **[screenipy.bin](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.45/screenipy.bin)** | +| ![Mac OS](https://img.shields.io/badge/mac%20os-D3D3D3?style=for-the-badge&logo=apple&logoColor=000000) | **[screenipy.run](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.45/screenipy.run)** ([Read Installation Guide](https://github.com/pranjal-joshi/Screeni-py/blob/main/INSTALLATION.md#for-macos)) | ## How to use? diff --git a/src/screenipy.py b/src/screenipy.py index 3fad4ad..fbb1cda 100644 --- a/src/screenipy.py +++ b/src/screenipy.py @@ -431,9 +431,9 @@ def main(testing=False, testBuild=False, downloadOnly=False): while True: main() except Exception as e: - raise e + # raise e if isDevVersion == OTAUpdater.developmentVersion: raise(e) input(colorText.BOLD + colorText.FAIL + "[+] Press any key to Exit!" + colorText.END) - sys.exit(0) + sys.exit(1)