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.6.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81b9c3e89f971c5ac37686aa6997eb13c9c4cb6884dfae425f5028c9f4d8ee1f |
|
MD5 | df691f20b23a5ee35f7e1f6651fb743e |
|
BLAKE2b-256 | 0239d0aba8f54dcc03c0c111e6f27d7812c09897c437d0df7b1461ff780b399e |
Hashes for symba-0.6.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfbdaf8973989ec44c90eb5d458aaa0e0ee56d116ec813646c6422fe087aec66 |
|
MD5 | 30b164781eea44fa7300432d949b7c4c |
|
BLAKE2b-256 | 40ba893166d7d4650b1363160252a942c69487cc8e7405a5322558fdc0a7e638 |
Hashes for symba-0.6.0-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f833d9592e1b6df2dba202a21634acd2b72395a17bd85f7f222f15911a41d342 |
|
MD5 | 8ccf787a8e71b68edaa3c843c4749b03 |
|
BLAKE2b-256 | 99cc1e4af266689f02a42e5a604631c5824c715cbb758708230b2b638457e8a3 |
Hashes for symba-0.6.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5822c1ede8d340433b7bdcb2c55366e245fe1a5d4b937f564eb62c98fa66179 |
|
MD5 | 9097c978c54aa46a6640f1d273f7db59 |
|
BLAKE2b-256 | bced05bfa04d6f5e6357db2c3fddaeb7db67d53c5ee2e3f3e33cf2c3c041b1f2 |
Hashes for symba-0.6.0-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b794a9b68140435397b6a370adb0430b6378abc4bc6abc869bf5333c0b731561 |
|
MD5 | 243cc25eb71be2e5520d56e30f06bb8b |
|
BLAKE2b-256 | 5373064bdf00627282efc85253155a025e172acd4063101a8e5276f747e82df9 |
Hashes for symba-0.6.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa0e1efaa86998598835e2ed1ac996ac505d73e9e41b2b705b1b41de6ec9b27b |
|
MD5 | 8ce992231645d2e6c4342b7e82fb0ceb |
|
BLAKE2b-256 | 812d84da6055418b19c7a73fe7e22cedf7605852f6a42c2c13435a13696453ee |
Hashes for symba-0.6.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b97674494285e98f3fba64eb89428701a5c55bc63d5dbb9c0d02adba39491a6a |
|
MD5 | 63768a924dab01d64b8e994789f4008f |
|
BLAKE2b-256 | 17de2e399c49af185b5ef78dec9d41d23d9378542d6de7d0f8011bd268737d7b |
Hashes for symba-0.6.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d19896c3bf616873b0c05d7c27c1c319471e2e79b02ffeb1c7919258864db684 |
|
MD5 | f6691799894c51b34d55b011d31a7231 |
|
BLAKE2b-256 | cdf34c6f235395ba1affc123f64f7db8a45be8a598f4c7044807e30c40c001cc |
Hashes for symba-0.6.0-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a7ebe2bb1528bb9c6cdaa0af220cc05fd256fa03b2a13f0c9d3d7a8499c9b20 |
|
MD5 | b52c628b23c59734b506ac4431619a98 |
|
BLAKE2b-256 | 77afa47ab51121ee233eb0c6728cb3e5055ecfe933d1c7a24cbbee2f4e6d9d06 |
Hashes for symba-0.6.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 779589e822bb0c4a6fe0558b6f8e0ef80d585446171e687300296ed71ccb9f2c |
|
MD5 | 2f4cc165bd7978d72467bb4362bfdfc0 |
|
BLAKE2b-256 | 5a29936e71e0ef459f9e375983b1700fbd95794785bcdd94fe42f01decd720fc |
Hashes for symba-0.6.0-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95eb87d005afd21e1f39df0a41f0f47e805448946f668234a6a3580e4e838452 |
|
MD5 | 47865b785645f6cd0b64cb4d97b3e8ff |
|
BLAKE2b-256 | 5cb24783e3df7dbe9e5f4ffcc96e9744a96229cc554ad4cad3a117d91a40d389 |
Hashes for symba-0.6.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3fbd4ce8f6098186ded91cd4353f9b4f4f12987da0b3ee2f2ae3d5f2c546980 |
|
MD5 | 9384212a6c01d509cc3a18a21955ee1d |
|
BLAKE2b-256 | 93082d0b57ddbb658827eda2a23beaffcd3d34d31ad33ece0121ce203d941b4d |
Hashes for symba-0.6.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dc6ccfe3146d6c56820d917a8d580c749b7438116375d60a3f6f76b998434fa |
|
MD5 | 9da8a31f829ea5ce872ce0ad6ee22fbe |
|
BLAKE2b-256 | 4c6b2d4ed6b04a9bb226c671f662549ee9f9588a36a5b2739a681411bde55a5b |
Hashes for symba-0.6.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6edde58e7d2e2da407d230fad4d8211dc467f3aad66e4a20ddae3fb39d9d8c19 |
|
MD5 | 08428a304345a6ace791d13054eb9da2 |
|
BLAKE2b-256 | b762cd766f168c7b06f60951b6f91732bb0c4793c2fe0b697bb7ad6ad6b4124c |
Hashes for symba-0.6.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | accb4a49eb4536e6ac701c2cef7cd450668d6ba1e361182dabd1d1ca7dd19936 |
|
MD5 | 43e91767cc67b44e23353e9ea252c0aa |
|
BLAKE2b-256 | 80420581b81c0b84a229516c9f8669c44a64b928c2d4676cbe090ae002def329 |
Hashes for symba-0.6.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58a258b09774e790c9108b43ef0de5490bb00f18e6d63e3125106705f7b3693e |
|
MD5 | a6c7fd70ae847d86c16d1e8cc5963391 |
|
BLAKE2b-256 | 788d718894a04b341aea73834e2ffbdf0d40d682198ddfd84a09135a8d984f5f |
Hashes for symba-0.6.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce8fddbb4116582c2620b502c94f2af4cd8e7dfc7db771e9971eb870feaf483d |
|
MD5 | 7b53db6ef60197464eb4155af6c7ea2c |
|
BLAKE2b-256 | cc11008bd80f2c258984676bb2e75953d9177ebd459ded5b5ecd73697ff1b7a1 |
Hashes for symba-0.6.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e36a85d064c9f2ca03d38997259ba51996c3f7a7ea378ba9c45519e52b4f672b |
|
MD5 | 207e31fd2244253d9d9a09f489387108 |
|
BLAKE2b-256 | 73f88b656663a06f676b6f1252f4e5014759a3bd56f90f717e43f53e95a5ae02 |
Hashes for symba-0.6.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46279af6bb89077f307e0bddc065b519132572d56148c855c1de64e84b585561 |
|
MD5 | d3f42be614001b8bf25d4b6b5c8f4cf4 |
|
BLAKE2b-256 | ec9e8e180756cf25aaadadbded8886e0fdbef290564a77b0711edc282f79432a |
Hashes for symba-0.6.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71f5f05c78e3cb7e8b953dadca13d8968a3bd70f6becc247081d57e4bf82e93c |
|
MD5 | b8527aec3b531050cac365a835180107 |
|
BLAKE2b-256 | ad2e92f85e0181f94e2ff846f0ab7d4ec13d75809d31810d1613aa8fdc947799 |
Hashes for symba-0.6.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da5f952365f41168aa8618d6fc200fda27ef547e3aad77af42dc6156e911a616 |
|
MD5 | 270b8641017925a420e6ed009118d036 |
|
BLAKE2b-256 | 0e486c631d48e0d28fa2aee6c7602465bc1f714a97b65f10a72fde5656c27724 |
Hashes for symba-0.6.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89e945189ecafcf0e0f0c6dea179daa367f00ec220727e4237859fa0068d1e6a |
|
MD5 | c8291471f36df6e8c47dfb2207ec0c73 |
|
BLAKE2b-256 | be9a6e1dadaa404db3a2545c840cd058761610f5f2dacef0d517e0a091839c53 |
Hashes for symba-0.6.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a992c17221abb78a9eb1bdc68e55c5abe9541201749c98e01ff9172a887aad |
|
MD5 | 2dedc5c05fedf9f628f350ac2f29af62 |
|
BLAKE2b-256 | e7fd8e45d679475bf9d8037e2e4bfb2c809a8b613c94135b32cf3b6380efcc84 |
Hashes for symba-0.6.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 992d0851df6a305e61c6b6637cb9ee61dfaf15c8209c485d08c704d8989895fb |
|
MD5 | eb267fc56b730092a182f38029eb8873 |
|
BLAKE2b-256 | 35d0c06acb89e6721304bfc8e318e0af6743e28635ab2c50e64c08d95323344a |
Hashes for symba-0.6.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e02e5a2a065f91882a0eed978c16a68ba1443180e5f952bcdb0decc74655795b |
|
MD5 | 96457fe26c879a90163d7013bc926a84 |
|
BLAKE2b-256 | 0c37695d721b3b970f938d4f261ed2558d55fe6e19bbde7af3342bca626c6c99 |
Hashes for symba-0.6.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31cfe9ed78ed7190a79129fddaa9520ae56f683229a4fd383237307dd2feabc5 |
|
MD5 | bab69f42a588f91b17617421bd8ef99f |
|
BLAKE2b-256 | 50dcb9d543f507290445963e296bf463e37e53bd51e4d34d8ffc2895fff2130a |
Hashes for symba-0.6.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9924825bd0f2bfbc97d3a1f97224680f89e2829b3f85c77b9471813826820b55 |
|
MD5 | 55990e2a05b2b24129832cfb1795005d |
|
BLAKE2b-256 | 6cc7cff3e22fea40478035b7722e20e8b99aa161a77736d93f2aaf60db39a4a1 |
Hashes for symba-0.6.0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 194ea47741275c32b5047388706fdfdbec589fd10925b3edba36d3fbf0ad26a6 |
|
MD5 | 9b212a6dda134cc49e4d3f880be388c5 |
|
BLAKE2b-256 | e413306d6b852e57945fa19990cce35e3a68caeed4911a94be8aec4286f76c42 |
Hashes for symba-0.6.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df3d3078d70410f2b5582a5e310cdceb3ea2c022bed3387fbf808e272cc15291 |
|
MD5 | 744bc1d07ea54a7d4c675e9724cef6c5 |
|
BLAKE2b-256 | 0a5da8e973f47369b4e19315c09e067091df9f599d774b514d7e5cdad4c202da |
Hashes for symba-0.6.0-cp35-cp35m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de3173c1f866a772eadf652475b0f2aba742d899d64ed0a44e8470469a811b4e |
|
MD5 | feeb50fdf6fdd0d2a336f4f195fb3761 |
|
BLAKE2b-256 | 4788f2bf8351854512ebf2e6850b5ae81a324b5e8de177656903e4364646a906 |
Hashes for symba-0.6.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bf2aac6beab785d2b706d6ce89ce7b3dc1cac8c30e79e5e938c178c5e2c4d19 |
|
MD5 | a3a55cb26039e75937428e65eb153290 |
|
BLAKE2b-256 | 97db12e2ed4a3920650ee7b8d5b0f450c611a3aabb1eb924075cc78da17bff57 |
Hashes for symba-0.6.0-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75cc4840e2383b7509c3935c24f045c5482ce6a68e55509a31b2a111167c77c5 |
|
MD5 | 86cbcb0b86e1cac2cd69e537b97fbf7a |
|
BLAKE2b-256 | 415353ed70f52a65ff51241127a46240b242866f69c14f666bf49b56d08e182c |
Hashes for symba-0.6.0-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c34853fa2d25e411b392a2f0fb7608321df664d9ce32fddff206fbf4ebc8437 |
|
MD5 | 62a8a84382ccb62e458fca90780337f8 |
|
BLAKE2b-256 | 20421d13bc690b8860ac8c92c7fa32762fe4c0a924f6ccd88747fd3c68a9e0e0 |