{ "info": { "author": "Dieter Werthm\u00fcller & Bane Sullivan", "author_email": "info@pyvista.org", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "# Scooby\n\n[![Build Status](https://travis-ci.org/banesullivan/scooby.svg?branch=master)](https://travis-ci.org/banesullivan/scooby)\n[![PyPI Status](https://img.shields.io/pypi/v/scooby.svg?logo=python&logoColor=white)](https://pypi.org/project/scooby/)\n[![Conda Status](https://img.shields.io/conda/vn/conda-forge/scooby.svg)](https://anaconda.org/conda-forge/scooby)\n\nA Great Dane turned Python environment detective\n\nThis is a lightweight toolset to easily report your Python environment's\npackage versions and hardware resources.\n\n\nInstall from [PyPI](https://pypi.org/project/scooby/):\n\n```bash\npip install scooby\n```\n\n![Jupyter Notebook Formatting](https://github.com/banesullivan/scooby/raw/master/assets/jupyter.png)\n\nScooby has HTML formatting for Jupyter notebooks and rich text formatting for\njust about every other environment. We designed this module to be lightweight\nsuch that it could easily be added as a dependency to Python projects for\nenvironment reporting when debugging. Simply add `scooby` to your dependencies\nand implement a function to have `scooby` report on the aspects of the\nenvironment you care most about.\n\nIf `scooby` is unable to detect aspects of an environment that you'd like to\nknow, please share this with us as a feature requests or pull requests.\n\nThe scooby reporting is derived from the versioning-scripts created by [Dieter\nWerthm\u00fcller](https://github.com/prisae) for\n[empymod](https://empymod.github.io), [emg3d](https://empymod.github.io), and\nthe [SimPEG](https://github.com/simpeg/) framework. It was heavily inspired by\n`ipynbtools.py` from [qutip](https://github.com/qutip) and\n[`watermark.py`](https://github.com/rasbt/watermark). This package has been\naltered to create a lightweight implementation so that it can easily be used as\nan environment reporting tool in any Python library with minimal impact.\n\n## Usage\n\n### Generating Reports\n\nReports are rendered as html-tables in Jupyter notebooks as shown in the\nscreenshot above, and otherwise as plain text lists.\n\n```py\n>>> import scooby\n>>> scooby.Report()\n```\n```\n--------------------------------------------------------------------------------\n Date: Sun Jun 30 12:51:42 2019 MDT\n\n Darwin : OS\n 12 : CPU(s)\n x86_64 : Machine\n 64bit : Architecture\n 32.0 GB : RAM\n Python : Environment\n\n Python 3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 15:43:19)\n [Clang 4.0.1 (tags/RELEASE_401/final)]\n\n 1.16.3 : numpy\n 1.3.0 : scipy\n 7.5.0 : IPython\n 3.1.0 : matplotlib\n 0.2.2 : scooby\n\n Intel(R) Math Kernel Library Version 2018.0.3 Product Build 20180406 for\n Intel(R) 64 architecture applications\n--------------------------------------------------------------------------------\n```\n\nOn top of the default (optional) packages you can provide additional packages,\neither as strings or give already imported packages:\n```py\n>>> import pyvista\n>>> import scooby\n>>> scooby.Report(additional=[pyvista, 'vtk', 'no_version', 'does_not_exist'])\n```\n```\n--------------------------------------------------------------------------------\n Date: Mon Jul 01 10:55:24 2019 CEST\n\n Linux : OS\n 4 : CPU(s)\n x86_64 : Machine\n 64bit : Architecture\n 15.6 GB : RAM\n IPython : Environment\n\n Python 3.7.3 (default, Mar 27 2019, 22:11:17) [GCC 7.3.0]\n\n 0.20.4 : pyvista\n 8.1.2 : vtk\n Version unknown : no_version\n Could not import : does_not_exist\n 1.16.4 : numpy\n 1.2.1 : scipy\n 7.5.0 : IPython\n 3.1.0 : matplotlib\n 0.3.0 : scooby\n\n Intel(R) Math Kernel Library Version 2019.0.4 Product Build 20190411 for\n Intel(R) 64 architecture applications\n--------------------------------------------------------------------------------\n```\nAs can be seen, scooby reports if a package could not be imported or if the\nversion of a package could not be determined.\n\nOther useful parameters are\n\n- `ncol`: number of columns in the html-table;\n- `text_width`: text width of the plain-text version;\n- `sort`: list is sorted alphabetically if True.\n\nBesides `additional` there are two more lists, `core` and `optional`, which\ncan be used to provide package names. However, they are mostly useful for\npackage maintainers wanting to use scooby to create their reporting system.\nSee below:\n\n\n### Implementing scooby in your project\n\nYou can generate easily your own Report-instance using scooby:\n\n```py\nclass Report(scooby.Report):\n def __init__(self, additional=None, ncol=3, text_width=80, sort=False):\n \"\"\"Initiate a scooby.Report instance.\"\"\"\n\n # Mandatory packages.\n core = ['yourpackage', 'your_core_packages', 'e.g.', 'numpy', 'scooby']\n\n # Optional packages.\n optional = ['your_optional_packages', 'e.g.', 'matplotlib']\n\n super().__init__(additional=additional, core=core, optional=optional,\n ncol=ncol, text_width=text_width, sort=sort)\n```\n\nSo a user can use your Report:\n```py\n>>> import your_package\n>>> your_package.Report()\n```\n\nThe packages on the `core`-list are the mandatory ones for your project, while\nthe `optional`-list can be used for optional packages. Keep the\n`additional`-list free to allow your users to add packages to the list.\n\n\n### Solving Mysteries\n\nAre you struggling with the mystery of whether or not code is being executed in\nIPython, Jupyter, or normal Python? Try using some of Scooby's investigative\nfunctions to solve these kinds of mysteries:\n\n```py\nimport scooby\n\nif scooby.in_ipykernel():\n # Do Jupyter/IPyKernel stuff\nelif scooby.in_ipython():\n # Do IPython stuff\nelse:\n # Do normal, boring Python stuff\n```\n\n### How does scooby gets the version number?\n\nA couple of locations are checked, and we are happy to implement more if\nneeded, just open an issue!\n\nCurrently, it looks in the following places:\n- `__version__`;\n- `version`;\n- lookup `VERSION_ATTRIBUTES`;\n- lookup `VERSION_METHODS`.\n\n`VERSION_ATTRIBUTES` is a dictionary of attributes for known python packages\nwith a non-standard place for the version, e.g. `VERSION_ATTRIBUTES['vtk'] =\n'VTK_VERSION'`. You can add other known places via\n```py\nscooby.knowledge.VERSION_ATTRIBUTES['a_module'] = 'Awesom_version_location'\n```\n\nSimilarly, `VERSION_METHODS` is a dictionary for methods to find the version,\nand you can add similarly your methods which will define the version of a\npackage.\n\n### Using scooby to get version information.\n\nIf you are just interested in the version of a package then you can use scooby\nas well. A few examples:\n\n```py\n>>> import scooby, numpy\n>>> scooby.get_version(numpy)\n('numpy', '1.16.4')\n>>> scooby.get_version('no_version')\n('no_version', 'Version unknown')\n>>> scooby.get_version('does_not_exist')\n('does_not_exist', 'Could not import')\n```\nAgain, modules can be provided as already loaded ones or as string.\n\n## Optional Requirements\n\nThe following is a list of optional requirements and their purpose:\n\n- `psutil`: report total RAM in GB\n- `mkl-services`: report Intel(R) Math Kernel Library version", "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/banesullivan/scooby", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "scooby", "package_url": "https://pypi.org/project/scooby/", "platform": "", "project_url": "https://pypi.org/project/scooby/", "project_urls": { "Homepage": "https://github.com/banesullivan/scooby" }, "release_url": "https://pypi.org/project/scooby/0.4.3/", "requires_dist": null, "requires_python": "", "summary": "A Great Dane turned Python environment detective", "version": "0.4.3" }, "last_serial": 5501959, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "183b9317d31e977a84eb1d40774dd9e7", "sha256": "4cd1f2281c6ff6ac1f1b219811481d1a9869aceea590681bae8e223af9edb4ff" }, "downloads": -1, "filename": "scooby-0.0.1.tar.gz", "has_sig": false, "md5_digest": "183b9317d31e977a84eb1d40774dd9e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5432, "upload_time": "2019-06-25T21:02:25", "url": "https://files.pythonhosted.org/packages/ea/e2/7a0ca53b1fb6e5ff7301942d79e515eedf93c901a933e3ae07ba96603e59/scooby-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "41503298be253634a0ccccf8acd3fef5", "sha256": "f49307fef83fe25eb6b2cd0d2d55c030062722589d38237b303e2131ddb1d53b" }, "downloads": -1, "filename": "scooby-0.0.2.tar.gz", "has_sig": false, "md5_digest": "41503298be253634a0ccccf8acd3fef5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6393, "upload_time": "2019-06-25T23:11:15", "url": "https://files.pythonhosted.org/packages/1e/4b/c071a62342c095622555aeaa037dd0f29c60c181478feb742ee824c05328/scooby-0.0.2.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "8674c3c9363f0a3eb4cd911e737232bc", "sha256": "a61b97a65dda9e48416fd75b8e422a07cea9ce5ff371fe05be5a8630abbd7959" }, "downloads": -1, "filename": "scooby-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8674c3c9363f0a3eb4cd911e737232bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7626, "upload_time": "2019-06-26T03:36:01", "url": "https://files.pythonhosted.org/packages/5e/c8/b0b9f79e3cc651e5f65c31dd2a2816dbf35b61a360de81034a12a03258a7/scooby-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b1dbb0fbf88e3e95ed5113b5ff7a1912", "sha256": "d41d4e94d333113bf76245586c2d6057005ea9df086b436bcb065c6e42384d15" }, "downloads": -1, "filename": "scooby-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b1dbb0fbf88e3e95ed5113b5ff7a1912", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7842, "upload_time": "2019-06-26T04:30:33", "url": "https://files.pythonhosted.org/packages/ca/c8/9746fb8e5e413aecc48c541644698aec8fb0921608969ca95f3d1a63d8ca/scooby-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3d5c0c7c4f23f4727b17b32f1e77d9d5", "sha256": "77292820a5dff1f4db8c169e9a168290412c6980457016f30faaf255c7c5c51d" }, "downloads": -1, "filename": "scooby-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3d5c0c7c4f23f4727b17b32f1e77d9d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9624, "upload_time": "2019-06-27T00:39:08", "url": "https://files.pythonhosted.org/packages/32/47/32629d328cbb183a1fcc225c72a952d5e8aae8c3239e8c3ee802780871b3/scooby-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "43867a41450cb0578837bedc0a5776ba", "sha256": "20f86074c21d6576d9a29100dc9ef9066b433d4c45b78e682d1acec781de01f2" }, "downloads": -1, "filename": "scooby-0.2.1.tar.gz", "has_sig": false, "md5_digest": "43867a41450cb0578837bedc0a5776ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9761, "upload_time": "2019-06-28T21:20:27", "url": "https://files.pythonhosted.org/packages/b6/26/49236b21a86a37c24a1b035576c663458c0406615acd1c9f2259fd6a025b/scooby-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "08f3117a701417be882ef73ac5fc9129", "sha256": "7f45ec28907e108da65949f5f3bffffb50ce6ab50bc72cdb6f9be796654b8c78" }, "downloads": -1, "filename": "scooby-0.2.2.tar.gz", "has_sig": false, "md5_digest": "08f3117a701417be882ef73ac5fc9129", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10215, "upload_time": "2019-06-30T01:22:21", "url": "https://files.pythonhosted.org/packages/1a/ca/1cbfa40a2e26bac141497dfe65020b971489bef88be8d4c41a4baf895e12/scooby-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "a7d7b517702ae1c6fe9db096b90f0e92", "sha256": "e8e62e6fa1cbe1220165ea3f575bf0985f282bad1dfd7dfc010b77a0fdbe8772" }, "downloads": -1, "filename": "scooby-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a7d7b517702ae1c6fe9db096b90f0e92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9651, "upload_time": "2019-06-30T19:03:36", "url": "https://files.pythonhosted.org/packages/07/4a/06a3302cd39ccace5604ffdd8e960672e2c4fdaa09880fa83dbe589eca1c/scooby-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "bb27f27749bc867437e980109aaa10f0", "sha256": "bd3f83dd63566c581523587235fb0e6363424f93a8d71fe21a21e00f60ad52f2" }, "downloads": -1, "filename": "scooby-0.4.0.tar.gz", "has_sig": false, "md5_digest": "bb27f27749bc867437e980109aaa10f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8746, "upload_time": "2019-07-01T15:41:48", "url": "https://files.pythonhosted.org/packages/9e/8a/eaae634004ed66710dcba402d7a3ec6655f3ee0034bacdf7fe2deb6e0f9c/scooby-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "fe4654439dbadde5a299aeb44fab2355", "sha256": "37d6e7522912683895d26b6825a69a222ac4462957554cf6cbd32815ec82b192" }, "downloads": -1, "filename": "scooby-0.4.1.tar.gz", "has_sig": false, "md5_digest": "fe4654439dbadde5a299aeb44fab2355", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11764, "upload_time": "2019-07-02T03:11:36", "url": "https://files.pythonhosted.org/packages/1f/4b/3cea4ffa02e002efbb01bffa2e0e97506e2c8a291430573a504efa2acba0/scooby-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "db58ab45ed12934518581ce0cfcf2c20", "sha256": "f820f3eb589a2f446907e7dcf54e33e6a50a2c55763d4b75c1f0c6f6db983ca8" }, "downloads": -1, "filename": "scooby-0.4.2.tar.gz", "has_sig": false, "md5_digest": "db58ab45ed12934518581ce0cfcf2c20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11829, "upload_time": "2019-07-07T15:59:40", "url": "https://files.pythonhosted.org/packages/9e/68/3fae049a08733ec3fe0f9751d6be5a140bc4a9bfc99f8f5e51c09f720572/scooby-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "7199ee05ae9039407bdf4196419d6a00", "sha256": "44b9ae2ceeb4dfe2a375d27259609c8dce39cb3f9fbd6d02bd7fec69f1701a82" }, "downloads": -1, "filename": "scooby-0.4.3.tar.gz", "has_sig": false, "md5_digest": "7199ee05ae9039407bdf4196419d6a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11836, "upload_time": "2019-07-08T16:10:38", "url": "https://files.pythonhosted.org/packages/f3/55/1323fa2eabe616990025dcd9be61bd5a415c2be724cb5969416ede7e0f1a/scooby-0.4.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7199ee05ae9039407bdf4196419d6a00", "sha256": "44b9ae2ceeb4dfe2a375d27259609c8dce39cb3f9fbd6d02bd7fec69f1701a82" }, "downloads": -1, "filename": "scooby-0.4.3.tar.gz", "has_sig": false, "md5_digest": "7199ee05ae9039407bdf4196419d6a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11836, "upload_time": "2019-07-08T16:10:38", "url": "https://files.pythonhosted.org/packages/f3/55/1323fa2eabe616990025dcd9be61bd5a415c2be724cb5969416ede7e0f1a/scooby-0.4.3.tar.gz" } ] }