{"id":21451844,"url":"https://github.com/reity/algebraical","last_synced_at":"2025-03-17T02:42:44.994Z","repository":{"id":119043693,"uuid":"530434383","full_name":"reity/algebraical","owner":"reity","description":"Subclass of the built-in function type for representing algebraic operators (that are typically associated with algebraic structures and algebraic circuits) as immutable, hashable, sortable, and callable objects.","archived":false,"fork":false,"pushed_at":"2022-09-05T22:17:17.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T15:10:18.583Z","etag":null,"topics":["algebraic-operators","algebraic-structures","arithmetic","arithmetic-operations","arithmetic-operators","python-algebra","python-algebraic-operators","python-algebraic-structures","python-arithmetic","python-constants","python-library","python-operations","python-operators"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/algebraical","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reity.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-29T23:58:39.000Z","updated_at":"2022-09-05T22:01:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"1bc55bd9-9751-4493-932d-2e7f12238727","html_url":"https://github.com/reity/algebraical","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reity%2Falgebraical","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reity%2Falgebraical/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reity%2Falgebraical/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reity%2Falgebraical/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reity","download_url":"https://codeload.github.com/reity/algebraical/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243964632,"owners_count":20375808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algebraic-operators","algebraic-structures","arithmetic","arithmetic-operations","arithmetic-operators","python-algebra","python-algebraic-operators","python-algebraic-structures","python-arithmetic","python-constants","python-library","python-operations","python-operators"],"created_at":"2024-11-23T04:26:22.662Z","updated_at":"2025-03-17T02:42:44.976Z","avatar_url":"https://github.com/reity.png","language":"Python","readme":"===========\nalgebraical\n===========\n\nSubclass of the `built-in function type \u003chttps://docs.python.org/3/library/operator.html\u003e`__ for representing algebraic operators (that are typically associated with algebraic structures and algebraic circuits) as immutable, hashable, sortable, and callable objects.\n\nThis library is compatible with the `circuit \u003chttps://pypi.org/project/circuit\u003e`__ library and is intended to complement the `logical \u003chttps://pypi.org/project/logical\u003e`__ library for logical operations.\n\n|pypi| |readthedocs| |actions| |coveralls|\n\n.. |pypi| image:: https://badge.fury.io/py/algebraical.svg\n   :target: https://badge.fury.io/py/algebraical\n   :alt: PyPI version and link.\n\n.. |readthedocs| image:: https://readthedocs.org/projects/algebraical/badge/?version=latest\n   :target: https://algebraical.readthedocs.io/en/latest/?badge=latest\n   :alt: Read the Docs documentation status.\n\n.. |actions| image:: https://github.com/reity/algebraical/workflows/lint-test-cover-docs/badge.svg\n   :target: https://github.com/reity/algebraical/actions/workflows/lint-test-cover-docs.yml\n   :alt: GitHub Actions status.\n\n.. |coveralls| image:: https://coveralls.io/repos/github/reity/algebraical/badge.svg?branch=main\n   :target: https://coveralls.io/github/reity/algebraical?branch=main\n   :alt: Coveralls test coverage summary.\n\nInstallation and Usage\n----------------------\nThis library is available as a `package on PyPI \u003chttps://pypi.org/project/algebraical\u003e`__::\n\n    python -m pip install algebraical\n\nThe library can be imported in the usual ways::\n\n    import algebraical\n    from algebraical import *\n\nExamples\n^^^^^^^^\n\n.. |algebraical| replace:: ``algebraical``\n.. _algebraical: https://algebraical.readthedocs.io/en/0.1.1/_source/algebraical.html#algebraical.algebraical.algebraical\n\n.. |operator| replace:: operator\n.. _operator: https://docs.python.org/3/library/operator.html\n\nEach instance of the |algebraical|_ class (derived from the type of the built-in functions found in the built-in |operator|_ library) represents a function that operates on values of typical algebraic structures (such as `numeric \u003chttps://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex\u003e`__ types and any classes that define the `special methods \u003chttps://docs.python.org/3/reference/datamodel.html#emulating-numeric-types\u003e`__ associated with these built-in operators)::\n\n    \u003e\u003e\u003e from algebraical import algebraical\n    \u003e\u003e\u003e algebraical.add_(1, 2)\n    3\n\nMethods for retrieving the name and arity of an |algebraical|_ instance are provided::\n\n    \u003e\u003e\u003e algebraical.add_.name()\n    'add'\n    \u003e\u003e\u003e algebraical.add_.arity()\n    2\n\nInstances of |algebraical|_ can be compared according to their precedence::\n\n    \u003e\u003e\u003e algebraical.pow_ \u003e algebraical.mul_\n    True\n    \u003e\u003e\u003e algebraical.pow_ \u003c= algebraical.add_\n    False\n    \u003e\u003e\u003e sorted([pow_, mul_, add_] # From lowest to highest precedence.\n    [add_, mul_, pow_]\n\nInstances are also hashable and can be used as members of `sets \u003chttps://docs.python.org/3/tutorial/datastructures.html#sets\u003e`__ and as keys within `dictionaries \u003chttps://docs.python.org/3/tutorial/datastructures.html#dictionaries\u003e`__::\n\n    \u003e\u003e\u003e from algebraical import *\n    \u003e\u003e\u003e {add_, mul_}\n    {mul_, add_}\n    \u003e\u003e\u003e {add_: 0, mul_: 1}\n    {add_: 0, mul_: 1}\n\nDevelopment\n-----------\nAll installation and development dependencies are fully specified in ``pyproject.toml``. The ``project.optional-dependencies`` object is used to `specify optional requirements \u003chttps://peps.python.org/pep-0621\u003e`__ for various development tasks. This makes it possible to specify additional options (such as ``docs``, ``lint``, and so on) when performing installation using `pip \u003chttps://pypi.org/project/pip\u003e`__::\n\n    python -m pip install .[docs,lint]\n\nDocumentation\n^^^^^^^^^^^^^\nThe documentation can be generated automatically from the source files using `Sphinx \u003chttps://www.sphinx-doc.org\u003e`__::\n\n    python -m pip install .[docs]\n    cd docs\n    sphinx-apidoc -f -E --templatedir=_templates -o _source .. \u0026\u0026 make html\n\nTesting and Conventions\n^^^^^^^^^^^^^^^^^^^^^^^\nAll unit tests are executed and their coverage is measured when using `pytest \u003chttps://docs.pytest.org\u003e`__ (see the ``pyproject.toml`` file for configuration details)::\n\n    python -m pip install .[test]\n    python -m pytest\n\nAlternatively, all unit tests are included in the module itself and can be executed using `doctest \u003chttps://docs.python.org/3/library/doctest.html\u003e`__::\n\n    python src/algebraical/algebraical.py -v\n\nStyle conventions are enforced using `Pylint \u003chttps://pylint.pycqa.org\u003e`__::\n\n    python -m pip install .[lint]\n    python -m pylint src/algebraical\n\nContributions\n^^^^^^^^^^^^^\nIn order to contribute to the source code, open an issue or submit a pull request on the `GitHub page \u003chttps://github.com/reity/algebraical\u003e`__ for this library.\n\nVersioning\n^^^^^^^^^^\nThe version number format for this library and the changes to the library associated with version number increments conform with `Semantic Versioning 2.0.0 \u003chttps://semver.org/#semantic-versioning-200\u003e`__.\n\nPublishing\n^^^^^^^^^^\nThis library can be published as a `package on PyPI \u003chttps://pypi.org/project/algebraical\u003e`__ by a package maintainer. First, install the dependencies required for packaging and publishing::\n\n    python -m pip install .[publish]\n\nEnsure that the correct version number appears in ``pyproject.toml``, and that any links in this README document to the Read the Docs documentation of this package (or its dependencies) have appropriate version numbers. Also ensure that the Read the Docs project for this library has an `automation rule \u003chttps://docs.readthedocs.io/en/stable/automation-rules.html\u003e`__ that activates and sets as the default all tagged versions. Create and push a tag for this version (replacing ``?.?.?`` with the version number)::\n\n    git tag ?.?.?\n    git push origin ?.?.?\n\nRemove any old build/distribution files. Then, package the source into a distribution archive::\n\n    rm -rf build dist src/*.egg-info\n    python -m build --sdist --wheel .\n\nFinally, upload the package distribution archive to `PyPI \u003chttps://pypi.org\u003e`__::\n\n    python -m twine upload dist/*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freity%2Falgebraical","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freity%2Falgebraical","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freity%2Falgebraical/lists"}