Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas-flavor-tagging-tools
algorithms
Umami
Commits
7e61a0b4
Commit
7e61a0b4
authored
Feb 03, 2020
by
Manuel Guth
Browse files
switching to slim docker images and correcting linter errors
parent
b7658bf2
Pipeline
#1386511
passed with stage
in 2 minutes
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
7e61a0b4
...
...
@@ -4,14 +4,14 @@ stages:
unittest
:
stage
:
test
image
:
python:3.7
image
:
python:3.7
-slim
script
:
-
pip install -r requirements.txt
-
pytest ./umami/tests/ -v
linter
:
stage
:
test
image
:
python:3.7
image
:
python:3.7
-slim
allow_failure
:
true
script
:
-
pip install flake8
...
...
umami/preprocessing.py
View file @
7e61a0b4
...
...
@@ -6,7 +6,7 @@ import pandas as pd
import
argparse
import
yaml
from
umami.tools
import
yaml_loader
import
json
#
import json
def
GetParser
():
...
...
@@ -191,7 +191,7 @@ def GetScaleDict(args):
w
=
np
.
ones
(
len
(
X
)),
varname
=
var
,
custom_defaults_vars
=
variable_config
[
"custom_defaults_vars"
])
scale_dict
.
append
(
upt
.
dict_in
(
*
dict_entry
))
# save scale/shift dictionary to json file
# scale_name = '%s/%s.json' % (args.dict_dir, args.dict_file)
# with open(scale_name, 'w') as outfile:
...
...
umami/tests/test_preprocessing.py
View file @
7e61a0b4
...
...
@@ -28,18 +28,15 @@ class PreprocessingTestParser(unittest.TestCase):
parser
=
GetParser
()
self
.
assertEqual
(
parser
.
config_file
,
self
.
config_file
)
self
.
assertFalse
(
parser
.
tracks
)
# self.assertIsNone(parser.cut_config_file)
# @mock.patch('argparse.ArgumentParser.parse_args',
# return_value=argparse.Namespace(config_file=config_file,
# tracks=True))
# def test_ParserTracks(self, mock_args):
# self.parser = GetParser()
# self.assertTrue(self.parser.tracks)
# @mock.patch('argparse.ArgumentParser.parse_args',
# return_value=argparse.Namespace(config_file=config_file,
# undersampling=True))
# def test_ParserTracks(self, mock_args):
# self.parser = GetParser()
# self.assertTrue(self.parser.tracks)
class
PreprocessingTestGetScaleDict
(
unittest
.
TestCase
):
"""
Test the implementation of the GetScaleDict function.
"""
config_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_preprocess_config.yaml"
)
def
setUp
(
self
):
self
.
config_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_preprocess_config.yaml"
)
umami/tests/test_preprocessing_tools.py
View file @
7e61a0b4
...
...
@@ -265,4 +265,3 @@ class GetScalesTestCase(unittest.TestCase):
self
.
assertEqual
(
average
,
1
)
self
.
assertEqual
(
std
,
0
)
self
.
assertEqual
(
default
,
1
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment