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.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b3f9e7946eb78b2939adf25dc57f36418a351b582f9fe38b710516d64c86e29 |
|
MD5 | 30c67c99ff9112f056cb5f46160c7fa9 |
|
BLAKE2b-256 | b4e9ddd53d228d92187aa59ee562c3a30ea9d0a93de91a2981f1a8d76200ffd3 |
Hashes for symba-0.5.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac5a402739e8e56337dca0677fb3d6e55554604a22dd8a1958e20248559f62d |
|
MD5 | 8c1daf35c7aff857c73e3f07a916e3a9 |
|
BLAKE2b-256 | f2e2a44ae8a83765803f5f66dbb23b5c272a0af8184acc6fbef3987b4546cdee |
Hashes for symba-0.5.0-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3583877e06a34183434101373bcb874a7f3cb48938c43e07906ca9cfef088b71 |
|
MD5 | 6b424fd1bf065c1f5aebef03fe69c79d |
|
BLAKE2b-256 | 983c551d15816c4fd8383406ee18abe51817baa12451c4d8adc4aecac50107e7 |
Hashes for symba-0.5.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3527f2fd2cda0de43e182120e6d173229f058917a7c33382c665950d866e4fd7 |
|
MD5 | 8145eac58d8feb4c617efde8470511f7 |
|
BLAKE2b-256 | b45af3db6beb9d4c5f7a63f1f0732ac222e63e27e9e72f4bc9187b307c929c66 |
Hashes for symba-0.5.0-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efe964ec6824317aaabb47ae08d67fc5158ed5de9afc6e3a9748c28ea26d3f60 |
|
MD5 | b7543b159ddae5b3aabbdcb8fed156e0 |
|
BLAKE2b-256 | c5ad5b86c1fb0e3e6fbf04e6fa1114e3c4ca71fa5e7fc0ea37582c914435b2cd |
Hashes for symba-0.5.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58b3575c7fcfc1a5625a1ae3ae56af644889bad17889f3994d91ee2ce8677353 |
|
MD5 | e66328e79b89e56de99c3f57b998f1d6 |
|
BLAKE2b-256 | b35cbf1694c796afc7c4b6a7fc614d5ea79c8a1a9aaebca9e7c3c5be6bbe8f91 |
Hashes for symba-0.5.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f6d5c95ac1b5febf7c5d6e7bc1bdc14612664f8eeaaa909a1a67ccb4cc36ac5 |
|
MD5 | d51f8fb2e8ca2168ec7691510781d9f9 |
|
BLAKE2b-256 | 34fb298ebb509337978fcde5b10e2085d65c256954846d29d28798874764787b |
Hashes for symba-0.5.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76cc0c1a1fafd6e9be693235b57e00487cb9d6ad298e0110e7d3352033cf05cb |
|
MD5 | 48c529702ed4ad2c4ed33a18a2916579 |
|
BLAKE2b-256 | 8e6ef148b69e522db468b5f89d77fa37860a2a24a579b2924b02d6b59f3568c6 |
Hashes for symba-0.5.0-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db5885e78cd6b48a89a8f840b72d7b5ed0459f516c208afefcd6045228f308b |
|
MD5 | 01f35b8be013ec9a23f9ab7c00a33d02 |
|
BLAKE2b-256 | cc101e6f7b4e945474d8850f5ee0d5af8d3520aa2033a65fe89bba95a2f42910 |
Hashes for symba-0.5.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0fefc0e2dde83a856f792ef8840ae4be4c8f260601a99352b6e43212f5490ee |
|
MD5 | d37f856f08a4246d3a99955261fc5227 |
|
BLAKE2b-256 | 8e35e32254d274b378b27cbb4dabeff9def88a510c5eb1c5e97641bb4fc5e9df |
Hashes for symba-0.5.0-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa98abf06b3ac940c4453e1bbc82576d57ce6682c565938e389f71a89e5e60eb |
|
MD5 | ab3adcfec743222d9fde3e8f2f11d700 |
|
BLAKE2b-256 | 393782035c82788c968e6e8b012ad32b76dfae0b09a37dcae3b1123529a514b0 |
Hashes for symba-0.5.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 758a4ef5f7960f98a1d5b031c38204c8fa0c4085066458eb17a276c84156d01d |
|
MD5 | 7f334803474ff5ab81e068a981acc919 |
|
BLAKE2b-256 | 9c31c178f132c92ea5a8c387034e491ac4eb4632b92656707f646d43c06a428c |
Hashes for symba-0.5.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff91d8a9628e76e3a308ed60d52c80112e3bfd98255374ebe2e5710c2ff6006b |
|
MD5 | 2e22afe99f3241c9051543cb6fca69f8 |
|
BLAKE2b-256 | d245dd919e4399dbfb0290114f9470da7903e536942ebc5768cbbe7145f2dec3 |
Hashes for symba-0.5.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85ee56022cc0137d2e7c307766bdcd5eede06f12303c688a7839bb91cce0536e |
|
MD5 | 0d4e953c517bc7473777c344c5430e90 |
|
BLAKE2b-256 | 4c0a153a88558a10d536c95dae7e161eb3a84004b89474e28208c0d2fa38e964 |
Hashes for symba-0.5.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83310842c07aacb9824d3405771bd2407b7f32ecf8564b9f46335e17bcf3e735 |
|
MD5 | 908568794ea1d08e8c6c6b1c8fe81602 |
|
BLAKE2b-256 | 06759581abbd4c98bdb50112d79a6d4ada88e0d1c55b53fb939448a7511e0fc0 |
Hashes for symba-0.5.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f3dd01554b56c92e5f5c245a483e75e6a674c0458c5fffd7885694c85bcfa83 |
|
MD5 | 6becfa1fc95fc298f093ed8b75cf3011 |
|
BLAKE2b-256 | 996057ef23b0a7e4f2c73dfb1546dae8a8892ab5dccf4b5bf0cce87f1a759c69 |
Hashes for symba-0.5.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1e72737fa7c99e1cbd12b94e8cd6a9ca481a5b661cde43ffebc397790717c43 |
|
MD5 | ad13198ceb109e73d813eabfc602cb2d |
|
BLAKE2b-256 | 44f82bf39e6eacb1cc6162850c7c9f1309d99e35e8ccf57e9bc75d1c4982b638 |
Hashes for symba-0.5.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0600af4154859191df17a3d095fca1b53a40f890983a7839db795f6ce79c3a19 |
|
MD5 | 7b6987c9edde7a5d9b44b970fea815c0 |
|
BLAKE2b-256 | afe37a88cdbc2009aaf7ea06f175258826d0a50e5fc1719b30b2c27c341f8549 |
Hashes for symba-0.5.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d01fc82fe0c1967ec4c5da629a6ec7072ea42e1c2823e9ba2fafc78bfcb70f7d |
|
MD5 | 52ba1150a44f959c1889a4355841a7ed |
|
BLAKE2b-256 | 710d06a134612227da85adaf8af67cb2675e3da1ae960fd3d63612ac4bfbcb58 |
Hashes for symba-0.5.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8c2bea3a7a4cc72055579c13ccaf5539f64169877bfa6123ce5885a4965b882 |
|
MD5 | 4d4c7d26f0663b026c0f9ff310967b20 |
|
BLAKE2b-256 | f67095536767fc82a3c27078814245d8c38a075ed2ecdbea251468e9d724e7db |
Hashes for symba-0.5.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b680d56135f2955abd86ba6807a922dbd026d3199a04ace31549c99d07bd75e4 |
|
MD5 | 52c3fd960ad65a853a3b2fcf92b4f652 |
|
BLAKE2b-256 | c80ae4a7c0cc605c03db13c366de8d99d7e53907956db7d1b4b4d6cbe1e856d1 |
Hashes for symba-0.5.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56349ed8176cf3a31ff841c4575b7b4232f65e377e5c5f74fd4044cb5b8b6253 |
|
MD5 | fcc0774e7332e689d1bbe2569778c315 |
|
BLAKE2b-256 | 0dbb393e42d404c199c166314dacc904068479564f3ddb7294852ace992848ff |
Hashes for symba-0.5.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e0a57c396ae8876fe85d4117d9f8eccd809c8c7857d67a1b5096ce9ebfc1af |
|
MD5 | 56f7965911dec119a2b4a01533cf72d5 |
|
BLAKE2b-256 | 8472e4c08ef8a4dfb0a8b10e1109cbae69710521c786cebda2c478cb45fd9d81 |
Hashes for symba-0.5.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f141413291bd33ddade75c46e0d84c1c1fcd0424365505970ac067674c697d9c |
|
MD5 | de09bbda49f1facffe8b990dbd019191 |
|
BLAKE2b-256 | 27905990a1861af19e8a48a14984b57c35526244f545c83da693d1ea5d31b616 |
Hashes for symba-0.5.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27d5bb4570471a3c3bfc321ee5ac86eeb36f77228ae1245bd029a33dee0f0fc2 |
|
MD5 | 72e507b15154a852a2168d9b2bb1a660 |
|
BLAKE2b-256 | d88f4ca7fd9a1cb0d92ae5280acddcb97e60a9bd3f40944ea1a5477c5d0c20b6 |
Hashes for symba-0.5.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e72a959a6fbbfeb5fb916dc6d87ddc88f2450ee86380e04f5f8ec6606a0e64a |
|
MD5 | 8f787d4f407f8913b7851f8922d3715f |
|
BLAKE2b-256 | 89a48576c35c3185b8cdbbb66e770bbb86aa62fc89ca9b4ac49470e91c07690a |
Hashes for symba-0.5.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40edbf53283c0098b09107ddea1847d26a01707f0ad3166c2291450ae93b103b |
|
MD5 | 54ebcdf0a17d11c4f3017792699c10c3 |
|
BLAKE2b-256 | e9b731e943425c002f5c05cdd93c06794c78f7467da01fda9b76742051b798e2 |
Hashes for symba-0.5.0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1aecbefd083f570013f1334d56b2d7964c509052e1cb7199ccd9d4ec24e9b98 |
|
MD5 | e51f6633d52e96ee1641da2a3c6f54ed |
|
BLAKE2b-256 | b25943cfb0fb7767a738535a50e0e36f64ab3cac280aa3a01b99dc931821c3df |
Hashes for symba-0.5.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99d3d5c0c722331efcbb539f56d1b501a9237b099242ffc8586894b12b23e718 |
|
MD5 | 1d4b1cffd2a62ea3e45bda6c3d15121a |
|
BLAKE2b-256 | 4a3e8f36e6ed2e5235e7047c9c550f25dd9ade7d13a3be00eeda2427e22aa149 |
Hashes for symba-0.5.0-cp35-cp35m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aa2cec7df61351b42f3e3e29ca0c08f31d142fc09ec953a67540afd7df50c20 |
|
MD5 | 994fb87c9d6a4c2464e1d88fb284edc3 |
|
BLAKE2b-256 | 1b296540454707cf21c8f335e37a5364510ec48ea28b5cb34b99a94cc413224b |
Hashes for symba-0.5.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 301b671e627be457ea0fbd447433ac03870dae7ece3bc88ad4b4ce4a22ee5290 |
|
MD5 | ccf1c009f4a30473703e6f14b8705330 |
|
BLAKE2b-256 | 60e563757aa5de81ab245657ff946425a5de8c41760fec83e2d945f3d5fbdbf0 |
Hashes for symba-0.5.0-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eae7429e449312d7789b904492976bb781178dfb2a5988aac8443a3afca154f3 |
|
MD5 | 6baca2531489bd5247814af4adade6b5 |
|
BLAKE2b-256 | 9a2af194f15412651d95eba85dca6008cbb24561927b38f62eda1e0cf0c3a82b |
Hashes for symba-0.5.0-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a917d90249f5afb16fea41292027c4839786cef5a92db9eee7b400db02b6770 |
|
MD5 | b9cde8fcdc723c6b474117381ef39ce7 |
|
BLAKE2b-256 | e68eadd6386e370e3572dc2df7fecc1d524b34c1e72141d508d9f51726e151f9 |