Skip to content

Commit

Permalink
v12.01 release
Browse files Browse the repository at this point in the history
  • Loading branch information
sazid committed Jul 16, 2020
1 parent 18e2e57 commit 45ab63c
Show file tree
Hide file tree
Showing 15 changed files with 108 additions and 141 deletions.
100 changes: 13 additions & 87 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,89 +1,15 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
.idea/
Crossplatform/__pycache__/
Install_Zeuz_Node_Logs.log
TestNode_Android_Logs.log
TestNode_Core_Logs.log
TestNode_PerformanceTest_Logs.log
Windows/__pycache__/
Zeuz_Node/Install_Zeuz_Node.py.bak
Zeuz_Node/__pycache__/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# IPython Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject
master.zip
Mac/__pycache__/
Linux/__pycache__/
*env/
6 changes: 3 additions & 3 deletions Linux/TestNode_CoreSetup_Linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

# Libraries and modules to be installed
apt_get_module_list = ["python3-pip", "python3-tk", "python3-setuptools", "libxss1", "libappindicator1",
"libindicator7" , "python3-gi", "curl","python3-pyaudio"]
"libindicator7" , "python3-gi", "curl","python3-pyaudio", "unixodbc", "unixodbc-dev"]
pip_module_list = ["pip", "psutil", "pillow", "pyserial", "python-dateutil", "numpy", "urllib3", "selenium",
"uiautomator", "requests", "wheel","colorama",
"uiautomator", "requests", "wheel","colorama", "pyodbc",
"pyautogui", "Appium-Python-Client", "lxml", "pyscreenshot", "futures", "image",
"tzlocal", "pyautocad", "PyPDF2",
"tzlocal", "pyautocad", "PyPDF2", "webdrivermanager",
"pyshortcuts", "datefinder", "regex","pyttsx3"]

# Commands that help with installation
Expand Down
53 changes: 28 additions & 25 deletions Mac/TestNode_AndroidSetup_Mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

install_str = "pip3 install -U"



# Installation function
def install(type = "", module_name = "", module_version = None, cmd = ""):
command = ""
Expand All @@ -26,33 +24,44 @@ def install(type = "", module_name = "", module_version = None, cmd = ""):
print(output)
print((78 * '-'))

def Installer_With_Pip():
# install pip

def basic_installation():
#node
try:
install(cmd="brew install node")
except:
print("Unable to install node")

# Install java
try:
install(cmd="sudo easy_install pip")
install(cmd="brew cask install adoptopenjdk")
except:
print("Unable to install pip")

print("Unable to install adoptopenjdk (Java)")

def basic_installation():
#brew
# Set JAVA_HOME variable
try:
install(cmd='/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"')
print("Setting JAVA_HOME for Bash (~/.bashrc)")
output = os.system('echo "export JAVA_HOME=`/usr/libexec/java_home`" >> ~/.bashrc')
print(output)

print("Setting JAVA_HOME for ZSH (~/.zshrc)")
output = os.system('echo "export JAVA_HOME=`/usr/libexec/java_home`" >> ~/.zshrc')
print(output)
except:
print("Unable to install brew")
#node
print("Unable to set JAVA_HOME variable. You may not be able to run Android automation if this is not set properly")

# ADB for android
try:
install(cmd="brew install node")
install(cmd="brew cask install android-platform-tools")
except:
print("Unable to install node")

#appium
print("Unable to install adb. Zeuz Node will be unable to detect devices if adb is not working.")

try:
install(cmd="npm install -g appium@1.4.16")
except:
print("Unable to install appium")


class Logger(object):
def __init__(self):
self.terminal = sys.stdout
Expand All @@ -65,20 +74,14 @@ def write(self, message):
def close(self):
self.log.close()


def main():
sys.stdout = Logger()

## Install PIP
print((78 * '-'))
print ('Python PIP Installation')
print((78 * '-'))

## Install PIP modules
# Installer_With_Pip()

basic_installation()

sys.stdout.close()

if __name__=="__main__":
main()

11 changes: 6 additions & 5 deletions Mac/TestNode_CoreSetup_Mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
brew_str = "/usr/local/bin/brew install"

pip_module_list = ["pip", "psutil", "pillow", "pyserial", "colorama", "numpy", "simplejson", "urllib3", "selenium",
"python-dateutil",
"python-dateutil", "pyodbc", "webdrivermanager",
"requests", "wheel", "pyautogui", "Appium-Python-Client","uiautomator", "lxml",
"tzlocal","futures","xlwings","image", "tzlocal","pyautocad", "PyPDF2", "pyshortcuts", "datefinder", "regex","pyttsx3","pyaudio"
"tzlocal","futures","xlwings","image", "tzlocal","pyautocad", "PyPDF2", "pyshortcuts", "datefinder", "regex","pyttsx3","pyaudio",
"imutils", "scikit-image", "opencv-python", "opencv-contrib-python",
"https://github.com/AutomationSolutionz/PyGetWindow-0.0.5/archive/master.zip"]
pip_only_mac = ["appscript"]
brew_module_list = ["wget", "wxmac", 'geckodriver',"portaudio"]
brew_module_list = ["wget", "wxmac", "geckodriver", "portaudio"]

def check_if_ran_with_sudo():
global sudo_pass
Expand All @@ -44,7 +45,7 @@ def check_if_ran_with_sudo():
command = "echo 'sudo check'"
p = os.system('echo "%s"|sudo -S %s' % (passwd, command)) # Issue: if shell has sudo permissions already, but user starts script without sudo, this will pass with the wrong password, because sudo won't ask for it
if p == 256:
print("You didnt enter the correct sudo password. Chances left: %s"%(max_try-counter-1))
print("You didn't enter the correct sudo password. Chances left: %s"%(max_try-counter-1))
counter = counter+1
else:
print("sudo authentication verified!")
Expand Down Expand Up @@ -172,7 +173,7 @@ def Install_Brew():
# brew Need to implement if brew is already implemented
try:
sys.stdout.write("Installing: Brew\n", True)
brew_string = 'echo "%s" | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"' % sudo_pass
brew_string = 'echo "%s" | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"' % sudo_pass
print(os.system(brew_string))
print("Successfully installed brew")
except:
Expand Down
4 changes: 4 additions & 0 deletions Mac/TestNode_iosSetup_Mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
sudo_pass = ''
logfile = "TestNode_iOS_Logs.log"

# Create log file if it doesn't exist already
if not os.path.exists(logfile):
with open(logfile, 'w'): pass

try:
import subprocess # We need commands to do anything, so if it's not installed, use subprocess to install it first
except:
Expand Down
6 changes: 3 additions & 3 deletions Version.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Python Setup]
version = 5.3
version = 5.4
[Release Date]
date= 2020-03-04
date= 2020-05-24
[Release Note]
Note = alexa and google speech to text
Note = Add pyodbc support for database testing
15 changes: 1 addition & 14 deletions Windows/TestNode_AndroidSetup_Windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ def Get_Home_Dir():
sys.stdout.error("\tAn error occurred. See log for more details: %s\n"%Error_Detail, True)
return False






def Download_File(base_url, file_name,md5=False):
try:

Expand All @@ -150,18 +145,13 @@ def Download_File(base_url, file_name,md5=False):

file_url = base_url + file_name
download_path = Get_Home_Dir()+os.sep + 'Downloads' + os.sep + file_name

download_path_complete = CommonUtils.Download_File(file_url, download_path)


'''
some times files gets corrpt and we need to re-download
if os.path.isfile(download_path):
#print "already downloading... skipping download"
sys.stdout.write("already downloading... skipping download", True)
return download_path
'''
'''
r = requests.get(file_url, stream=True)
path = download_path
with open(path, 'wb') as f:
Expand All @@ -171,11 +161,8 @@ def Download_File(base_url, file_name,md5=False):
f.write(chunk)
f.flush()
f.close()
'''
sys.stdout.write("Download completed", True)
return download_path_complete

return download_path
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
Expand Down
4 changes: 2 additions & 2 deletions Windows/TestNode_CoreSetup_Windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ def Installer_With_Pip():

pip_module_list = ["pip", "clint", "pillow", "setuptools", "pyserial", "numpy", "simplejson", "urllib3",
"selenium", "uiautomator", "requests", "wheel", "pyautogui", "lxml",
"SpeechRecognition","colorama",
"SpeechRecognition","colorama", "pyodbc",
"python-dateutil", "Appium-Python-Client", "futures", "xlwings", "image", "tzlocal", "pyautocad",
"PyPDF2",
"PyPDF2", "webdrivermanager",
"pyshortcuts", "datefinder", "regex","pyttsx3==2.71",
"https://github.com/AutomationSolutionz/InstallerHelperFiles/raw/master/Windows/PyAudio-0.2.11-cp38-cp38-win32.whl",
"https://github.com/AutomationSolutionz/PyGetWindow-0.0.5/archive/master.zip",
Expand Down
4 changes: 2 additions & 2 deletions ZeuZ_Node_Installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ def execute(self):
time.sleep(1) # Allow enough time for read_log() to detect the module is finished and exit (prevent concurrent after()'s)
self.module = installer.replace('.py', '') # Create module name from filename
module = importlib.import_module(self.module) # Import module (path set above)
if sys.platform == 'win32': module.main(True) # Execute installer in GUI mode (Permissions already elevated)
else: module.main(self.password.get()) # Execute installer in GUI mode and send root password
if sys.platform == 'win32': module.main() # Execute installer in GUI mode (Permissions already elevated)
else: module.main() # Execute installer in GUI mode and send root password
q.put('----------------------------------------\n%s - End\n----------------------------------------\n\n' % installer)
time.sleep(1) # Allow enough time for read_log() to read off the last log lines

Expand Down
22 changes: 22 additions & 0 deletions poster3/poster.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Metadata-Version: 1.1
Name: poster
Version: 0.8.1
Summary: Streaming HTTP uploads and multipart/form-data encoding
Home-page: http://atlee.ca/software/poster
Author: Chris AtLee
Author-email: chris@atlee.ca
License: MIT
Download-URL: http://atlee.ca/software/poster/dist/0.8.1
Description: The modules in the Python standard library don't provide a way to upload large
files via HTTP without having to load the entire file into memory first.

poster provides support for both streaming POST requests as well as
multipart/form-data encoding of string or file parameters
Keywords: python http post multipart/form-data file upload
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
15 changes: 15 additions & 0 deletions poster3/poster.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
MANIFEST.in
setup.py
poster/__init__.py
poster/encode.py
poster/streaminghttp.py
poster.egg-info/PKG-INFO
poster.egg-info/SOURCES.txt
poster.egg-info/dependency_links.txt
poster.egg-info/requires.txt
poster.egg-info/top_level.txt
poster.egg-info/zip-safe
tests/__init__.py
tests/test_encode.py
tests/test_server.py
tests/test_streaming.py
1 change: 1 addition & 0 deletions poster3/poster.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

5 changes: 5 additions & 0 deletions poster3/poster.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


[poster]
buildutils
sphinx
2 changes: 2 additions & 0 deletions poster3/poster.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tests
poster
1 change: 1 addition & 0 deletions poster3/poster.egg-info/zip-safe
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 45ab63c

Please sign in to comment.