Skip to content

Commit

Permalink
v0.3.1 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikulatomas authored Dec 21, 2021
1 parent fd9b89c commit 3f25ad9
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 122 deletions.
5 changes: 4 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
* Legacy implementations.

## Version 0.3.0a1
* Reworked to support concepts API and drop own FCA implementation.
* Reworked to support concepts API and drop own FCA implementation.

## Version 0.3.1
* Similarity are now implemented via binsdpy library.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ fcapsy requires:

* Python (>= 3.6)
* [concepts](https://github.com/xflr6/concepts)
* [binsdpy](https://github.com/mikulatomas/binsdpy)
4 changes: 4 additions & 0 deletions fcapsy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
__version__ = "0.3.1"
__author__ = "Tomáš Mikula"
__email__ = "mail@tomasmikula.cz"
__license__ = 'MIT license'
4 changes: 2 additions & 2 deletions fcapsy/basic_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def basic_level_avg(
Example:
>>> from concepts import Context
>>> from fcapsy.similarity import jaccard
>>> from binsdpy.similarity import jaccard
>>> from fcapsy.cohesion import cohesion_avg
>>> context = Context.fromstring('''
... |2 legs |nests |flies |raptor |
Expand Down Expand Up @@ -157,7 +157,7 @@ def basic_level_min(
Example:
>>> from concepts import Context
>>> from fcapsy.similarity import jaccard
>>> from binsdpy.similarity import jaccard
>>> from fcapsy.cohesion import cohesion_avg
>>> context = Context.fromstring('''
... |2 legs |nests |flies |raptor |
Expand Down
4 changes: 2 additions & 2 deletions fcapsy/cohesion.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def cohesion_min(
Example:
>>> import concepts
>>> from fcapsy import similarity
>>> from binsdpy import similarity
>>> lattice = concepts.Context.fromstring(concepts.EXAMPLE).lattice
>>> cohesion_min(lattice['+pl',], similarity.jaccard) # doctest: +NUMBER
0.428
Expand Down Expand Up @@ -54,7 +54,7 @@ def cohesion_avg(
Example:
>>> import concepts
>>> from fcapsy import similarity
>>> from binsdpy import similarity
>>> lattice = concepts.Context.fromstring(concepts.EXAMPLE).lattice
>>> cohesion_avg(lattice['+pl',], similarity.jaccard) # doctest: +NUMBER
0.714
Expand Down
76 changes: 0 additions & 76 deletions fcapsy/similarity.py

This file was deleted.

10 changes: 8 additions & 2 deletions fcapsy/typicality.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
"""Typicality
Belohlavek, Radim, and Tomas Mikula.
Typicality: A formal concept analysis account.
International Journal of Approximate Reasoning (2021).
Belohlavek, Radim, and Mikula, Tomas.
Typicality in Conceptual Structures Within the Framework of Formal Concept Analysis.
Proceedings of CLA 2020 (2020): 33-45.
"""

import typing
import statistics

import concepts.lattices


__all__ = ["typicality_avg, typicality_min"]


Expand Down Expand Up @@ -37,7 +43,7 @@ def typicality_min(
Example:
>>> from concepts import Context
>>> from fcapsy.similarity import jaccard
>>> from binsdpy.similarity import jaccard
>>> context = Context.fromstring('''
... |2 legs |nests |flies |raptor |
... sparrow | X | X | X | |
Expand Down Expand Up @@ -72,7 +78,7 @@ def typicality_avg(
Example:
>>> from concepts import Context
>>> from fcapsy.similarity import jaccard
>>> from binsdpy.similarity import jaccard
>>> context = Context.fromstring('''
... |2 legs |nests |flies |raptor |
... sparrow | X | X | X | |
Expand Down
64 changes: 25 additions & 39 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,50 +1,36 @@
#!/usr/bin/env python

"""The setup script."""

import pathlib
from setuptools import setup, find_packages
from fcapsy import __version__, __author__, __email__, __license__

__author__ = 'Tomáš Mikula'
__email__ = 'mail@tomasmikula.cz'
__version__ = '0.3.0a1'
__license__ = 'MIT license'

readme = pathlib.Path('README.md').read_text(encoding='utf-8')

history = pathlib.Path('HISTORY.md').read_text(encoding='utf-8')

setup(
name="fcapsy",
version=__version__,
author=__author__,
author_email=__email__,
python_requires='>=3.6',
description="Experimental implementations of psychological phenomena (e.g. typicality, basic level) in FCA framework.",
keywords="fca formal concept analysis psychology cognition typicality basic-level",
license=__license__,
url="https://github.com/mikulatomas/fcapsy",
packages=find_packages(),
python_requires=">=3.6",
install_requires=["concepts>=0.9.2", "binsdpy>=0.1.1"],
extras_require={
"test": ["pytest", "pytest-cov"],
},
long_description=pathlib.Path("README.md").read_text(encoding="utf-8"),
long_description_content_type="text/markdown",
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
description="Experimental implementations of psychological phenomena (e.g. typicality, basic level) in FCA framework",
install_requires=[
'concepts'
"Intended Audience :: Science/Research",
'Intended Audience :: Developers',
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
extras_require={
'dev': ['tox>=3', 'flake8', 'pep8-naming', 'wheel', 'twine'],
'test': ['pytest>=6', 'pytest-cov'],
},
license=__license__,
long_description=readme + '\n\n' + history,
long_description_content_type='text/markdown',
include_package_data=True,
keywords='fca formal concept analysis psychology cognition typicality basic-level',
name='fcapsy',
packages=find_packages(include=['fcapsy', 'fcapsy.*']),
url='https://github.com/mikulatomas/fcapsy',
version=__version__,
zip_safe=False,
)

0 comments on commit 3f25ad9

Please sign in to comment.