Commit ab3d1e27 authored by Xabi Crespo's avatar Xabi Crespo

Merge branch 'update-python-ci-image' into 'master'

Update of versions of the used tools with tox and in the CI build to the latest

See merge request crespum/polaris!91
parents 80331b54 08fd5890
Pipeline #130053135 passed with stages
in 8 minutes and 5 seconds
variables:
GITLAB_CI_IMAGE_PYTHON: 'python:3.7.4'
GITLAB_CI_PYPI_TOX: 'tox~=3.8.0'
GITLAB_CI_PYPI_TWINE: 'twine~=1.13.0'
GITLAB_CI_IMAGE_PYTHON: 'python:3.8.2'
GITLAB_CI_PYPI_TOX: 'tox==3.14.5'
GITLAB_CI_PYPI_TWINE: 'twine==3.1.1'
GITLAB_CI_IMAGE_NODE: 'node:12.13.1'
stages:
- static
......
......@@ -12,7 +12,6 @@ class Acrux1(Normalizer):
"""
The class providing equations for the satellite telemetry
"""
def __init__(self):
super(Acrux1, self).__init__()
self.normalizers = [ # pylint: disable=R0801
......
......@@ -14,7 +14,6 @@ class Normalizer:
Transforms frame values according to embedded equations
"""
def __init__(self):
self.normalizers = []
......
......@@ -12,7 +12,6 @@ class Lightsail2(Normalizer):
"""
The class providing equations for the satellite telemetry
"""
def __init__(self):
super(Lightsail2, self).__init__()
self.normalizers = [ # pylint: disable=R0801
......
......@@ -66,7 +66,6 @@ def build_date_arg(last_fetch_date=None):
:param last_fetch_date: Date of last successful fetch.
"""
def tformat(timestamp):
"""Standard format for time arguments
"""
......@@ -141,7 +140,7 @@ def maybe_run(cmd=None, config=None, dry_run=False):
LOGGER.debug(full_cmd)
if dry_run is True:
return
process_info = subprocess.run(full_cmd.split())
process_info = subprocess.run(full_cmd.split(), check=False)
log_batch_operation(config, full_cmd, process_info.returncode)
try:
......
......@@ -9,7 +9,6 @@ from polaris.common import constants
class JsonSerializable():
"""Class for JSON-serializable objects
"""
def to_json(self):
"""Write a dataset object to JSON.
"""
......
......@@ -12,7 +12,6 @@ from polaris.dataset.metadata import PolarisMetadata
class PolarisDataset(dict, JsonSerializable):
"""Class for dataset frames
"""
def __init__(self, metadata=None, frames=None):
"""Initialize a PolarisDataset object
......
......@@ -7,7 +7,6 @@ from polaris.common.json_serializable import JsonSerializable
class PolarisFrame(dict, JsonSerializable):
"""Class for Polaris frames
"""
def __init__(self, frame=None):
"""Initialize a Polaris Frame object
"""
......
......@@ -256,7 +256,6 @@ def write_or_merge(dataset, file, strategy):
strategy: overwrite, merge or error.
"""
def write_dataset(dataset, file):
with open(file, 'w') as f_handle:
f_handle.write(dataset.to_json())
......
......@@ -55,7 +55,7 @@ def heatmap_to_graph(heatmap,
if (np.isnan(mdict[source][target])
or isinstance(mdict[source][target], str)):
continue
elif mdict[source][target] >= graph_link_threshold:
if mdict[source][target] >= graph_link_threshold:
graph_dict[links_key].append({
source_key:
source,
......
......@@ -18,7 +18,6 @@ class FeatureImportanceOptimization(BaseEstimator, TransformerMixin):
augmentation (or distribution flattening).
"""
def __init__(self, list_of_transformers):
""" The constructor will help parameterize all options of this
transformer
......
......@@ -21,7 +21,6 @@ LOGGER = logging.getLogger(__name__)
class XCorr(BaseEstimator, TransformerMixin):
""" Cross Correlation predictor class
"""
def __init__(self, model_params=None):
"""
:param models: list of tuples (target column, model)
......
......@@ -20,7 +20,6 @@ WWW_DIR = "/tmp/"
class CustomHTTPHandler(http.server.SimpleHTTPRequestHandler):
""" HTTP Handler to serve viz directory """
def handle(self):
# pylint: disable=W0603
global WWW_DIR
......
......@@ -15,7 +15,6 @@ from polaris.fetch import data_fetch_decoder
class FixtureNormalizer(Normalizer):
"""Normalizer fixture for pytest
"""
def __init__(self):
super().__init__()
self.normalizers = [
......@@ -26,7 +25,6 @@ class FixtureNormalizer(Normalizer):
class FixtureNormalizerWithValidator(FixtureNormalizer):
"""Normalizer fixture with a validator
"""
def validate_frame(self, frame):
try:
return frame['fields']['src_callsign']['value'].lower() == 'a1b2c3'
......
......@@ -111,7 +111,6 @@ def test_extract_feature_importance(input_transformers):
:param input_transformers: fixtures for input transformers
"""
@dataclass
class FakeModel:
""" Fake Model object meant to hold the feature importance list only
......
......@@ -2,13 +2,13 @@
envlist = flake8,isort,yapf,pylint,build,pytest,prettier
[depversions]
flake8 = 3.7.7
flake8 = 3.7.9
isort = 4.3.21
yapf = 0.27.0
astroid = 2.2.5
pylint = 2.3.1
pytest = 4.4.2
pytest-cov = 2.7.1
yapf = 0.29.0
astroid = 2.3.3
pylint = 2.4.4
pytest = 5.4.1
pytest-cov = 2.8.1
pytest-mock = 2.0.0
[testenv:flake8]
......
Markdown is supported
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