{ "info": { "author": "Gordon McCreight", "author_email": "gordon@mccreight.com", "bugtrack_url": null, "classifiers": [], "description": "=======\nFacture\n=======\n\n--------\nOverview\n--------\n\nFacture is FAC-tories that generate partition-isolated fix-TURE data, ideal for\nelaborating scenarios.\n\n------------\nInstallation\n------------\n\n``pip install facturedata``\n\n--------------------------------------------------\nHow is this different from factories and fixtures?\n--------------------------------------------------\n\nOriginally this tool was created to generate the test data for a database\nthat had very high overhead per-insert. Using traditional data factories and\nindividual transactions with rollback would not work; batching the inserts was\nnecessary.\n\nFixtures alone could solve this problem, but it's really hard to enumerate and\nmanage the joins in a large number of scenarios in fixtures effectively. The\nprimary advantage that factories have is their ease of use in testing\nindividual scenarios without needing to understand other scenarios or manage a\ncorpus of shared data. Carefully paritioning inserted data so the data is\nunambiguously owned by a scenario can provide the same benefit as factories,\nwhere it becomes easy to understand the data associated with individual\nscenarios.\n\n----------\nHow to Use\n----------\n\nThere is a fair amount of configuration that goes into setting facture up, but\nhere is a quick inline example data group that shows how foreign keys work::\n\n 'group': 'facture_group_shawshank_redemption',\n 'offset': 100,\n 'data': [\n ['actors a_mf', {'attrs': {'first_name': 'Morgan', 'last_name': 'Freeman'}}],\n ['actors a_tr', {'attrs': {'first_name': 'Tim', 'last_name': 'Robbins'}}],\n ['films f', {'attrs': {'name': 'Shawshank Redemption', 'year': '1994'}}],\n ['roles r1', {'refs': {'actor_id': '.a_mf.id', 'film_id': '.f.id'}}],\n ['roles r1', {'refs': {'actor_id': '.a_tr.id', 'film_id': '.f.id'}}]\n ]\n\nFor a deeper dive I recommend that you look at this example:\nhttps://github.com/gmccreight/facture/tree/master/tests/examples/sql_inject_target\n\nCopy the ``factureconf.py`` there to the directory you will be running ``facture``\nin. Look at the ``facture_json`` target section in the ``original.sql`` file\nand copy it into a file of your own choosing. Update the ``conf_targets``\nsection of your newly created ``factureconf.py`` file to point to the file\nwhere you put the ``facture_json``.\n\nRun::\n\n facture\n\nYour target file should now be filled in with some generated data. You're off\nto the races!\n\n-------------------\nAdditional benefits\n-------------------\n\n* \"compile\"-time factory configuration consistency checks. Checks for many\n typos, join issues, etc.\n\n* Materializes the output into your version-controlled files, unrolling the\n complexity. Because the fixtures that we generate are automatically created,\n we can put a lot of effort into making the generated data comprehensible (and\n lineage-providing). This means we annotate all generated data with the column names, \n and the scenario name. It's also extremely easy to see what the effects of\n any change you make is, since it's all laid out for you.\n\n* Code as configuration. The configuration files are written in Python, so you have\n the full power of the language.\n\n* Easy to reason about each scenario in complete isolation because of data partitioning\n\n* Plays well with others... can be introduced into existing fixtures. Integrates\n with how you do things, doesn't try to take over completely. Can target\n files or sections within files.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/facturedata/", "keywords": "", "license": "LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "facturedata", "package_url": "https://pypi.org/project/facturedata/", "platform": "", "project_url": "https://pypi.org/project/facturedata/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/facturedata/" }, "release_url": "https://pypi.org/project/facturedata/0.1.10/", "requires_dist": null, "requires_python": "", "summary": "Factories that create fixtures", "version": "0.1.10" }, "last_serial": 5139612, "releases": { "0.1.10": [ { "comment_text": "", "digests": { "md5": "c49562bc75b11e67187e7b2b94bf9556", "sha256": "1b5b063cfe28e19a85068ae18274030ecaf7244ddccd275a2aba3575c02e94d8" }, "downloads": -1, "filename": "facturedata-0.1.10.tar.gz", "has_sig": false, "md5_digest": "c49562bc75b11e67187e7b2b94bf9556", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8003, "upload_time": "2019-04-14T01:10:04", "url": "https://files.pythonhosted.org/packages/8e/5d/3f8d8252ec293ddf72d9d429b82d49a19d143afc56b175843e3083e36aec/facturedata-0.1.10.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "c8636cd4576a900088e81857626d21fd", "sha256": "7cba229b497b20a4d72afc58cf03eeab2721d2e32b6238be1a11e038944c0f23" }, "downloads": -1, "filename": "facturedata-0.1.8.tar.gz", "has_sig": false, "md5_digest": "c8636cd4576a900088e81857626d21fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7847, "upload_time": "2019-04-13T22:09:50", "url": "https://files.pythonhosted.org/packages/6e/e2/2145ede8ff4a6bbe53bae4657c0b10ff15257b06ea731aa2d92d326a9bd0/facturedata-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "a7a7bb2e44c56cc4f98f3bd05cd013a5", "sha256": "3f3514885ecd3816ccc699ad8f5026387fd23f10801c51bcd80cb779a63cc2b4" }, "downloads": -1, "filename": "facturedata-0.1.9.tar.gz", "has_sig": false, "md5_digest": "a7a7bb2e44c56cc4f98f3bd05cd013a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7950, "upload_time": "2019-04-14T00:43:36", "url": "https://files.pythonhosted.org/packages/06/b9/ca1515d85be6ac71b8950342bbe97204a53a8f8d30ebc66c568bcb33649a/facturedata-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c49562bc75b11e67187e7b2b94bf9556", "sha256": "1b5b063cfe28e19a85068ae18274030ecaf7244ddccd275a2aba3575c02e94d8" }, "downloads": -1, "filename": "facturedata-0.1.10.tar.gz", "has_sig": false, "md5_digest": "c49562bc75b11e67187e7b2b94bf9556", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8003, "upload_time": "2019-04-14T01:10:04", "url": "https://files.pythonhosted.org/packages/8e/5d/3f8d8252ec293ddf72d9d429b82d49a19d143afc56b175843e3083e36aec/facturedata-0.1.10.tar.gz" } ] }