{"id":19097306,"url":"https://github.com/lycantropos/symba","last_synced_at":"2025-04-30T14:30:08.388Z","repository":{"id":57472841,"uuid":"343768114","full_name":"lycantropos/symba","owner":"lycantropos","description":"Symbolic computations","archived":false,"fork":false,"pushed_at":"2023-05-11T23:10:41.000Z","size":437,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T04:41:22.928Z","etag":null,"topics":["sqrt","square-root","symbolic-computation"],"latest_commit_sha":null,"homepage":"https://symba.rtfd.io","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/lycantropos.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2021-03-02T12:32:36.000Z","updated_at":"2022-03-26T21:20:54.000Z","dependencies_parsed_at":"2025-04-18T16:55:13.513Z","dependency_job_id":"3c2f9798-947a-4277-9483-c25f363b6a3e","html_url":"https://github.com/lycantropos/symba","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lycantropos%2Fsymba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lycantropos%2Fsymba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lycantropos%2Fsymba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lycantropos%2Fsymba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lycantropos","download_url":"https://codeload.github.com/lycantropos/symba/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251721357,"owners_count":21632822,"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":["sqrt","square-root","symbolic-computation"],"created_at":"2024-11-09T03:39:55.278Z","updated_at":"2025-04-30T14:30:08.368Z","avatar_url":"https://github.com/lycantropos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"symba\n=====\n\n[![](https://github.com/lycantropos/symba/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/lycantropos/symba/actions/workflows/ci.yml \"Github Actions\")\n[![](https://readthedocs.org/projects/symba/badge/?version=latest)](https://symba.readthedocs.io/en/latest \"Documentation\")\n[![](https://codecov.io/gh/lycantropos/symba/branch/master/graph/badge.svg)](https://codecov.io/gh/lycantropos/symba \"Codecov\")\n[![](https://img.shields.io/github/license/lycantropos/symba.svg)](https://github.com/lycantropos/symba/blob/master/LICENSE \"License\")\n[![](https://badge.fury.io/py/symba.svg)](https://badge.fury.io/py/symba \"PyPI\")\n\nIn what follows `python` is an alias for `python3.7` or `pypy3.7`\nor any later version (`python3.8`, `pypy3.8` and so on).\n\nInstallation\n------------\n\nInstall the latest `pip` \u0026 `setuptools` packages versions\n```bash\npython -m pip install --upgrade pip setuptools\n```\n\n### User\n\nDownload and install the latest stable version from `PyPI` repository\n```bash\npython -m pip install --upgrade symba\n```\n\n### Developer\n\nDownload the latest version from `GitHub` repository\n```bash\ngit clone https://github.com/lycantropos/symba.git\ncd symba\n```\n\nInstall dependencies\n```bash\npython -m pip install -r requirements.txt\n```\n\nInstall\n```bash\npython setup.py install\n```\n\nUsage\n-----\n```python\n\u003e\u003e\u003e from symba.base import Expression, sqrt\n\u003e\u003e\u003e golden_ratio = (1 + sqrt(5)) / 2\n\u003e\u003e\u003e isinstance(golden_ratio, Expression)\nTrue\n\u003e\u003e\u003e golden_ratio * golden_ratio == golden_ratio + 1\nTrue\n\u003e\u003e\u003e 1 / golden_ratio == golden_ratio - 1\nTrue\n\u003e\u003e\u003e def fibonacci(index: int) -\u003e Expression:\n...     \"\"\"\n...     Based on:\n...     https://en.wikipedia.org/wiki/Golden_ratio#Relationship_to_Fibonacci_sequence\n...     \"\"\"\n...     golden_ratio_power = golden_ratio ** index\n...     return ((golden_ratio_power - (-1) ** index / golden_ratio_power)\n...             / sqrt(5))\n\u003e\u003e\u003e fibonacci(0) == 0\nTrue\n\u003e\u003e\u003e fibonacci(1) == 1\nTrue\n\u003e\u003e\u003e fibonacci(100) == 354224848179261915075\nTrue\n\n```\n\nDevelopment\n-----------\n\n### Bumping version\n\n#### Preparation\n\nInstall\n[bump2version](https://github.com/c4urself/bump2version#installation).\n\n#### Pre-release\n\nChoose which version number category to bump following [semver\nspecification](http://semver.org/).\n\nTest bumping version\n```bash\nbump2version --dry-run --verbose $CATEGORY\n```\n\nwhere `$CATEGORY` is the target version number category name, possible\nvalues are `patch`/`minor`/`major`.\n\nBump version\n```bash\nbump2version --verbose $CATEGORY\n```\n\nThis will set version to `major.minor.patch-alpha`. \n\n#### Release\n\nTest bumping version\n```bash\nbump2version --dry-run --verbose release\n```\n\nBump version\n```bash\nbump2version --verbose release\n```\n\nThis will set version to `major.minor.patch`.\n\n### Running tests\n\nInstall dependencies\n```bash\npython -m pip install -r requirements-tests.txt\n```\n\nPlain\n```bash\npytest\n```\n\nInside `Docker` container:\n- with `CPython`\n  ```bash\n  docker-compose --file docker-compose.cpython.yml up\n  ```\n- with `PyPy`\n  ```bash\n  docker-compose --file docker-compose.pypy.yml up\n  ```\n\n`Bash` script (e.g. can be used in `Git` hooks):\n- with `CPython`\n  ```bash\n  ./run-tests.sh\n  ```\n  or\n  ```bash\n  ./run-tests.sh cpython\n  ```\n\n- with `PyPy`\n  ```bash\n  ./run-tests.sh pypy\n  ```\n\n`PowerShell` script (e.g. can be used in `Git` hooks):\n- with `CPython`\n  ```powershell\n  .\\run-tests.ps1\n  ```\n  or\n  ```powershell\n  .\\run-tests.ps1 cpython\n  ```\n- with `PyPy`\n  ```powershell\n  .\\run-tests.ps1 pypy\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flycantropos%2Fsymba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flycantropos%2Fsymba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flycantropos%2Fsymba/lists"}