-
Notifications
You must be signed in to change notification settings - Fork 188
refactor: add py3.12 and py3.13 to tests #1212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
8e60bff
9cab92c
23b158f
ae1dc4b
91a4a24
8caaba8
7766077
1cc50b5
11454a3
20320cd
f1305c6
ae11f3b
004ce6c
a9b83cb
f5a238b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,12 +14,12 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.11"] | ||
| python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4.3.1 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. C1 requires commit sha? was denied v4 and v5 on first commit |
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v5.6.0 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -176,7 +176,7 @@ def _reconstruct_model(self) -> None: | |
| pass | ||
|
|
||
| def _need_to_reconstruct_model(self) -> bool: | ||
| pass | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a change, but should be inconsequential and matches the typing previously would return |
||
| return False | ||
|
|
||
| def reset_weights(self) -> None: | ||
| """Reset weights function.""" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| import os | ||
| import re | ||
| import sys | ||
| from typing import Any | ||
|
|
||
| import numpy as np | ||
|
|
||
|
|
@@ -167,7 +168,7 @@ def _reconstruct_model(self) -> None: | |
| pass | ||
|
|
||
| def _need_to_reconstruct_model(self) -> bool: | ||
| pass | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a change, but should be inconsequential and matches the typing previously would return |
||
| return False | ||
|
|
||
| def reset_weights(self) -> None: | ||
| """Reset weights.""" | ||
|
|
@@ -225,7 +226,7 @@ def predict( | |
|
|
||
| # Construct array initial regex predictions where background is | ||
| # predicted. | ||
| predictions = [np.empty((0,))] * 100 | ||
| predictions: list[Any] = [np.empty((0,))] * 100 | ||
| i = 0 | ||
| for i, input_string in enumerate(data): | ||
|
|
||
|
|
@@ -247,7 +248,7 @@ def predict( | |
| if verbose: | ||
| sys.stdout.flush() | ||
| sys.stdout.write(f"\rData Samples Processed: {i + 1:d} ") | ||
| predictions[i] = pred | ||
| predictions[i] = pred.tolist() | ||
|
|
||
| if verbose: | ||
| logger.info(f"\rData Samples Processed: {i + 1:d} ") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
|
|
||
| import copy | ||
| import re | ||
| from typing import cast | ||
|
|
||
| import numpy as np | ||
| import pandas as pd | ||
|
|
@@ -201,7 +202,7 @@ def profile(self) -> dict: | |
|
|
||
| :return: | ||
| """ | ||
| profile = NumericStatsMixin.profile(self) | ||
| profile = cast(dict, NumericStatsMixin.profile.__get__(self, type(self))) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can see the change have an effect here from making it a property instead of a method |
||
| profile.update( | ||
| dict( | ||
| precision=dict( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,8 @@ | |
|
|
||
| from __future__ import annotations | ||
|
|
||
| from typing import cast | ||
|
|
||
| import numpy as np | ||
| import pandas as pd | ||
|
|
||
|
|
@@ -99,7 +101,7 @@ def profile(self) -> dict: | |
|
|
||
| :return: | ||
| """ | ||
| return NumericStatsMixin.profile(self) | ||
| return cast(dict, NumericStatsMixin.profile.__get__(self, type(self))) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can see the change have an effect here from making it a property instead of a method |
||
|
|
||
| @property | ||
| def data_type_ratio(self) -> float | None: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -366,6 +366,7 @@ def _add_helper( | |
| other1._median_abs_dev_is_enabled and other2._median_abs_dev_is_enabled | ||
| ) | ||
|
|
||
| @property | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. biggest change is here. but it matches the other class functionalities of being properties and not methods. |
||
| def profile(self) -> dict: | ||
| """ | ||
| Return profile of the column. | ||
|
|
@@ -408,7 +409,7 @@ def report(self, remove_disabled_flag: bool = False) -> dict: | |
| :rtype: Profile | ||
| """ | ||
| calcs_dict_keys = self._NumericStatsMixin__calculations.keys() | ||
| profile = self.profile() | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can see the change have an effect here from making it a property instead of a method |
||
| profile = self.profile | ||
|
|
||
| if remove_disabled_flag: | ||
| profile_keys = list(profile.keys()) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added newest python