Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
omwn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lexworkers
omwn
Commits
9d9a13be
Commit
9d9a13be
authored
Nov 6, 2023
by
Łukasz Szwed
Browse files
Options
Downloads
Patches
Plain Diff
Fix style
parent
5bcfe6eb
No related branches found
No related tags found
1 merge request
!6
Develop
Pipeline
#14645
passed
Nov 6, 2023
Stage: check_style
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+11
-5
11 additions, 5 deletions
.gitlab-ci.yml
Dockerfile
+1
-1
1 addition, 1 deletion
Dockerfile
main.py
+1
-30
1 addition, 30 deletions
main.py
src/omwn_worker.py
+2
-1
2 additions, 1 deletion
src/omwn_worker.py
with
15 additions
and
37 deletions
.gitlab-ci.yml
+
11
−
5
View file @
9d9a13be
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Dockerfile
+
1
−
1
View file @
9d9a13be
...
...
@@ -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"]
This diff is collapsed.
Click to expand it.
main.py
+
1
−
30
View file @
9d9a13be
"""
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
)
This diff is collapsed.
Click to expand it.
src/omwn_worker.py
+
2
−
1
View file @
9d9a13be
"""
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__
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment