Donuts-Python
=============
.. image:: https://badge.fury.io/py/donuts-python.svg
:target: https://pypi.org/project/donuts-python/
:alt: PyPI version
.. image:: https://github.com/tueda/donuts-python/workflows/Test/badge.svg?branch=main
:target: https://github.com/tueda/donuts-python/actions?query=branch:main
:alt: Test
.. image:: https://readthedocs.org/projects/donuts-python/badge/?version=latest
:target: https://donuts-python.readthedocs.io/en/latest/
:alt: Documentation Status
Python binding to the `Donuts`_ wrapper for the `Rings`_ library by Stanislav Poslavsky.
Requirements
------------
* Python 3.7 or later
* Java 8 or later
Installation
------------
.. code:: shell
pip install donuts-python
Example
-------
.. code:: python
>>> from donuts import *
>>> a = Polynomial('1 + x + y')
>>> b = Polynomial('1 + y + z')
>>> g = a + b
>>> g
Polynomial('2+z+2*y+x')
>>> ag = a * g
>>> bg = b * g
>>> ag.gcd(bg) # must be equal to g
Polynomial('2+z+2*y+x')
>>> ag / bg # same as RationalFunction(ag, bg)
RationalFunction('(1+y+x)/(1+z+y)')
>>> Polynomial('2*x^2 - 2*x^3 + 2*x^2*y - 2*x^3*y').factors
(Polynomial('-2'), Polynomial('x'), Polynomial('x'), Polynomial('-1+x'), Polynomial('1+y'))
Development
-----------
.. The code is tested by "readme_dev" in .github/workflows/test.yml and .gitlab-ci.yml.
.. code:: shell
git submodule update --init
poetry install
poetry run invoke prepare
poetry run invoke build
poetry run invoke fmt
poetry run invoke lint
poetry run invoke test
poetry run invoke bench
poetry run invoke doc
DONUTS_PYTHON_BACKEND=pyjnius poetry run invoke test
DONUTS_PYTHON_BACKEND=py4j poetry run invoke test
DONUTS_PYTHON_BACKEND=jpype poetry run invoke test
poetry run invoke build --sdist --wheel
Acknowledgements
----------------
This software was developed as part of the project supported by JSPS KAKENHI Grant Number 19K03831.
License
-------
Donuts-Python is distributed under the MIT license.
The wheel contains a fat JAR file generated from the following dependencies:
* `Donuts`_ (MIT)
* `Rings`_ (Apache 2.0)
* `libdivide4j`_ (Apache 2.0)
* `Combinatorics for Java`_ (Apache 2.0)
* `Apache Commons Math`_ (Apache 2.0)
* `GNU Trove`_ (LGPL 2.1)
.. _Donuts: https://github.com/tueda/donuts
.. _Rings: https://github.com/PoslavskySV/rings
.. _libdivide4j: https://github.com/PoslavskySV/libdivide4j
.. _Combinatorics for Java: https://github.com/PoslavskySV/combinatorics
.. _Apache Commons Math: https://github.com/apache/commons-math
.. _GNU Trove: https://bitbucket.org/trove4j/trove
Raw data
{
"_id": null,
"home_page": "https://github.com/tueda/donuts-python",
"name": "donuts-python",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "computer algebra,multivariate polynomial arithmetic",
"author": "Takahiro Ueda",
"author_email": "t.ueda.od@juntendo.ac.jp",
"download_url": "https://files.pythonhosted.org/packages/35/59/207c872960bb6144c949592e873f29be7f7d1d073451f8c10faf37062d81/donuts_python-0.0.5.tar.gz",
"platform": null,
"description": "Donuts-Python\n=============\n\n.. image:: https://badge.fury.io/py/donuts-python.svg\n :target: https://pypi.org/project/donuts-python/\n :alt: PyPI version\n\n.. image:: https://github.com/tueda/donuts-python/workflows/Test/badge.svg?branch=main\n :target: https://github.com/tueda/donuts-python/actions?query=branch:main\n :alt: Test\n\n.. image:: https://readthedocs.org/projects/donuts-python/badge/?version=latest\n :target: https://donuts-python.readthedocs.io/en/latest/\n :alt: Documentation Status\n\nPython binding to the `Donuts`_ wrapper for the `Rings`_ library by Stanislav Poslavsky.\n\n\nRequirements\n------------\n\n* Python 3.7 or later\n* Java 8 or later\n\n\nInstallation\n------------\n\n.. code:: shell\n\n pip install donuts-python\n\n\nExample\n-------\n\n.. code:: python\n\n >>> from donuts import *\n >>> a = Polynomial('1 + x + y')\n >>> b = Polynomial('1 + y + z')\n >>> g = a + b\n >>> g\n Polynomial('2+z+2*y+x')\n >>> ag = a * g\n >>> bg = b * g\n >>> ag.gcd(bg) # must be equal to g\n Polynomial('2+z+2*y+x')\n >>> ag / bg # same as RationalFunction(ag, bg)\n RationalFunction('(1+y+x)/(1+z+y)')\n >>> Polynomial('2*x^2 - 2*x^3 + 2*x^2*y - 2*x^3*y').factors\n (Polynomial('-2'), Polynomial('x'), Polynomial('x'), Polynomial('-1+x'), Polynomial('1+y'))\n\n\nDevelopment\n-----------\n\n.. The code is tested by \"readme_dev\" in .github/workflows/test.yml and .gitlab-ci.yml.\n\n.. code:: shell\n\n git submodule update --init\n poetry install\n poetry run invoke prepare\n\n poetry run invoke build\n\n poetry run invoke fmt\n poetry run invoke lint\n poetry run invoke test\n poetry run invoke bench\n poetry run invoke doc\n\n DONUTS_PYTHON_BACKEND=pyjnius poetry run invoke test\n DONUTS_PYTHON_BACKEND=py4j poetry run invoke test\n DONUTS_PYTHON_BACKEND=jpype poetry run invoke test\n\n poetry run invoke build --sdist --wheel\n\n\nAcknowledgements\n----------------\n\nThis software was developed as part of the project supported by JSPS KAKENHI Grant Number 19K03831.\n\n\nLicense\n-------\n\nDonuts-Python is distributed under the MIT license.\n\nThe wheel contains a fat JAR file generated from the following dependencies:\n\n* `Donuts`_ (MIT)\n* `Rings`_ (Apache 2.0)\n* `libdivide4j`_ (Apache 2.0)\n* `Combinatorics for Java`_ (Apache 2.0)\n* `Apache Commons Math`_ (Apache 2.0)\n* `GNU Trove`_ (LGPL 2.1)\n\n\n.. _Donuts: https://github.com/tueda/donuts\n.. _Rings: https://github.com/PoslavskySV/rings\n.. _libdivide4j: https://github.com/PoslavskySV/libdivide4j\n.. _Combinatorics for Java: https://github.com/PoslavskySV/combinatorics\n.. _Apache Commons Math: https://github.com/apache/commons-math\n.. _GNU Trove: https://bitbucket.org/trove4j/trove\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python binding to Donuts",
"version": "0.0.5",
"project_urls": {
"Homepage": "https://github.com/tueda/donuts-python",
"Repository": "https://github.com/tueda/donuts-python"
},
"split_keywords": [
"computer algebra",
"multivariate polynomial arithmetic"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8644b0f48588b64f9ae285e871025dd4253b9b405572131f54bb7d48e8016c7d",
"md5": "175dc68bb94e8ee5b467d424beb054c3",
"sha256": "034af989c3b6b9f37dc1af5a4db84156f80bb4b84e4f6b9ac2986fee671268f7"
},
"downloads": -1,
"filename": "donuts_python-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "175dc68bb94e8ee5b467d424beb054c3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 1439072,
"upload_time": "2024-02-10T08:40:34",
"upload_time_iso_8601": "2024-02-10T08:40:34.409725Z",
"url": "https://files.pythonhosted.org/packages/86/44/b0f48588b64f9ae285e871025dd4253b9b405572131f54bb7d48e8016c7d/donuts_python-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3559207c872960bb6144c949592e873f29be7f7d1d073451f8c10faf37062d81",
"md5": "b4b6655354ab5b9e046816f0410ceda6",
"sha256": "8756dbead2a46b2eb544281644d0777ce4df19a9888165a9b5d94cdf43794611"
},
"downloads": -1,
"filename": "donuts_python-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "b4b6655354ab5b9e046816f0410ceda6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 95367,
"upload_time": "2024-02-10T08:40:36",
"upload_time_iso_8601": "2024-02-10T08:40:36.095399Z",
"url": "https://files.pythonhosted.org/packages/35/59/207c872960bb6144c949592e873f29be7f7d1d073451f8c10faf37062d81/donuts_python-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-10 08:40:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tueda",
"github_project": "donuts-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "donuts-python"
}