diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 696ba2e35a889596c461928120918a5356667f05..6a03d741d5e3ecbd16a429ee1c8b58ae5cdbdf74 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,12 +92,12 @@ integration_tests: - pytest test/integration --cov=lhcsmapi.api.analysis.qh --junitxml=report.xml --cov-report xml:cov.xml --cov-report term -type_checking: +mypy: stage: test script: - - pip install mypy + - pip install . + - pip install mypy pandas-stubs - mypy lhcsmqh - allow_failure: true build_wheel: stage: build diff --git a/lhcsmqh/analyses/commons.py b/lhcsmqh/analyses/commons.py index 56471439373fab385aee96d0e0f202a7e1a75a9c..f1ca719388371281f385137860892e91423922cc 100644 --- a/lhcsmqh/analyses/commons.py +++ b/lhcsmqh/analyses/commons.py @@ -10,13 +10,13 @@ from typing import Any import numpy as np import pandas as pd from lhcsmapi import reference -from lhcsmapi.analysis import comparison +from lhcsmapi.analysis import comparison # type: ignore from lhcsmapi.analysis import features_helper as utility_features from lhcsmapi.api import processing, query, resolver from lhcsmapi.metadata import signal_metadata from lhcsmapi.metadata.signal_metadata import CircuitType, GenericCircuitType -from lhcsmapi.pyedsl.dbsignal.SignalIndexConversion import SignalIndexConversion -from lhcsmapi.signal_analysis import features as signal_analysis +from lhcsmapi.pyedsl.dbsignal.SignalIndexConversion import SignalIndexConversion # type: ignore +from lhcsmapi.signal_analysis import features as signal_analysis # type: ignore from lhcsmapi.signal_analysis import functions as signal_analysis_functions from lhcsmapi.Time import Time @@ -39,7 +39,7 @@ class Event: source: str timestamp: int - circuit_type: CircuitType + circuit_type: str circuit_name: str u_hds: list[pd.DataFrame] u_hds_ref: list[pd.DataFrame] diff --git a/pyproject.toml b/pyproject.toml index 7fa5a21813c5f64ef3520dbcb79907122776e121..1083a6629c28b7737ad993ea40c0d2dda76838ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,6 @@ select = [ "*.ipynb" = ["E501"] # disable line-too-long in notebooks [tool.mypy] -# ignore_missing_imports = true warn_unused_configs = true warn_redundant_casts = true warn_no_return = true diff --git a/test/integration/test_qh_ccc.py b/test/integration/test_qh_ccc.py index 8083c7c23e5e34432fb610904cc5eca61a2b261d..e3d4ed0ae99d1e8e007dbc25d8d924026960ec7c 100644 --- a/test/integration/test_qh_ccc.py +++ b/test/integration/test_qh_ccc.py @@ -1,7 +1,7 @@ import pandas as pd import pytest from numpy import nan -from nxcals.spark_session_builder import get_or_create +from nxcals.spark_session_builder import get_or_create # type: ignore from lhcsmqh.analyses import VoltageCurrentResult, VoltageResult, quench_heater_ccc diff --git a/test/notebook/test_notebooks.py b/test/notebook/test_notebooks.py index 207261892655707ff023db206c2f821d2a6196a0..f2426dd1281b7feed6f306c8389280865b194687 100644 --- a/test/notebook/test_notebooks.py +++ b/test/notebook/test_notebooks.py @@ -1,6 +1,6 @@ import pathlib -import papermill +import papermill # type: ignore import pytest