-
Notifications
You must be signed in to change notification settings - Fork 28
CONCORE for Windows enabled #50
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
Changes from all commits
e63c7de
9b46d89
43f44a3
c39f076
2988d24
4fb1706
4bbd5e1
9042a11
ef10dc3
b30493c
409aa3b
16cdebb
f3b7289
38ea218
1fe53f6
6552dfe
0d3ef01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,37 +23,37 @@ def build(dir, graphml, apikey): | |
| print(response.text) | ||
|
|
||
| # function to debug | ||
| def debug(graphml): | ||
| url = "http://127.0.0.1:5000/debug/"+graphml | ||
| def debug(graphml, apikey): | ||
| url = "http://127.0.0.1:5000/debug/"+graphml+"?"+"apikey="+apikey | ||
| response = requests.request("POST", url) | ||
| print(response.text) | ||
|
|
||
| # function to test run() method. | ||
| def run(graphml): | ||
| url = "http://127.0.0.1:5000/run/"+graphml | ||
| def run(graphml, apikey): | ||
| url = "http://127.0.0.1:5000/run/"+graphml+"?"+"apikey="+apikey | ||
| response = requests.request("POST", url) | ||
| print(response.text) | ||
|
|
||
| def clear(graphml): | ||
| url = "http://127.0.0.1:5000/clear/"+graphml | ||
| def clear(graphml, apikey): | ||
| url = "http://127.0.0.1:5000/clear/"+graphml+"?"+"apikey="+apikey | ||
| response = requests.request("POST", url) | ||
| print(response.text) | ||
|
|
||
| def stop(graphml): | ||
| url = "http://127.0.0.1:5000/stop/"+graphml | ||
| def stop(graphml, apikey): | ||
| url = "http://127.0.0.1:5000/stop/"+graphml+"?"+"apikey="+apikey | ||
| response = requests.request("POST", url) | ||
| print(response.text) | ||
|
|
||
|
|
||
| #function to destroy dir. | ||
| def destroy(dir): | ||
| url = "http://127.0.0.1:5000/destroy/" + dir | ||
| def destroy(dir, apikey): | ||
| url = "http://127.0.0.1:5000/destroy/" + dir+"?"+"apikey="+apikey | ||
| response = requests.request("DELETE", url) | ||
|
|
||
| print(response.text) | ||
|
|
||
| def getFilesList(dir, sub_dir = ""): | ||
| url = "http://127.0.0.1:5000/getFilesList/" + dir + "?"+"fetch="+sub_dir | ||
| def getFilesList(apikey, dir, sub_dir = ""): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In your other methods, apikey was the last argument. Please keep the consistency and leave it as the last argument.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
So one problem is there in doing so as non-default arguments cannot be followed by default arguments. There are few fixes of this problem to maintain consistency:
I will implement one of them after getting conformation.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, as long as you keep the changes to FRI and ensure your follow-up changes do not break any of the progress that you have made in this integration, it is cool. We can always go incrementally. |
||
| url = "http://127.0.0.1:5000/getFilesList/" + dir + "?"+"fetch="+sub_dir+"&"+"apikey="+apikey | ||
| response = requests.request("POST", url) | ||
| print(response.text) | ||
|
|
||
|
|
@@ -63,8 +63,8 @@ def openJupyter(): | |
| print(response.text) | ||
|
|
||
| # function to test download() method. | ||
| def download(dir, subDir, fileName ): | ||
| url = "http://127.0.0.1:5000/download/"+dir+"?"+"fetchDir="+subDir+"&"+"fetch="+ fileName | ||
| def download(dir, subDir, fileName , apikey ): | ||
| url = "http://127.0.0.1:5000/download/"+dir+"?"+"fetchDir="+subDir+"&"+"fetch="+ fileName+"&"+"apikey="+apikey | ||
| urllib.request.urlretrieve(url, fileName) | ||
|
|
||
| # file list to be uploaded | ||
|
|
@@ -90,18 +90,18 @@ def download(dir, subDir, fileName ): | |
| time.sleep(6) | ||
| method = input("methods - 1 for debug, 0 for run :") | ||
| if method == "1": | ||
| debug("sample") | ||
| debug("sample", "xyz") | ||
| else: | ||
| run("sample") | ||
| run("sample", "xyz") | ||
| time.sleep(2) | ||
| stop("sample") | ||
| stop("sample", "xyz") | ||
| time.sleep(2) | ||
| getFilesList("sample", "cu") | ||
| getFilesList("sample", "pym") | ||
| getFilesList("xyz", "sample", "CU") | ||
| getFilesList("xyz","sample", "PYM") | ||
| time.sleep(5) | ||
| download("sample", "cu", "u") | ||
| clear("sample") | ||
| destroy("sample") | ||
| download("sample", "CU", "u", "xyz") | ||
| clear("sample", "xyz") | ||
| destroy("sample", "xyz") | ||
| openJupyter() | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually intentional. Although not properly implemented yet, the rationale is to have a Kong API gateway (you can see it in the Dockerfile) to sit in front of the FRI.
So, based on an API key, a folder is created. In a server deployment, many users will access FRI with an API key. So, you can have a folder name "test" and I also can have the same folder name. With the API key in place, such parallel server execution (which we do not use much at this point) is allowed.
Pls do not remove this (from here or from test.py). But if you say there are methods that do not have this apikey in place, you should rather add the API key in place for those methods.
That way, for now, we can hard code "xyz" or whatever as an API key and eventually use an actual API key with the Kong - for the server deployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood @pradeeban I will be adding them. The sole purpose to remove them was at some paths only the dir_name was there without API key, but you answered that also. Now I will be adding them performing all tests and revert back to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, yes.
The fix is to either remove them altogether (which you did) or add them uniformly (which is a more future-proof method - because, in case of a missing API Key, we can always have an empty string or a default string. So nothing really breaks that way, whether we have Kong or not).