Skip to content

Commit

Permalink
Enable typing for external users (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrozniyToaster authored Aug 19, 2022
1 parent ced2072 commit 61d9a80
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
-
### Fixed
- Type hints for external users by [PEP 561](https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-library-stubs-or-py-typed-marker) ([#868](https://github.com/tinkoff-ai/etna/pull/868))
- Type hints for `Pipeline.model` match `models.nn`([#768](https://github.com/tinkoff-ai/etna/pull/840))
-
-
Expand Down
Empty file added etna/libs/__init__.py
Empty file.
18 changes: 18 additions & 0 deletions etna/libs/pmdarima_utils/arima.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from typing import Any

from numpy import ndarray

def ARMAtoMA(
ar: ndarray,
ma: ndarray,
max_deg: int,
) -> ndarray: ...

def seasonal_prediction_with_confidence(
arima_res: Any,
start: Any,
end: Any,
X: Any,
alpha: Any,
**kwargs: Any,
) -> Any: ...
1 change: 1 addition & 0 deletions etna/libs/tsfresh/distribution.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
def initialize_warnings_in_workers(show_warnings: bool) -> None: ...
25 changes: 25 additions & 0 deletions etna/libs/tsfresh/relevance.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from typing import List
from typing import Optional

import pandas as pd

def calculate_relevance_table(
X: pd.DataFrame,
y: pd.Series,
ml_task: str = ...,
multiclass: bool = ...,
n_significant: int = ...,
n_jobs: int = ...,
show_warnings: bool = ...,
chunksize: Optional[int] = ...,
test_for_binary_target_binary_feature: str = ...,
test_for_binary_target_real_feature: str = ...,
test_for_real_target_binary_feature: str = ...,
test_for_real_target_real_feature: str = ...,
fdr_level: float = ...,
hypotheses_independent: bool = ...,
) -> pd.DataFrame: ...

def infer_ml_task(y: pd.Series) -> str: ...
def combine_relevance_tables(relevance_tables: List[pd.DataFrame]) -> pd.DataFrame: ...
def get_feature_type(feature_column: pd.Series) -> str: ...
6 changes: 6 additions & 0 deletions etna/libs/tsfresh/significance_tests.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import pandas as pd

def target_binary_feature_binary_test(x: pd.Series, y: pd.Series) -> float: ...
def target_binary_feature_real_test(x: pd.Series, y: pd.Series, test: str) -> float: ...
def target_real_feature_binary_test(x: pd.Series, y: pd.Series) -> float: ...
def target_real_feature_real_test(x: pd.Series, y: pd.Series) -> float: ...
Empty file added etna/py.typed
Empty file.

1 comment on commit 61d9a80

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.