-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update stubs for desbordante 1.1.0
- Loading branch information
0 parents
commit bf76025
Showing
27 changed files
with
788 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
publish: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.11] | ||
poetry-version: [1.7.1] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run image | ||
uses: abatilo/actions-poetry@v3 | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- name: Publish | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
poetry config pypi-token.pypi $PYPI_TOKEN | ||
poetry publish --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
.venv | ||
.idea | ||
.vscode | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# Bin files | ||
*.bin | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
bin/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
.python-version | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# pip-accel cache | ||
.tmp | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
assets/ | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Rope | ||
.ropeproject | ||
|
||
# Django stuff: | ||
*.log | ||
*.pot | ||
media/ | ||
static/ | ||
|
||
# Sphinx documentation | ||
docs/build/ | ||
|
||
# Misc | ||
.DS_Store | ||
*.swp | ||
venv | ||
common_venv | ||
development_venv | ||
node_modules | ||
content/ | ||
|
||
# local settings | ||
*.conf.local.py | ||
|
||
# Celery | ||
celerybeat-schedule | ||
celeryev.pid | ||
|
||
# Honcho | ||
.env | ||
|
||
# scripts data | ||
scripts/edu_question* | ||
scripts/images | ||
scripts/dependent_tags.txt | ||
scripts/data | ||
|
||
# local settings | ||
app/kelvin/settings/my.conf.local | ||
|
||
# pytest cache | ||
.pytest_cache | ||
!/app/plato/*/static/ | ||
|
||
# postgres dumps | ||
postgres/*.sql | ||
|
||
# ping cache | ||
ping.cache | ||
|
||
pytest-report.html | ||
pytest-cov-report | ||
pytest-cov-report.xml | ||
|
||
# Jupyter notebook checkpoints | ||
.ipynb_checkpoints | ||
|
||
coverage-report-html/ | ||
|
||
.mypy_cache/ | ||
.ruff_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Copyright 2024 Desbordante | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Stubs for Desbordante | ||
|
||
Main repository is avaliable at https://github.com/Mstrutov/Desbordante | ||
|
||
Stubs are generated by https://github.com/sizmailov/pybind11-stubgen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
""" | ||
A high-performance data profiling library oriented towards exploratory data analysis | ||
""" | ||
from __future__ import annotations | ||
import typing | ||
from . import ac | ||
from . import afd | ||
from . import ar | ||
from . import data_types | ||
from . import fd | ||
from . import fd_verification | ||
from . import mfd_verification | ||
from . import statistics | ||
from . import ucc | ||
from . import ucc_verification | ||
|
||
__all__ = [ | ||
"Algorithm", | ||
"ConfigurationError", | ||
"ac", | ||
"afd", | ||
"afd_verification", | ||
"ar", | ||
"data_types", | ||
"fd", | ||
"fd_verification", | ||
"mfd_verification", | ||
"statistics", | ||
"ucc", | ||
"ucc_verification", | ||
] | ||
|
||
class Algorithm: | ||
def execute(self, **kwargs) -> None: | ||
""" | ||
Process data. | ||
""" | ||
def get_description(self, option_name: str) -> str: | ||
""" | ||
Get description of an option. | ||
""" | ||
def get_needed_options(self) -> set[str]: | ||
""" | ||
Get names of options the algorithm requires to be set at the moment. | ||
This option is only expected to be used by Python scripts in which it is | ||
easier to set all options one by one. For normal use, you may set the | ||
algorithms' options using keyword arguments of the load_data and execute | ||
methods. | ||
""" | ||
def get_option_type(self, option_name: str) -> tuple: | ||
""" | ||
Get info about the option's type. | ||
""" | ||
def get_opts(self) -> dict[str, typing.Any]: | ||
""" | ||
Get option values represented as the closest Python type | ||
""" | ||
def get_possible_options(self) -> set[str]: | ||
""" | ||
Get names of options the algorithm may request. | ||
""" | ||
def load_data(self, **kwargs) -> None: | ||
""" | ||
Load data for execution | ||
""" | ||
def set_option(self, option_name: str, option_value: typing.Any = None) -> None: | ||
""" | ||
Set option value. Passing None means setting the default value. | ||
This option is only expected to be used by Python scripts in which it is | ||
easier to set all options one by one. For normal use, you may set the | ||
algorithms' options using keyword arguments of the load_data and execute | ||
methods. | ||
""" | ||
|
||
class ConfigurationError(ValueError): | ||
pass | ||
|
||
afd_verification = fd_verification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from __future__ import annotations | ||
from . import algorithms | ||
|
||
__all__ = ["ACException", "ACRanges", "algorithms"] | ||
|
||
class ACException: | ||
@property | ||
def column_pairs(self) -> list[tuple[int, int]]: ... | ||
@property | ||
def row_index(self) -> int: ... | ||
|
||
class ACRanges: | ||
@property | ||
def column_indices(self) -> tuple[int, int]: ... | ||
@property | ||
def ranges(self) -> list[tuple[float, float]]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from __future__ import annotations | ||
import desbordante | ||
import desbordante.ac | ||
|
||
__all__ = ["AcAlgorithm", "Default"] | ||
|
||
class AcAlgorithm(desbordante.Algorithm): | ||
""" | ||
Options: | ||
table: table processed by the algorithm | ||
bin_operation: one of available operations: /, *, +, - | ||
fuzziness: fraction of exceptional records, lies in (0, 1] | ||
p_fuzz: probability, the fraction of exceptional records that lie outside the bump intervals is at most Fuzziness, lies in (0, 1] | ||
weight: value lies in (0, 1]. Closer to 0 - many short intervals. Closer to 1 - small number of long intervals | ||
bumps_limit: max considered intervals amount. Pass 0 to remove limit | ||
iterations_limit: limit for iterations of sampling | ||
ac_seed: seed, needed for choosing a data sample | ||
""" | ||
def __init__(self) -> None: ... | ||
def get_ac_exceptions(self) -> list[desbordante.ac.ACException]: ... | ||
def get_ac_ranges(self) -> list[desbordante.ac.ACRanges]: ... | ||
|
||
Default = AcAlgorithm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from __future__ import annotations | ||
from . import algorithms | ||
|
||
__all__ = ["algorithms"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from __future__ import annotations | ||
from desbordante.fd.algorithms import Pyro | ||
from desbordante.fd.algorithms import Pyro as Default | ||
from desbordante.fd.algorithms import Tane | ||
|
||
__all__ = ["Default", "Pyro", "Tane"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from __future__ import annotations | ||
import desbordante | ||
from . import algorithms | ||
|
||
__all__ = ["ArAlgorithm", "AssociativeRule", "algorithms"] | ||
|
||
class ArAlgorithm(desbordante.Algorithm): | ||
def get_ars(self) -> list[AssociativeRule]: ... | ||
|
||
class AssociativeRule: | ||
def __str__(self) -> str: ... | ||
@property | ||
def confidence(self) -> float: ... | ||
@property | ||
def left(self) -> list[str]: ... | ||
@property | ||
def right(self) -> list[str]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from __future__ import annotations | ||
import desbordante.ar | ||
|
||
__all__ = ["Apriori", "Default"] | ||
|
||
class Apriori(desbordante.ar.ArAlgorithm): | ||
""" | ||
Options: | ||
table: table processed by the algorithm | ||
has_tid: indicates that the first column contains the transaction IDs | ||
minconf: minimum confidence value (between 0 and 1) | ||
input_format: format of the input dataset for AR mining | ||
[singular|tabular] | ||
item_column_index: index of the column where an item name is stored | ||
minsup: minimum support value (between 0 and 1) | ||
tid_column_index: index of the column where a TID is stored | ||
""" | ||
def __init__(self) -> None: ... | ||
|
||
Default = Apriori |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
""" | ||
Contains the types of data supported by Desbordante. | ||
Currently only used as tags for Algorithm.get_option_type | ||
""" | ||
from __future__ import annotations | ||
|
||
__all__ = ["Table"] | ||
|
||
class Table: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from __future__ import annotations | ||
import desbordante | ||
from . import algorithms | ||
|
||
__all__ = ["FD", "FdAlgorithm", "algorithms"] | ||
|
||
class FD: | ||
def __eq__(self, arg0: FD) -> bool: ... | ||
def __hash__(self) -> int: ... | ||
def __str__(self) -> str: ... | ||
def to_index_tuple(self) -> tuple: ... | ||
def to_long_string(self) -> str: ... | ||
def to_name_tuple(self) -> tuple: ... | ||
def to_short_string(self) -> str: ... | ||
@property | ||
def lhs_indices(self) -> list[int]: ... | ||
@property | ||
def rhs_index(self) -> int: ... | ||
|
||
class FdAlgorithm(desbordante.Algorithm): | ||
def get_fds(self) -> list[FD]: ... |
Oops, something went wrong.