Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename classes, variables and methods according to PEP-8 conventions #7

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading