Symbolic computations.
Project description
symba
In what follows python
is an alias for python3.5
or pypy3.5
or any later version (python3.6
, pypy3.6
and so on).
Installation
Install the latest pip
& setuptools
packages versions
python -m pip install --upgrade pip setuptools
User
Download and install the latest stable version from PyPI
repository
python -m pip install --upgrade symba
Developer
Download the latest version from GitHub
repository
git clone https://github.com/lycantropos/symba.git
cd symba
Install dependencies
python -m pip install -r requirements.txt
Install
python setup.py install
Usage
>>> from symba.base import Expression, sqrt
>>> golden_ratio = (1 + sqrt(5)) / 2
>>> isinstance(golden_ratio, Expression)
True
>>> golden_ratio * golden_ratio == golden_ratio + 1
True
>>> 1 / golden_ratio == golden_ratio - 1
True
>>> def fibonacci(index: int) -> Expression:
... """
... Based on:
... https://en.wikipedia.org/wiki/Golden_ratio#Relationship_to_Fibonacci_sequence
... """
... golden_ratio_power = golden_ratio ** index
... return ((golden_ratio_power - (-1) ** index / golden_ratio_power)
... / sqrt(5))
>>> fibonacci(0) == 0
True
>>> fibonacci(1) == 1
True
>>> fibonacci(100) == 354224848179261915075
True
Development
Bumping version
Preparation
Install bump2version.
Pre-release
Choose which version number category to bump following semver specification.
Test bumping version
bump2version --dry-run --verbose $CATEGORY
where $CATEGORY
is the target version number category name, possible
values are patch
/minor
/major
.
Bump version
bump2version --verbose $CATEGORY
This will set version to major.minor.patch-alpha
.
Release
Test bumping version
bump2version --dry-run --verbose release
Bump version
bump2version --verbose release
This will set version to major.minor.patch
.
Running tests
Install dependencies
python -m pip install -r requirements-tests.txt
Plain
pytest
Inside Docker
container:
- with
CPython
docker-compose --file docker-compose.cpython.yml up
- with
PyPy
docker-compose --file docker-compose.pypy.yml up
Bash
script (e.g. can be used in Git
hooks):
-
with
CPython
./run-tests.sh
or
./run-tests.sh cpython
-
with
PyPy
./run-tests.sh pypy
PowerShell
script (e.g. can be used in Git
hooks):
- with
CPython
.\run-tests.ps1
or.\run-tests.ps1 cpython
- with
PyPy
.\run-tests.ps1 pypy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for symba-0.5.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6d15ae61ac82bdf0c5a2bb03aef987b4d141f06b1c8d40fd8bcb4deb27fa5b4 |
|
MD5 | bcc4f6400858897cd6939b1eb0d67785 |
|
BLAKE2b-256 | afcacfc78549953e28e75c9877965b28bd2c153bd22ef8f4ec2c7292aeda09a0 |
Hashes for symba-0.5.1-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e939e59f7b64fb091c90f5e08b7257ffebf373dfd80e6880b3146f20f737d03e |
|
MD5 | 77b043681ec46f85ef159502cae1af0b |
|
BLAKE2b-256 | e24326d77821a4452372b65770ff9e57ea85dbd896d873fc6927076eb780d805 |
Hashes for symba-0.5.1-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12eee3f63b9432e5bdd3ba92b61a040846b99d0793dda7bab08c14cc835a0509 |
|
MD5 | 0c13f4892ca4efebf80554ffc0484969 |
|
BLAKE2b-256 | f27560dc3e5874fe77c1b86bdc5db8edb165c3f1c0298c2374630888a47da771 |
Hashes for symba-0.5.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d3d97741179de5e8294a511dd7d14a833391f0edb9f895f3928d630dbc132fd |
|
MD5 | a4e61614b498a08fde79bc8484408683 |
|
BLAKE2b-256 | e238f40e3a25898a946c0162573118a318056b98950c41220f47ae3e09c0ea97 |
Hashes for symba-0.5.1-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b47df0e7ccf914a2fc735d44ae288764fa86cc01469826c1f43526a0a6681201 |
|
MD5 | 4e7b1000a12fa84885059d3cea92f358 |
|
BLAKE2b-256 | d19d6f10fcc84e9b8fcd9fb9ccb3163b08b81b3285d4a8054f7bea32be5589d4 |
Hashes for symba-0.5.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f479c7fd0c6f13527abfe2914697fa4fdb30693006233b88edbea4e1d749c89 |
|
MD5 | 9d69642ddd3cc972972e605f44378e6e |
|
BLAKE2b-256 | 95df2c2102707ac3dbe4fae988d154fd34e6f0fd67522ae283b4df230d3019af |
Hashes for symba-0.5.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5e627b9b0566fa0ca0beb145c1a39ea041a0f6f426138b20a3ba4c70f9aee28 |
|
MD5 | 9a903810b1a653a9c57355d1ac67389a |
|
BLAKE2b-256 | 49a1988fa31dffce5ed62b4ec6a7a6b77bf50d64de8d1a96cb3b19365e903ffb |
Hashes for symba-0.5.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 806c87659e7c525439d1fb7d40f9b0260a734dd643473a7f932908129cd99c4e |
|
MD5 | fb3390ccfd043b9fa62e580a7b5aa6f5 |
|
BLAKE2b-256 | 3fc3d4314915e84e9250b35876176511c1a1581cd258da89abdf73e578663150 |
Hashes for symba-0.5.1-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ff4c137e8c705162dbc2d81a5ee2e9c72b780edc982a5809f0d995fc211b5f |
|
MD5 | b87096f07fdea6ad31afecb87cf6b804 |
|
BLAKE2b-256 | f8ad489fb3496eaecdd7bc865293bdea9b0f6b78e91670abef4924fa1a530e84 |
Hashes for symba-0.5.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b82c27f05fb69594e1dfe9b63b2787c8f9c609d03e969eadfddebbaf7e9dc32 |
|
MD5 | af695c06d051d4e90da6df7c90867d20 |
|
BLAKE2b-256 | ca9e58a12a3c0d9dbe69d4abb265192811105666dce5a236b096f9354cf4dfba |
Hashes for symba-0.5.1-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fac7fd16aa174f713e924cbc7a06832c8afd63b16d2d8454e0a77c2908bc7c5f |
|
MD5 | 1618b0aa197232efe2976cb434adb10a |
|
BLAKE2b-256 | 08c8b8dc76c1cf04b1d6519ae5a693e4d6bece103e8db09af94a14229da9f5c2 |
Hashes for symba-0.5.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39891224b2d944903aa02d52edac74c1a14a7336cc135ff69af2de590cd1aa7d |
|
MD5 | 350785f90e30ceb81162010fb926b260 |
|
BLAKE2b-256 | 2e459b4a07e407e6fc108374a10ede6380b563141c55242360a53187c445cb3b |
Hashes for symba-0.5.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c3c52526e10c34f18346eff85ad8b7791437cf6eff421612a99e4937a7f670d |
|
MD5 | 86656a7888c6bcb98c45ff902c2f8a98 |
|
BLAKE2b-256 | 6062ac09842ffe03e82cf4e3051c283dc89fa440531a6efd159bd38ab270676b |
Hashes for symba-0.5.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8f3378d2aa2b3907da62ded7407875bbf4363ff1252e35d243584d7258b84e8 |
|
MD5 | e8d23ce471c7607a3171ac558ac4ed09 |
|
BLAKE2b-256 | 362842bee58a58da899831340e5ec647ee3c415a08688a91cc3481f9fafd0e61 |
Hashes for symba-0.5.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7b888c1c1da84e2ad65061dd58e69fd9b5730786f66d3ddd4df556bf7fe5931 |
|
MD5 | 27ea5fd6d6cd9ee55b6a6e8364bc607b |
|
BLAKE2b-256 | 9bb4bb1e6afa6d8241677885e8a75bb0c7e3571ac907e2a3c3b75c120c19cfcb |
Hashes for symba-0.5.1-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bfadc04abe67d887a4fea54ed7d1855df5ff22dd6fd352196f5d46873784dcd |
|
MD5 | f9015c224b7629e380b45b08a52518a6 |
|
BLAKE2b-256 | 34a68728e13335597328f5e7f70100dfcee4913864d3a2070ca90c7cd99a178e |
Hashes for symba-0.5.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11f160e5ec8541f6219fb1c57c69b706abd6c3776271c7c38d01c2e0b9fc70f5 |
|
MD5 | 38083ac4dbd243a5bfd1e4182929b69a |
|
BLAKE2b-256 | cf4d4d7412632f119d4bbb2019856a6d84ec1a604e864f625d6ef8b8230db50c |
Hashes for symba-0.5.1-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3703cd16d540a3f46e050437097abd70f44f165430f3ba8f992e9a92fccf4df2 |
|
MD5 | 9046abec99d55599c5104c45ff6f8503 |
|
BLAKE2b-256 | 6f45e7a8d82e408dbb69eddc62c935534e3ffd59983ed8e7553cd1d199ea636c |
Hashes for symba-0.5.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f8eee6749d004302b27c6bd29228f9fdb43ea606c492b40fe8a22810ab4f05a |
|
MD5 | 859d043dc6ac250afc3c25a22ef5056e |
|
BLAKE2b-256 | d27949672b19553a7a3bbbb0331908a78753c907a77a1a2a289f60dbaa642b8a |
Hashes for symba-0.5.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 667831905594d23ce316564b3eec8e327c8ae217d16f3378e5a88300be0bdca9 |
|
MD5 | 97378d701f54a94576e8bbe4025a8af2 |
|
BLAKE2b-256 | f3d5a45aae60fc92e9ef7abf10c90ecdf30a1b06418358786b51c328f141356a |
Hashes for symba-0.5.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fbb361bc25df325caf4d1a10adec1dba163d3f5d774bbf3f769912998d29339 |
|
MD5 | e51cdb73ec014a0e9c77f2a824f5aaa4 |
|
BLAKE2b-256 | 518f5c56909ba99f29167afea4ad3b9ab34fe69961b744e01066261c8fe751ac |
Hashes for symba-0.5.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 211de15bc9d561bca67bcda8adec25da6e522be483588f4f0c35528e44be1526 |
|
MD5 | e0bbf4bd9b7d207e2a63edcf260f822e |
|
BLAKE2b-256 | 5d9d76e657639bd531e6ab90aaddb2acf320a474115522884e576aea56363aac |
Hashes for symba-0.5.1-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77c8f67441f9b734b4a8c88f241a8252cd667ca55f1951e3211b733a34217f79 |
|
MD5 | a35b165e72fbd213118bb39bd90f71b3 |
|
BLAKE2b-256 | 941f7e76d24d61daf57b317c5b510678db287ae9c7cebeeed5ecec035996036e |
Hashes for symba-0.5.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e74619ce138b94ee6a1de8e88cedc4f285254bda5553cd88552d592918ac287 |
|
MD5 | b662393a2fa732bfe8f94e24b81a3f97 |
|
BLAKE2b-256 | 80e18eb28d02cf66b25292c5d5c57b6f305015c7871f9acdd7224d3a3c1a055d |
Hashes for symba-0.5.1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93378b16c6f8437d8b0d00dd1aa091b75d76dcfae5dabee2407bb03cc5da51f5 |
|
MD5 | 64107ec65e9b4e78d87c6ee17deeb585 |
|
BLAKE2b-256 | ae99630bc4d639adfe0c809ac1334edf734c0b340e7e5c7ad57bc98760c42753 |
Hashes for symba-0.5.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b81547aa9fb4b1436c580a8cc3ffa90edcdce15a9e9d45210da05835b2161db |
|
MD5 | c94e16fe52542e70b8a4b9607c372c4b |
|
BLAKE2b-256 | 7d103086e2870d9b082a157def98eed7a8fa4f38bb824d1e85f95c605f17194e |
Hashes for symba-0.5.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1920dee4c757dd63acbf76adf2bfdeeae11eff9ee169d1f6260a138e885150bd |
|
MD5 | 889f658cb512ef60eea34cdaf829d0b5 |
|
BLAKE2b-256 | 7d25e62f8084b8daffcb328cfae37876f495e2322eb06cbd82ec5bc966581eda |
Hashes for symba-0.5.1-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45ade2029a0b8544cb0370e01d2497fae21e9c2b555f0e483ce938e68f7c7b29 |
|
MD5 | 8e5f5f1e554bfb3669d830b18c72649d |
|
BLAKE2b-256 | f0dc7c00e5e7fc07abe2f8263967a27244ad9b8d28c25d95627a7726d7380e3f |
Hashes for symba-0.5.1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a901196d6b1114e5e3a56999e97ced1a66e5327b3e2d3ea73b0588ea256fac13 |
|
MD5 | f2fdb0c37322d51e918769be7e891519 |
|
BLAKE2b-256 | 5dfbdae9192d14dfdf886cd80d98a3d4fba5635b59dba0320d632c35e6adc816 |
Hashes for symba-0.5.1-cp35-cp35m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df7793d7f5d40827b20c7faf73d8bf81ce8d8885ba026c54caf0bb9e94191d06 |
|
MD5 | e71cbf194564ee742b1b52200192aa8d |
|
BLAKE2b-256 | 65564583333527a66b8327b0b2f8ee2050f11c34d2ae0ee568b2146cc10fc75f |
Hashes for symba-0.5.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84fffbd39e6dd5ff8160618aabf0498d90ed350178dd26066231ce1032087342 |
|
MD5 | 63efb8a2f36a93bcb4b5e0145780e9c4 |
|
BLAKE2b-256 | d1e3476d5014755949de5f0cb01e38f940cfdb4d12670d308b3b8bca9103ac61 |
Hashes for symba-0.5.1-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e63f3df4daee34921645739066606cf43c4f8461885cf4f006c216fceee473e |
|
MD5 | 0e0f8ba4e586ecb949f13816ca91a402 |
|
BLAKE2b-256 | 49e4a7d5f25510db4f0979c60622274ed75d60cb8a4737baef6b71ad60471b10 |
Hashes for symba-0.5.1-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da18cea6666c22a3df4f61486e5b27b1f2145c29cb857abc56d394a36aa5e130 |
|
MD5 | 3ed6a2a6d2b1948140416f8b8ca50256 |
|
BLAKE2b-256 | 18f9335765621580ef94f6711981ca3d925d91da16f30251b1fb91b9185556a3 |