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

SIO3Pack integration #288

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

SIO3Pack integration #288

wants to merge 6 commits into from

Conversation

MasloMaslane
Copy link
Member

No description provided.

Comment on lines 18 to 19
config = get_config()
if "sinol_task_id" in config:
return config["sinol_task_id"]
else:
print(util.warning("sinol_task_id not specified in config.yml. Using task id from directory name."))
task_id = os.path.split(os.getcwd())[-1]
if len(task_id) == 3:
return task_id
else:
util.exit_with_error("Invalid task id. Task id should be 3 characters long.")
return Sio3Package().get_task_id()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sinol_task_id in config should still be handled

Comment on lines 56 to 48
try:
with open(os.path.join(os.getcwd(), "config.yml"), "r") as config_file:
return yaml.load(config_file, Loader=yaml.FullLoader) or {}
except FileNotFoundError:
# Potentially redundant with util:exit_if_not_package
util.exit_with_error("You are not in a package directory (couldn't find config.yml in current directory).")
except yaml.YAMLError as e:
util.exit_with_error("config.yml is not a valid YAML. Fix it before continuing:\n" + str(e))
return Sio3Package().get_config()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no error handling:(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants