{
"info": {
"author": "Zax Rosenberg",
"author_email": "zaxr@protonmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8"
],
"description": "Bulwark's Documentation\n========================================\n
\n\n
\n
\n
\n
\n
\n\n
\n
\n
\n\nBulwark is a package for convenient property-based testing of pandas dataframes.\n\nDocumentation: https://bulwark.readthedocs.io/en/latest/index.html\n\nThis project was heavily influenced by the no-longer-supported [Engarde](https://github.com/TomAugspurger/engarde) library\nby Tom Augspurger(thanks for the head start, Tom!),\nwhich itself was modeled after\nthe R library [assertr](https://github.com/ropenscilabs/assertr).\n\nWhy?\n====\n\nData are messy, and pandas is one of the go-to libraries for analyzing tabular data.\nIn the real world,\ndata analysts and scientists often feel like they don't have the time or energy\nto think of and write tests for their data.\nBulwark's goal is to let you check\nthat your data meets your assumptions of what it should look like\nat any (and every) step in your code,\nwithout making you work too hard.\n\nInstallation\n=============\n\n```bash\npip install bulwark\n```\n\nor\n\n```bash\nconda install -c conda-forge bulwark\n```\n\nNote that the latest version of Bulwark will only be compatible with newer version of Python, Numpy, and Pandas. This is to encourage upgrades that themselves can help minimize bugs, allow Bulwark to take advantage of the latest language/library features, reduce the technical debt of maintaining Bulwark, and to be consistent with Numpy's community version support recommendation in [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html). See the table below for officially supported versions:\n\n| Bulwark | Python | Numpy | Pandas |\n|:-------:|:------:|:------:|:--------:|\n| 0.6.0 | >=3.6 | >=1.15 | >=0.23.0 |\n| <=0.5.3 | >=3.5 | >=1.8 | >=0.16.2 |\n| | | | |\n\n\nUsage\n=====\n\nBulwark comes with checks for many of the common assumptions you might want to validate\nfor the functions that make up your ETL pipeline,\nand lets you toss those checks as decorators\non the functions you're already writing:\n\n```python\n import bulwark.decorators as dc\n\n @dc.IsShape((-1, 10))\n @dc.IsMonotonic(strict=True)\n @dc.HasNoNans()\n def compute(df):\n # complex operations to determine result\n ...\n return result_df\n```\n\nStill want to have more robust test files?\nBulwark's got you covered there, too, with importable functions.\n\n```python\n import bulwark.checks as ck\n\n df.pipe(ck.has_no_nans())\n```\n\nWon't I have to go clean up all those decorators when I'm ready to go to production?\nNope - just toggle the built-in \"enabled\" flag available for every decorator.\n\n```python\n @dc.IsShape((3, 2), enabled=False)\n def compute(df):\n # complex operations to determine result\n ...\n return result_df\n```\n\nWhat if the test I want isn't part of the library?\nUse the built-in `CustomCheck` to use your own custom function!\n\n```python\n import bulwark.checks as ck\n import bulwark.decorators as dc\n import numpy as np\n import pandas as pd\n\n def len_longer_than(df, l):\n if len(df) <= l:\n raise AssertionError(\"df is not as long as expected.\")\n return df\n\n @dc.CustomCheck(len_longer_than, 10, enabled=False)\n def append_a_df(df, df2):\n return df.append(df2, ignore_index=True)\n\n df = pd.DataFrame({\"a\": [1, 2, 3], \"b\": [4, 5, 6]})\n df2 = pd.DataFrame({\"a\": [1, np.nan, 3, 4], \"b\": [4, 5, 6, 7]})\n\n append_a_df(df, df2) # doesn't fail because the check is disabled\n```\n\nWhat if I want to run a lot of tests and want to see all the errors at once?\nYou can use the built-in `MultiCheck`.\nIt will collect all of the errors\nand either display a warning message of throw an exception based on the `warn` flag.\nYou can even use custom functions with MultiCheck:\n\n```python\n def len_longer_than(df, l):\n if len(df) <= l:\n raise AssertionError(\"df is not as long as expected.\")\n return df\n\n # `checks` takes a dict of function: dict of params for that function.\n # Note that those function params EXCLUDE df.\n # Also note that when you use MultiCheck, there's no need to use CustomCheck - just feed in the function.\n @dc.MultiCheck(checks={ck.has_no_nans: {\"columns\": None},\n len_longer_than: {\"l\": 6}},\n warn=False)\n def append_a_df(df, df2):\n return df.append(df2, ignore_index=True)\n\n df = pd.DataFrame({\"a\": [1, 2, 3], \"b\": [4, 5, 6]})\n df2 = pd.DataFrame({\"a\": [1, np.nan, 3, 4], \"b\": [4, 5, 6, 7]})\n\n append_a_df(df, df2)\n```\n\nSee [examples](https://bulwark.readthedocs.io/en/latest/examples.html) to see more advanced usage.\n\n## Contributing\n\nBulwark is always looking for new contributors!\nWe work hard to make contributing as easy as possible,\nand previous open source experience is not required!\nPlease see [contributing.md](docs/contributing.md) for how to get started.\n\nThank you to all our past contributors, especially these folks: \n[](https://sourcerer.io/fame/ZaxR/ZaxR/bulwark/links/0)[](https://sourcerer.io/fame/ZaxR/ZaxR/bulwark/links/1)[](https://sourcerer.io/fame/ZaxR/ZaxR/bulwark/links/2)[](https://sourcerer.io/fame/ZaxR/ZaxR/bulwark/links/3)[](https://sourcerer.io/fame/ZaxR/ZaxR/bulwark/links/4)[](https://sourcerer.io/fame/ZaxR/ZaxR/bulwark/links/5)[](https://sourcerer.io/fame/ZaxR/ZaxR/bulwark/links/6)[](https://sourcerer.io/fame/ZaxR/ZaxR/bulwark/links/7)",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/zaxr/bulwark",
"keywords": "data analysis testing",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "bulwark",
"package_url": "https://pypi.org/project/bulwark/",
"platform": "",
"project_url": "https://pypi.org/project/bulwark/",
"project_urls": {
"Homepage": "https://github.com/zaxr/bulwark"
},
"release_url": "https://pypi.org/project/bulwark/0.6.1/",
"requires_dist": null,
"requires_python": ">=3.6",
"summary": "A python package for defensive data analysis.",
"version": "0.6.1",
"yanked": false,
"yanked_reason": null
},
"last_serial": 7361258,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "d7050cb6149c31ed14ae53d8901a55cb",
"sha256": "5a215c0ab8c0fc75d46210f6862af01458cf5cf1708eb7bcb504018196cf9c6b"
},
"downloads": -1,
"filename": "bulwark-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "d7050cb6149c31ed14ae53d8901a55cb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18799,
"upload_time": "2019-01-12T16:28:41",
"upload_time_iso_8601": "2019-01-12T16:28:41.391901Z",
"url": "https://files.pythonhosted.org/packages/fe/db/915a3c4de8269c62b0081123728f27eac983ce4f077763c9011d803a3524/bulwark-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "7b19258a37080371863859c1c0547549",
"sha256": "6952e895bd418c1ade708c45b5536f117790a3d91d0fcc41469bba3b9d086953"
},
"downloads": -1,
"filename": "bulwark-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "7b19258a37080371863859c1c0547549",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18848,
"upload_time": "2019-01-12T16:56:53",
"upload_time_iso_8601": "2019-01-12T16:56:53.392322Z",
"url": "https://files.pythonhosted.org/packages/89/f5/11b1d17cad265d95cc5ab98d0f4fc43b9966a25489cd94211b0adf7c9f28/bulwark-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "b34edd03cdc782c69c4d49737d5df0ce",
"sha256": "94d63e4047c3bdbb484eae1b6dcab0ffc75be30e66d2ab1a7d0e7a75638842d8"
},
"downloads": -1,
"filename": "bulwark-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "b34edd03cdc782c69c4d49737d5df0ce",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21108,
"upload_time": "2019-01-13T20:04:06",
"upload_time_iso_8601": "2019-01-13T20:04:06.700462Z",
"url": "https://files.pythonhosted.org/packages/33/6c/a5dac88d5c8ee9b9e428e32a4115e744690f4b2e2165ac0b3384aa66a01c/bulwark-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "b1ea4437c41ec4d8ca7dbdeefbedd59f",
"sha256": "a5fb168f7a2adc340da2c328512863649eb973cd133df5d4e1912a57700757d3"
},
"downloads": -1,
"filename": "bulwark-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "b1ea4437c41ec4d8ca7dbdeefbedd59f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21572,
"upload_time": "2019-05-29T19:47:02",
"upload_time_iso_8601": "2019-05-29T19:47:02.851293Z",
"url": "https://files.pythonhosted.org/packages/d7/75/949a9cd4595601700e351951b20c2d96ff730f29dc76ccd2cc6ae7c34ebc/bulwark-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.3.0": [
{
"comment_text": "",
"digests": {
"md5": "6f27783bbdfe3d3dfdc5c0c39946bb62",
"sha256": "8a9b29f587c25747cd779b8a2b574f93c5a98236ab7c95a7e521f499eaf72d70"
},
"downloads": -1,
"filename": "bulwark-0.3.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "6f27783bbdfe3d3dfdc5c0c39946bb62",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 19908,
"upload_time": "2019-07-28T13:01:39",
"upload_time_iso_8601": "2019-07-28T13:01:39.827114Z",
"url": "https://files.pythonhosted.org/packages/d5/77/2e045247e4be7bbcfb44f6ac235e7a484fccac4418da1adb0bac9d0cacd5/bulwark-0.3.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "95c17234d59f9e21af0d58e8abe7a70f",
"sha256": "580873a2d955e098dd67b5dd7fbd654e2cf8cd47023c553941ce561893866a3b"
},
"downloads": -1,
"filename": "bulwark-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "95c17234d59f9e21af0d58e8abe7a70f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21749,
"upload_time": "2019-05-30T18:49:59",
"upload_time_iso_8601": "2019-05-30T18:49:59.773488Z",
"url": "https://files.pythonhosted.org/packages/27/f3/2259f5a56d2bd848aa3357c94748bdfa297ed68952e3c0ff4939cb7fc1e6/bulwark-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.4.2": [
{
"comment_text": "",
"digests": {
"md5": "b249d251eb457cd1fb4396eb208dd420",
"sha256": "0fcdd0cd01fb16356629cf26aa792e973f642922663ea10f16c2ae5ee0260163"
},
"downloads": -1,
"filename": "bulwark-0.4.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "b249d251eb457cd1fb4396eb208dd420",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 20735,
"upload_time": "2019-07-28T13:01:44",
"upload_time_iso_8601": "2019-07-28T13:01:44.564429Z",
"url": "https://files.pythonhosted.org/packages/49/e7/59f6c225b36493c9b3e7a81414363ea0f4db96516c9163be135a8be5a0ea/bulwark-0.4.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"0.5.0": [
{
"comment_text": "",
"digests": {
"md5": "1998fbbb1bd97db00b18019e7db1d4f4",
"sha256": "24a95965cb9317cf40112386b69411cb318804c2cd5246ef9f9e1c8aed64cedc"
},
"downloads": -1,
"filename": "bulwark-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "1998fbbb1bd97db00b18019e7db1d4f4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21195,
"upload_time": "2019-08-18T19:44:29",
"upload_time_iso_8601": "2019-08-18T19:44:29.549219Z",
"url": "https://files.pythonhosted.org/packages/bc/90/2fddf69c3e904b05371ec8b05277e726a6ad96d55d148b8905f85d671d18/bulwark-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.5.1": [
{
"comment_text": "",
"digests": {
"md5": "55d4a92d4416fc6cd11fa2a8ad4c8f3f",
"sha256": "bb100ceed08cdb89d74300695110b0533296ebc2b712bee2f7e168103abd1a19"
},
"downloads": -1,
"filename": "bulwark-0.5.1.tar.gz",
"has_sig": false,
"md5_digest": "55d4a92d4416fc6cd11fa2a8ad4c8f3f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22948,
"upload_time": "2019-08-30T00:43:21",
"upload_time_iso_8601": "2019-08-30T00:43:21.201829Z",
"url": "https://files.pythonhosted.org/packages/13/b1/f01e939d91590ca692bd9e283ea83fbe79ca111a32bb391a0306fc8a1f84/bulwark-0.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.5.2": [
{
"comment_text": "",
"digests": {
"md5": "7f000754a5253bf5e4114ddcec0f482b",
"sha256": "9b2f970a3a505bef7199e0147cbd0ad9012b466bcf9323458666c5d8e99775a3"
},
"downloads": -1,
"filename": "bulwark-0.5.2.tar.gz",
"has_sig": false,
"md5_digest": "7f000754a5253bf5e4114ddcec0f482b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 23474,
"upload_time": "2019-10-25T17:42:45",
"upload_time_iso_8601": "2019-10-25T17:42:45.007356Z",
"url": "https://files.pythonhosted.org/packages/bf/a7/faae17ae65b349d7d1d7f6a34f2077aabaae2c15faaf2fd14b0019ed0187/bulwark-0.5.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.5.3": [
{
"comment_text": "",
"digests": {
"md5": "8ba76116b8c2287a2a08d3cd686c736d",
"sha256": "1a8b1deb72fe6493f6ecbef2e69bd2f6ba0651c263dd5ab41adbd382cfe0099b"
},
"downloads": -1,
"filename": "bulwark-0.5.3.tar.gz",
"has_sig": false,
"md5_digest": "8ba76116b8c2287a2a08d3cd686c736d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 23555,
"upload_time": "2019-11-11T22:47:15",
"upload_time_iso_8601": "2019-11-11T22:47:15.956281Z",
"url": "https://files.pythonhosted.org/packages/72/3f/3eff8c16ff30229998c3e4bf3fb02c08bf06555fc890590eca5b0b003762/bulwark-0.5.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.6.0": [
{
"comment_text": "",
"digests": {
"md5": "6a3f6738eab743e9359d2e4f801287c9",
"sha256": "91f9b80daea9b974ba19ea356769a290a1ab9171c46bce1468cfcdc3c0117cb7"
},
"downloads": -1,
"filename": "bulwark-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "6a3f6738eab743e9359d2e4f801287c9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 15544,
"upload_time": "2020-05-30T21:02:16",
"upload_time_iso_8601": "2020-05-30T21:02:16.535738Z",
"url": "https://files.pythonhosted.org/packages/1f/e6/cdcb1918608d05d3b4d5b3362ba0149e44190ec2695c9fd3dfefee8837e4/bulwark-0.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.6.1": [
{
"comment_text": "",
"digests": {
"md5": "b34213e913ed20dbd99e82195837b989",
"sha256": "18a61b1f7bb5af6495551a4381e9f511d6c4daf09c168e00f88a81d7f8bb143f"
},
"downloads": -1,
"filename": "bulwark-0.6.1.tar.gz",
"has_sig": false,
"md5_digest": "b34213e913ed20dbd99e82195837b989",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 15103,
"upload_time": "2020-05-30T21:29:24",
"upload_time_iso_8601": "2020-05-30T21:29:24.225542Z",
"url": "https://files.pythonhosted.org/packages/ae/4b/c3efa862d567c5954da1b21f8949ae56ffe4a635f95f51bb0a9f5543ac5c/bulwark-0.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "b34213e913ed20dbd99e82195837b989",
"sha256": "18a61b1f7bb5af6495551a4381e9f511d6c4daf09c168e00f88a81d7f8bb143f"
},
"downloads": -1,
"filename": "bulwark-0.6.1.tar.gz",
"has_sig": false,
"md5_digest": "b34213e913ed20dbd99e82195837b989",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 15103,
"upload_time": "2020-05-30T21:29:24",
"upload_time_iso_8601": "2020-05-30T21:29:24.225542Z",
"url": "https://files.pythonhosted.org/packages/ae/4b/c3efa862d567c5954da1b21f8949ae56ffe4a635f95f51bb0a9f5543ac5c/bulwark-0.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"vulnerabilities": []
}