Skip to content

Commit 6a9f731

Browse files
Merge pull request #7 from amila-desilva/features/32026-pep8
Rename classes, variables and methods according to PEP-8 conventions
2 parents e958fef + 3c8e816 commit 6a9f731

File tree

5 files changed

+431
-425
lines changed

5 files changed

+431
-425
lines changed

examples/work_unit_hello_world.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import os
2-
from pyhpcc.auth import auth
3-
from pyhpcc.models import hpcc
4-
from pyhpcc.models import workunit_submit as ws
2+
3+
from pyhpcc.auth import Auth
4+
from pyhpcc.models import HPCC
5+
from pyhpcc.models import WorkunitSubmit as ws
56

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

1920
try:
20-
auth_object = auth(
21+
auth_object = Auth(
2122
environment,
2223
port,
2324
user_name,
2425
password,
2526
require_auth=required_auth,
2627
protocol=protocol,
2728
)
28-
hpcc_object = hpcc(auth=auth_object)
29+
hpcc_object = HPCC(auth=auth_object)
2930
work_s = ws(hpcc_object, cluster, cluster)
30-
file_name = work_s.create_filename(
31-
QueryText=ecl_query, working_folder=working_folder, Jobname=job_name
31+
file_name = work_s.create_file_name(
32+
query_text=ecl_query, working_folder=working_folder, Jobname=job_name
3233
)
33-
output, output_file = work_s.bash_compile(filename=file_name, gitrepository="")
34+
output, output_file = work_s.bash_compile(file_name=file_name, git_repository="")
3435
if str(output).find("error") == -1:
3536
output, error = work_s.bash_run(output_file, cluster=cluster)
3637
index = str(output).find("running")
3738
wuid = str(output)[: index - 1]
38-
_ = work_s.WUWaitComplete(wuid)
39+
_ = work_s.wu_wait_complete(wuid)
3940
else:
4041
print(str(output))
4142
print(f"{wuid} submitted successfully")

0 commit comments

Comments
 (0)