Melodi Integration 0.0.1 - #16
Draft
fipsi7 wants to merge 4 commits into
Draft
Conversation
fipsi7
marked this pull request as draft
October 20, 2023 08:26
| MelodiPort = returnDict.get("PluginParameter").get(plugin_name).get("port") | ||
|
|
||
| api_con = api_vels_ob.Configuration() | ||
| api_con.host = "{}:{}/api".format(MelodiURL, MelodiPort) |
Member
There was a problem hiding this comment.
Alternative would be f-string, since Python 3.6:
api_con.host = f"{MelodiURL}:{MelodiPort}/api"
|
|
||
| try: | ||
| config.read_file(open(opts.configfile)) | ||
| config.readfp(open(opts.configfile)) |
Member
There was a problem hiding this comment.
readfp has been deprecated since Python 3.2 and was removed in Python 3.12 (October 2023). The function that shall be used is read_file
| if [ -z "$2" ] | ||
| then | ||
| python3 autosub.py & | ||
| python3 autosub.py & |
| echo "Started autosub with process id $PID" | ||
| else | ||
| python3 autosub.py --config-file $2 & | ||
| python3 autosub.py --config-file $2 & |
| json_data = { | ||
| "Subject" : "Synthesis Result for Task{}".format(str(task_nr)), | ||
| "Message" : server +":" + str(port) + "/"+str(user_id), | ||
| "Message" : server + ":" + str(port) + "/" + str(user_id), |
Member
There was a problem hiding this comment.
Could be done better with f-string
"{server}:{port}/{user_id}"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added the Melodi API to the VELS plugin. It is still WIP, but should work.