Skip to content
Snippets Groups Projects
Commit 9d9a13be authored by Łukasz Szwed's avatar Łukasz Szwed
Browse files

Fix style

parent 5bcfe6eb
No related branches found
No related tags found
1 merge request!6Develop
Pipeline #14645 passed
......@@ -2,19 +2,27 @@ image: 'clarinpl/python:3.6'
cache:
paths:
- .tox
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
build_image:
stage: build
image: 'docker:18.09.7'
......@@ -23,8 +31,6 @@ build_image:
- gitlab-registry
services:
- 'docker:18.09.7-dind'
before_script:
- ''
script:
- docker build -t $CI_REGISTRY_IMAGE .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
......
......@@ -8,4 +8,4 @@ COPY ./info.json .
RUN python3.6 -m pip install -r requirements.txt
CMD ["python3.6", "main.py", "service"]
CMD ["python3.6", "main.py"]
"""Implementation of hask service."""
import argparse
import lex_ws
from src.omwn_worker import OMWNWorker
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(OMWNWorker),
}
gen_fn = generators.get(args.algorithm, lambda: None)
gen_fn()
if __name__ == "__main__":
main()
lex_ws.LexService.main(OMWNWorker)
"""Implementation of omwn_worker."""
import logging
import json
import logging
import lex_ws
import nltk
from nltk.corpus import wordnet as wn
my_logger = logging.getLogger(__name__)
_log = logging.getLogger(__name__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment