-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix mg_graph for the usage under ANALYTICAL mode #220
base: main
Are you sure you want to change the base?
Changes from all commits
6d72863
333746d
fe61d38
f7d7f49
b93d518
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 |
---|---|---|
|
@@ -32,6 +32,25 @@ HELP_MESSAGE = """\ | |
For usage info run: python3 setup -h | ||
""" | ||
|
||
class Lang(Enum): | ||
PYTHON = "Python" | ||
CPP = "Cpp" | ||
RUST = "Rust" | ||
|
||
@staticmethod | ||
def from_str(lang_str): | ||
if lang_str.lower() == "python": | ||
return Lang.PYTHON | ||
elif lang_str.lower() == "cpp": | ||
return Lang.CPP | ||
elif lang_str.lower() == "rust": | ||
return Lang.RUST | ||
else: | ||
raise BaseException("Wrong value for the lang parameter.") | ||
|
||
Comment on lines
+35
to
+50
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. This is part of different PR, right? 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, this is just merged here to make use of it, but in the end this won't be part of this PR 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. here #226 |
||
def __str__(self): | ||
return str(self.value) | ||
|
||
class BuildType(Enum): | ||
DEBUG = "Debug" | ||
RELEASE = "Release" | ||
|
@@ -42,6 +61,7 @@ class BuildType(Enum): | |
class Parameter(Enum): | ||
GPU = "gpu" | ||
CPP_BUILD_FLAGS = "cpp_build_flags" | ||
LANG = "lang" | ||
PATH = "path" | ||
TYPE = "type" | ||
|
||
|
@@ -57,6 +77,14 @@ def get_arguments(): | |
build_args_parser.add_argument( | ||
"-p", "--path", help="Path to query modules directory", required=False | ||
) | ||
build_args_parser.add_argument( | ||
"--lang", | ||
help="Programming languages to build", | ||
nargs='*', | ||
type=Lang.from_str, | ||
choices=Lang, | ||
default=list(Lang), | ||
) | ||
build_args_parser.add_argument( | ||
"--type", | ||
help="Build type", | ||
|
@@ -265,18 +293,20 @@ def build(args:Dict[str, Any])->bool: | |
os.makedirs(MAGE_BUILD_DIRECTORY, exist_ok=True) | ||
copytree(LICENCE_DIRECTORY, MAGE_BUILD_DIRECTORY) | ||
|
||
|
||
cpp_status = build_and_copy_cpp_modules(args) | ||
if not cpp_status: | ||
return False | ||
if Lang.CPP in args[Parameter.LANG.value]: | ||
cpp_status = build_and_copy_cpp_modules(args) | ||
if not cpp_status: | ||
return False | ||
|
||
python_status = copy_python_modules() | ||
if not python_status: | ||
return False | ||
if Lang.PYTHON in args[Parameter.LANG.value]: | ||
python_status = copy_python_modules() | ||
if not python_status: | ||
return False | ||
|
||
rust_status = build_and_copy_rust_modules(args) | ||
if not rust_status: | ||
return False | ||
if Lang.RUST in args[Parameter.LANG.value]: | ||
rust_status = build_and_copy_rust_modules(args) | ||
if not rust_status: | ||
return False | ||
|
||
return True | ||
|
||
|
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.
In
community_detection_online
it seems to me there isUpdate
function which should propagate changes to graph. I will have a sync with @antepusic to check what is happening on Monday and to have sync about the return value.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.
@gitbuda I am waiting @antepusic to return and when we sync we will update you here