floating


Namefloating JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/mreiche/python-floating
SummaryCalculates floating precision
upload_time2023-05-17 07:24:52
maintainer
docs_urlNone
authorMike Reiche
requires_python
license
keywords
VCS
bugtrack_url
requirements pytest pytest-cov
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Tests Status](https://github.com/mreiche/python-floating/actions/workflows/tests.yml/badge.svg)
[![Code Coverage Status](https://codecov.io/github/mreiche/python-floating/branch/main/graph/badge.svg)](https://app.codecov.io/github/mreiche/python-floating)

# python-floating

Calculates floating precision.

## Basic API

```python
import floating

assert floating.round(13) == 13.00
assert floating.round(13.1337) == 13.13
assert floating.round(0.003751) == 0.0038
```

### Precision

```python
assert floating.round(13, precision=3) == 13.000
```

### Calc precision

```python
assert floating.calc_precision(0.003751, 2) == 4
```

## Run the tests

```shell
PYTHONPATH="." pytest --cov=floating tests/
```

### Release update
1. Update version in `setup.py`
2. Package library
    ```shell
    python setup.py sdist
    ```
3. Publish library
    ```shell
    twine upload dist/floating-[version].tar.gz
    ```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mreiche/python-floating",
    "name": "floating",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Mike Reiche",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/8a/71/fce8497b484bf274871dac4e87706cc7dfd1cf43b0502571f721e20ff45a/floating-0.0.1.tar.gz",
    "platform": null,
    "description": "![Tests Status](https://github.com/mreiche/python-floating/actions/workflows/tests.yml/badge.svg)\n[![Code Coverage Status](https://codecov.io/github/mreiche/python-floating/branch/main/graph/badge.svg)](https://app.codecov.io/github/mreiche/python-floating)\n\n# python-floating\n\nCalculates floating precision.\n\n## Basic API\n\n```python\nimport floating\n\nassert floating.round(13) == 13.00\nassert floating.round(13.1337) == 13.13\nassert floating.round(0.003751) == 0.0038\n```\n\n### Precision\n\n```python\nassert floating.round(13, precision=3) == 13.000\n```\n\n### Calc precision\n\n```python\nassert floating.calc_precision(0.003751, 2) == 4\n```\n\n## Run the tests\n\n```shell\nPYTHONPATH=\".\" pytest --cov=floating tests/\n```\n\n### Release update\n1. Update version in `setup.py`\n2. Package library\n    ```shell\n    python setup.py sdist\n    ```\n3. Publish library\n    ```shell\n    twine upload dist/floating-[version].tar.gz\n    ```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Calculates floating precision",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/mreiche/python-floating"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a71fce8497b484bf274871dac4e87706cc7dfd1cf43b0502571f721e20ff45a",
                "md5": "414b19d893e9c2931c1026fb39a213c3",
                "sha256": "5d79f519f0e4e80350d2e0774948784e1b8a6d82ed77682d41dc49bab46f4317"
            },
            "downloads": -1,
            "filename": "floating-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "414b19d893e9c2931c1026fb39a213c3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1552,
            "upload_time": "2023-05-17T07:24:52",
            "upload_time_iso_8601": "2023-05-17T07:24:52.213333Z",
            "url": "https://files.pythonhosted.org/packages/8a/71/fce8497b484bf274871dac4e87706cc7dfd1cf43b0502571f721e20ff45a/floating-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-17 07:24:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mreiche",
    "github_project": "python-floating",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.3.1"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    "==",
                    "4.0.0"
                ]
            ]
        }
    ],
    "lcname": "floating"
}
        
Elapsed time: 0.12280s