Commit 7e61a0b4 authored by Manuel Guth's avatar Manuel Guth
Browse files

switching to slim docker images and correcting linter errors

parent b7658bf2
Pipeline #1386511 passed with stage
in 2 minutes
......@@ -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
......
......@@ -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:
......
......@@ -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")
......@@ -265,4 +265,3 @@ class GetScalesTestCase(unittest.TestCase):
self.assertEqual(average, 1)
self.assertEqual(std, 0)
self.assertEqual(default, 1)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment