Skip to content
Snippets Groups Projects
Commit 1ddcd8ca authored by Damian Raczkowski's avatar Damian Raczkowski
Browse files

add template to gitlab-ci, update to new standard main invocation

parent 0d6ab195
No related branches found
No related tags found
1 merge request!5Develop
Pipeline #14505 passed
......@@ -8,15 +8,18 @@ stages:
- check_style
- build
.check_style_template:
before_script:
- pip install tox==2.9.1
pep8:
extends: .check_style_template
stage: check_style
script:
- tox -v -e pep8
docstyle:
extends: .check_style_template
stage: check_style
script:
- tox -v -e docstyle
......
......@@ -18,4 +18,4 @@ location_params = \
cmd = main_cmd + location_params
run(cmd, shell=True)
run(["python3.6", "main.py", "service"])
run(["python3.6", "main.py"])
"""Implementation of hask service."""
import argparse
import lex_ws
from src.word2vec_worker import W2vWorker
def get_args():
"""Gets command line arguments."""
parser = argparse.ArgumentParser(description="Topic Modeling")
subparsers = parser.add_subparsers(dest="algorithm")
subparsers.required = True
subparsers.add_parser(
"service",
help="Run as a service"
)
return parser.parse_args()
def main():
"""Runs the program."""
args = get_args()
generators = {
"service": lambda: lex_ws.LexService.main(W2vWorker),
}
gen_fn = generators.get(args.algorithm, lambda: None)
gen_fn()
if __name__ == "__main__":
main()
lex_ws.LexService.main(W2vWorker)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment