Skip to content

Commit

Permalink
Merge pull request #7 from amila-desilva/features/32026-pep8
Browse files Browse the repository at this point in the history
Rename classes, variables and methods according to PEP-8 conventions
  • Loading branch information
amila-desilva authored Jun 14, 2024
2 parents e958fef + 3c8e816 commit 6a9f731
Show file tree
Hide file tree
Showing 5 changed files with 431 additions and 425 deletions.
19 changes: 10 additions & 9 deletions examples/work_unit_hello_world.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import os
from pyhpcc.auth import auth
from pyhpcc.models import hpcc
from pyhpcc.models import workunit_submit as ws

from pyhpcc.auth import Auth
from pyhpcc.models import HPCC
from pyhpcc.models import WorkunitSubmit as ws

# Configurations
environment = "<Your environment url>" # Eg: myuniversity.hpccsystems.io
Expand All @@ -17,25 +18,25 @@
working_folder = os.getcwd() # Folder to generate .ecl, .eclxml, .eclxml.xml

try:
auth_object = auth(
auth_object = Auth(
environment,
port,
user_name,
password,
require_auth=required_auth,
protocol=protocol,
)
hpcc_object = hpcc(auth=auth_object)
hpcc_object = HPCC(auth=auth_object)
work_s = ws(hpcc_object, cluster, cluster)
file_name = work_s.create_filename(
QueryText=ecl_query, working_folder=working_folder, Jobname=job_name
file_name = work_s.create_file_name(
query_text=ecl_query, working_folder=working_folder, Jobname=job_name
)
output, output_file = work_s.bash_compile(filename=file_name, gitrepository="")
output, output_file = work_s.bash_compile(file_name=file_name, git_repository="")
if str(output).find("error") == -1:
output, error = work_s.bash_run(output_file, cluster=cluster)
index = str(output).find("running")
wuid = str(output)[: index - 1]
_ = work_s.WUWaitComplete(wuid)
_ = work_s.wu_wait_complete(wuid)
else:
print(str(output))
print(f"{wuid} submitted successfully")
Expand Down
Loading

0 comments on commit 6a9f731

Please sign in to comment.