foolproof


Namefoolproof JSON
Version 0.1.7 PyPI version JSON
download
home_pagehttps://github.com/NicolasMICAUX/foolproof
SummaryFind all exceptions that your code and its dependencies can raise, to make your work foolproof!
upload_time2023-12-14 10:37:36
maintainer
docs_urlNone
authorNicolas Micaux
requires_python>=3.5
license
keywords exception foolproof
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <a name="readme-top"></a>
<!-- [![Contributors][contributors-shield]][contributors-url][![Forks][forks-shield]][forks-url] -->
<!-- [![Stargazers][stars-shield]][stars-url] -->
<!-- [![Issues][issues-shield]][issues-url] -->
<!--[![LinkedIn][linkedin-shield]][linkedin-url]-->
[![PyPi version][pypi-shield]][pypi-url]
<!--[![Python 2][python2-shield]][python-url]-->
[![Python 3][python3-shield]][python-url]


<!-- PROJECT LOGO -->
<br />
<div align="center">

  <img src="https://images.emojiterra.com/google/noto-emoji/unicode-15/color/512px/1faa8.png" alt="Logo" width="160" height="160">
  <h1 align="center">FoolProof</h1>

  <p align="center">
    Find all exceptions that your code and its dependencies can raise, to make your work foolproof!
    <br />
<!--
    <a href="https://github.com/NicolasMICAUX/foolproof"><strong>Explore the docs »</strong></a>
-->
    <br />
    <br />
    <!--
    <a href="https://github.com/NicolasMICAUX/foolproof">View Demo</a>
    ·
    -->
    <a href="https://github.com/NicolasMICAUX/foolproof/issues">Report Bug</a>
</div>


<!-- ABOUT THE PROJECT -->
## About The Project

<!-- [Screen Shot][product-screenshot] -->
Do you know about the "demo effect"? The fact that your well-tested code will suddently fail the moment you show it to someone? Often, it's because you forgot to handle an exception that you didn't think about.

🪨 FoolProof automatically identifies the exceptions that your code and its dependencies can raise, so you're never caught off guard again!

<!-- GETTING STARTED -->
## Getting Started
Using foolproof is very simple.

Install foolproof with pip :
```sh
pip install foolproof
```

To analyse an entire module `mypackage`, with all the functions and methods it contains, add this lines at the begginning of your code:
```python
import foolproof
import mypackage

foolproof(mypackage)
```

You can also use it directly on a function:
```python
import foolproof
from mypackage import main

foolproof(main)
```

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- CONTRIBUTING -->
## Contributing
Ideally, I would like to add more features to foolproof, but I don't have much time for it. If you want to contribute, you're more than welcome to do so!

### Roadmap/todo
| Task | Importance | Difficulty | Contributor on it | Description  |
|:-----|------------|------------|-------------------|:-------------|
| Adding links to file | 5/5 | 5/5 | - | More than printing the raise command, we should print the link to the file in which the `raise` is used. This implies a major rework of foolproof, as the python `ast` does not keep the link between ast nodes and files. |

<!--
Non-Code contribution :

| Task | Importance | Difficulty | Contributor on it | Description  |
|:-----|------------|------------|-------------------|:-------------|
|      | ./5        | ./5        | NOBODY            | _e.g._ : ... |
-->

<!--
_For every todo, just click on the link to find the discussion where I describe how I would do it._  
See the [open issues](https://github.com/NicolasMICAUX/foolproof/issues) for a full list of proposed features (and known issues).
-->

<p align="right">(<a href="#readme-top">back to top</a>)</p>

### How to contribute
Contributing is an awesome way to learn, inspire, and help others. Any contributions you make are **greatly appreciated**, even if it's just about styling and best practices.

If you have a suggestion that would make this project better, please fork the repo and create a pull request.  
Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/YourAmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request


## Author
This library was created by [Nicolas MICAUX](https://github.com/NicolasMICAUX).

## Acknowledgements
A lot of this code is taken from https://github.com/DontShaveTheYak/deep-ast (https://pypi.org/project/deep-ast/)  
License: GNU General Public License v3 (GPLv3)  
All credits goes to Levi Blaney - @shady_cuz, shadycuz@gmail.com

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/NicolasMICAUX/foolproof.svg?style=for-the-badge
[contributors-url]: https://github.com/NicolasMICAUX/foolproof/graphs/contributors
[stars-shield]: https://img.shields.io/github/stars/NicolasMICAUX/foolproof.svg?style=for-the-badge
[stars-url]: https://github.com/NicolasMICAUX/foolproof/stargazers
[issues-shield]: https://img.shields.io/github/issues/NicolasMICAUX/foolproof.svg?style=for-the-badge
[issues-url]: https://github.com/NicolasMICAUX/foolproof/issues
[pypi-shield]: https://img.shields.io/pypi/v/foolproof.svg?style=for-the-badge
[pypi-url]: https://pypi.org/project/foolproof/
[python2-shield]: https://img.shields.io/badge/python-2.7+-blue.svg?style=for-the-badge
[python3-shield]: https://img.shields.io/badge/python-3.5+-blue.svg?style=for-the-badge
[python-url]: https://www.python.org/downloads/

[//]: # ([license-shield]: https://img.shields.io/github/license/NicolasMICAUX/foolproof.svg?style=for-the-badge)
[//]: # ([license-url]: https://github.com/NicolasMICAUX/foolproof/blob/master/LICENSE.txt)
[//]: # ([linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555)
[//]: # ([linkedin-url]: https://linkedin.com/in/othneildrew)
[product-screenshot]: images/screenshot.png




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NicolasMICAUX/foolproof",
    "name": "foolproof",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "exception,foolproof",
    "author": "Nicolas Micaux",
    "author_email": "micaux.nicolas@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fc/2d/bfb9fe9400c76ee7735b15b20a1b0d2bcd3fce75eee64e82b0ce0fddd0b4/foolproof-0.1.7.tar.gz",
    "platform": null,
    "description": "<a name=\"readme-top\"></a>\n<!-- [![Contributors][contributors-shield]][contributors-url][![Forks][forks-shield]][forks-url] -->\n<!-- [![Stargazers][stars-shield]][stars-url] -->\n<!-- [![Issues][issues-shield]][issues-url] -->\n<!--[![LinkedIn][linkedin-shield]][linkedin-url]-->\n[![PyPi version][pypi-shield]][pypi-url]\n<!--[![Python 2][python2-shield]][python-url]-->\n[![Python 3][python3-shield]][python-url]\n\n\n<!-- PROJECT LOGO -->\n<br />\n<div align=\"center\">\n\n  <img src=\"https://images.emojiterra.com/google/noto-emoji/unicode-15/color/512px/1faa8.png\" alt=\"Logo\" width=\"160\" height=\"160\">\n  <h1 align=\"center\">FoolProof</h1>\n\n  <p align=\"center\">\n    Find all exceptions that your code and its dependencies can raise, to make your work foolproof!\n    <br />\n<!--\n    <a href=\"https://github.com/NicolasMICAUX/foolproof\"><strong>Explore the docs \u00bb</strong></a>\n-->\n    <br />\n    <br />\n    <!--\n    <a href=\"https://github.com/NicolasMICAUX/foolproof\">View Demo</a>\n    \u00b7\n    -->\n    <a href=\"https://github.com/NicolasMICAUX/foolproof/issues\">Report Bug</a>\n</div>\n\n\n<!-- ABOUT THE PROJECT -->\n## About The Project\n\n<!-- [Screen Shot][product-screenshot] -->\nDo you know about the \"demo effect\"? The fact that your well-tested code will suddently fail the moment you show it to someone? Often, it's because you forgot to handle an exception that you didn't think about.\n\n\ud83e\udea8 FoolProof automatically identifies the exceptions that your code and its dependencies can raise, so you're never caught off guard again!\n\n<!-- GETTING STARTED -->\n## Getting Started\nUsing foolproof is very simple.\n\nInstall foolproof with pip :\n```sh\npip install foolproof\n```\n\nTo analyse an entire module `mypackage`, with all the functions and methods it contains, add this lines at the begginning of your code:\n```python\nimport foolproof\nimport mypackage\n\nfoolproof(mypackage)\n```\n\nYou can also use it directly on a function:\n```python\nimport foolproof\nfrom mypackage import main\n\nfoolproof(main)\n```\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n<!-- CONTRIBUTING -->\n## Contributing\nIdeally, I would like to add more features to foolproof, but I don't have much time for it. If you want to contribute, you're more than welcome to do so!\n\n### Roadmap/todo\n| Task | Importance | Difficulty | Contributor on it | Description  |\n|:-----|------------|------------|-------------------|:-------------|\n| Adding links to file | 5/5 | 5/5 | - | More than printing the raise command, we should print the link to the file in which the `raise` is used. This implies a major rework of foolproof, as the python `ast` does not keep the link between ast nodes and files. |\n\n<!--\nNon-Code contribution :\n\n| Task | Importance | Difficulty | Contributor on it | Description  |\n|:-----|------------|------------|-------------------|:-------------|\n|      | ./5        | ./5        | NOBODY            | _e.g._ : ... |\n-->\n\n<!--\n_For every todo, just click on the link to find the discussion where I describe how I would do it._  \nSee the [open issues](https://github.com/NicolasMICAUX/foolproof/issues) for a full list of proposed features (and known issues).\n-->\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n### How to contribute\nContributing is an awesome way to learn, inspire, and help others. Any contributions you make are **greatly appreciated**, even if it's just about styling and best practices.\n\nIf you have a suggestion that would make this project better, please fork the repo and create a pull request.  \nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/YourAmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n## Author\nThis library was created by [Nicolas MICAUX](https://github.com/NicolasMICAUX).\n\n## Acknowledgements\nA lot of this code is taken from https://github.com/DontShaveTheYak/deep-ast (https://pypi.org/project/deep-ast/)  \nLicense: GNU General Public License v3 (GPLv3)  \nAll credits goes to Levi Blaney - @shady_cuz, shadycuz@gmail.com\n\n<!-- MARKDOWN LINKS & IMAGES -->\n<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->\n[contributors-shield]: https://img.shields.io/github/contributors/NicolasMICAUX/foolproof.svg?style=for-the-badge\n[contributors-url]: https://github.com/NicolasMICAUX/foolproof/graphs/contributors\n[stars-shield]: https://img.shields.io/github/stars/NicolasMICAUX/foolproof.svg?style=for-the-badge\n[stars-url]: https://github.com/NicolasMICAUX/foolproof/stargazers\n[issues-shield]: https://img.shields.io/github/issues/NicolasMICAUX/foolproof.svg?style=for-the-badge\n[issues-url]: https://github.com/NicolasMICAUX/foolproof/issues\n[pypi-shield]: https://img.shields.io/pypi/v/foolproof.svg?style=for-the-badge\n[pypi-url]: https://pypi.org/project/foolproof/\n[python2-shield]: https://img.shields.io/badge/python-2.7+-blue.svg?style=for-the-badge\n[python3-shield]: https://img.shields.io/badge/python-3.5+-blue.svg?style=for-the-badge\n[python-url]: https://www.python.org/downloads/\n\n[//]: # ([license-shield]: https://img.shields.io/github/license/NicolasMICAUX/foolproof.svg?style=for-the-badge)\n[//]: # ([license-url]: https://github.com/NicolasMICAUX/foolproof/blob/master/LICENSE.txt)\n[//]: # ([linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555)\n[//]: # ([linkedin-url]: https://linkedin.com/in/othneildrew)\n[product-screenshot]: images/screenshot.png\n\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Find all exceptions that your code and its dependencies can raise, to make your work foolproof!",
    "version": "0.1.7",
    "project_urls": {
        "Homepage": "https://github.com/NicolasMICAUX/foolproof"
    },
    "split_keywords": [
        "exception",
        "foolproof"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fc2dbfb9fe9400c76ee7735b15b20a1b0d2bcd3fce75eee64e82b0ce0fddd0b4",
                "md5": "38fbb45c9c33e846797d3dacf852c65a",
                "sha256": "4c478ac1dd55415a258ed378ffec8d34661d23ee495c91ab389a0449ad9c008f"
            },
            "downloads": -1,
            "filename": "foolproof-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "38fbb45c9c33e846797d3dacf852c65a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 8827,
            "upload_time": "2023-12-14T10:37:36",
            "upload_time_iso_8601": "2023-12-14T10:37:36.299527Z",
            "url": "https://files.pythonhosted.org/packages/fc/2d/bfb9fe9400c76ee7735b15b20a1b0d2bcd3fce75eee64e82b0ce0fddd0b4/foolproof-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-14 10:37:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NicolasMICAUX",
    "github_project": "foolproof",
    "github_not_found": true,
    "lcname": "foolproof"
}
        
Elapsed time: 0.17878s