Skip to content

Commit

Permalink
Merge pull request #26 from EgorDudyrev/release/prepare_the_release
Browse files Browse the repository at this point in the history
Release/prepare the release
  • Loading branch information
EgorDudyrev authored Sep 17, 2024
2 parents 188623a + 74ea74e commit 9380cf7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 6 deletions.
3 changes: 1 addition & 2 deletions caspailleur/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from .mine_equivalence_classes import list_intents_via_LCM, list_keys, list_passkeys, list_stable_extents_via_gsofia
from .order import sort_intents_inclusion, inverse_order
from .indices import linearity_index, distributivity_index
from .orchestrator import explore_data

from .api import iter_descriptions, mine_descriptions, mine_concepts, mine_implications

__version__ = '0.1.4'
__version__ = '0.2.0'
12 changes: 11 additions & 1 deletion caspailleur/base_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from itertools import chain, combinations
from typing import Iterable, Iterator, Union, Any

import deprecation
from bitarray import frozenbitarray as fbarray, bitarray

from . import io
Expand Down Expand Up @@ -95,4 +96,13 @@ def closure(
##############################
# Reverse compatibility part #
##############################
from .io import isets2bas
@deprecation.deprecated(deprecated_in="0.2.0", removed_in="0.2.1",
details="The function is moved to `caspailleur.io` module")
def isets2bas(itemsets: Iterable[Iterable[int]], length: int) -> Iterator[fbarray]:
"""Convert the list of lists of indices of 'True' elements to bitarrays of given length
Examples
--------
isets2bas([ [0, 1], [1,3,4] ], 5) --> [bitarray('01000'), bitarray('01011')]
"""
return io.isets2bas(itemsets, )
2 changes: 1 addition & 1 deletion caspailleur/mine_equivalence_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def list_passkeys_for_extents(
return list_keys_for_extents(extents, attr_extents, only_passkeys=True)


@deprecation.deprecated(deprecated_in="0.1.4", removed_in="0.1.5",
@deprecation.deprecated(deprecated_in="0.2.0", removed_in="0.2.1",
details="Use `list_stable_extents_via_gsofia` function instead. It is faster and more reliable")
def list_stable_extents_via_sofia(
attribute_extents: Iterable[fbarray],
Expand Down
2 changes: 1 addition & 1 deletion caspailleur/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


@deprecation.deprecated(
deprecated_in="0.1.4", removed_in="0.1.5",
deprecated_in="0.2.0", removed_in="0.2.1",
details="Use functions `mine_implications`, `mine_concepts` and `mine_descriptions` from API module. "
"They provide easier to work-with output"
)
Expand Down
15 changes: 15 additions & 0 deletions caspailleur/order.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from typing import List

import deprecation
from bitarray import bitarray, frozenbitarray as fbarray
from bitarray.util import zeros as bazeros
from tqdm.auto import tqdm
Expand Down Expand Up @@ -142,3 +144,16 @@ def drop_transitive_subsumption(subsumption_list: List[fbarray]) -> List[fbarray
then set subsumption_list[i][k] = False.
"""
return open_transitive_subsumption(close_transitive_subsumption(subsumption_list))


##############################
# Reverse compatability part #
##############################
@deprecation.deprecated(deprecated_in="0.2.0", removed_in="0.2.1",
details="The function got renamed to `check_topologically_sorted`")
def test_topologically_sorted(elements: list[fbarray], ascending: bool = True) -> bool:
"""Test if the list of `elements` is topologically sorted (from the smallest to the biggest element)
One can obtain topologically sorted list of elements with ``topological_sorting(elements)`` function
"""
return check_topologically_sorted(elements, ascending)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "caspailleur"
version = "0.1.4"
version = "0.2.0"
description = "Minimalistic python package for mining many concise data representations. Part of SmartFCA project"
readme = "README.md"
authors = [{ name = "Egor Dudyrev" }]
Expand Down

0 comments on commit 9380cf7

Please sign in to comment.