{ "info": { "author": "Noel Dawe", "author_email": "noel.dawe@cern.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: MacOS", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Topic :: Scientific/Engineering", "Topic :: Software Development", "Topic :: Text Processing :: Markup :: XML", "Topic :: Utilities" ], "description": ".. -*- mode: rst -*-\n\nAbout\n-----\n\ngoodruns provides an implementation of an ATLAS Good Run List (GRL)\nreader/writer in Python, and collection of useful command-line tools.\n\n\nRequirements\n------------\n\ngoodruns requires at least Python 2.5. Unlike the standard ATLAS GoodRunsLists\npackage, goodruns does not depend on `ROOT `_ for XML\nprocessing unless you are reading from or writing to a ROOT file (see below).\nFor faster XML reading/writing goodruns will optionally use `lxml\n`_ if installed. Install `PyYAML\n`_ if you would like to convert GRLs into\nYAML format.\n\n\nInstallation\n------------\n\nInstall the latest released version of goodruns with\n`pip `_::\n\n pip install --user goodruns\n\nOmit the ``--user`` for a system-wide installation (requires root privileges).\nAdd ``${HOME}/.local/bin`` to your ``${PATH}`` if using ``--user`` and if\nit is not there already (put this in your .bashrc)::\n\n export PATH=${HOME}/.local/bin${PATH:+:$PATH}\n\nTo upgrade an existing installation, add the ``-U`` option in the ``pip``\ncommand above.\n\n\nUsage\n-----\n\nAn example of how to use goodruns::\n\n from goodruns import GRL\n\n grl = GRL('grl.xml')\n # or:\n grl = GRL('http://atlasdqm.web.cern.ch/atlasdqm/grlgen/path/to/grl.xml')\n # or (if '/path/to/grl' is a ROOT.TObjString in data.root):\n grl = GRL('data.root:/path/to/grl')\n\n # check if the GRL contains the lumiblock 231 in run 186356:\n if (186356, 231) in grl:\n # do something\n pass\n\nThe GRL is automatically optimized (lumiblocks are merged and sorted)::\n\n >>> from goodruns import GRL\n >>> a = GRL()\n >>> a.insert(1, (1,4))\n >>> a.insert(1, (7,10))\n >>> a\n ---------------\n RUN: 1\n LUMIBLOCKS:\n 1 - 4\n 7 - 10\n >>> a.insert(1, (6,7))\n >>> a\n ---------------\n RUN: 1\n LUMIBLOCKS:\n 1 - 4\n 6 - 10\n >>> a.insert(1, (5,5))\n >>> a\n ---------------\n RUN: 1\n LUMIBLOCKS:\n 1 - 10\n\n\nCommand-line Tools\n------------------\n\ngoodruns also provides a collection of command-line tools\nfor combining, manipulating, and inspecting GRLs. As above\nGRLs may be XML files, URLs, or in ROOT files.\n\n\ngrl diff\n~~~~~~~~\n\nUse ``grl diff`` to determine the GRL containing the runs/lumiblocks in\n``A.xml`` but not in ``B.xml``::\n\n grl diff A.xml B.xml\n\nIn other words, ``B.xml`` is subtracted from ``A.xml``.\nAll command-line tools print on stdout. Redirect stdout to a file to save\nthe result::\n\n grl diff A.xml B.xml > C.xml\n\nYou may supply more than two GRLs to ``grl diff``::\n\n grl diff A.xml B.xml C.xml D.xml > E.xml\n\nwhich results in the GRL E=((A-B)-C)-D). This is equivalent to::\n\n grl diff A.xml B.xml | grl diff C.xml | grl diff D.xml > E.xml\n\nThe output of one command can be piped into any of the other commands\nin goodruns.\n\n\ngrl and, grl or, grl xor\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nThese scripts implement logical combinations of GRLs. Logical AND::\n\n grl and A.xml B.xml > C.xml\n\nOR::\n\n grl or A.xml B.xml > C.xml\n\nand XOR (exclusive OR)::\n\n grl xor A.xml B.xml > C.xml\n\nAgain, these commands can be combined arbitrarily::\n\n grl and A.xml B.xml | grl or C.xml | grl xor D.xml > E.xml\n\nand any GRL argument can also be a ROOT file or URL::\n\n grl and data.root:/path/to/grl http://atlasdqm.web.cern.ch/path/to/grl.xml\n\n\ngrl clip\n~~~~~~~~\n\nUse ``grl clip`` to truncate a GRL between a starting run/lumiblock and ending\nrun/lumiblock::\n\n grl clip --help\n usage: grl clip [-h] [-o OUTPUT] [-f FORMAT] [--startrun STARTRUN]\n [--startlb STARTLB] [--endrun ENDRUN] [--endlb ENDLB]\n [grl]\n\n positional arguments:\n grl\n\n optional arguments:\n -h, --help show this help message and exit\n -o OUTPUT, --output OUTPUT\n Output filename (optional)\n -f FORMAT, --format FORMAT\n Output format: xml, yml, txt, py, cut\n --startrun STARTRUN Start run\n --startlb STARTLB Start lumiblock\n --endrun ENDRUN End run\n --endlb ENDLB End lumiblock\n\n\ngrl convert\n~~~~~~~~~~~\n\n``grl convert`` can convert a GRL from XML format into YAML::\n\n grl convert -f yml A.xml\n 186178:\n - !!python/tuple [125, 156]\n - !!python/tuple [158, 161]\n 186179:\n - !!python/tuple [382, 388]\n - !!python/tuple [390, 390]\n - !!python/tuple [396, 396]\n - !!python/tuple [398, 415]\n - !!python/tuple [417, 431]\n - !!python/tuple [433, 453]\n - !!python/tuple [455, 469]\n - !!python/tuple [471, 474]\n - !!python/tuple [476, 479]\n 186180:\n - !!python/tuple [114, 116]\n - !!python/tuple [118, 124]\n - !!python/tuple [126, 140]\n - !!python/tuple [144, 149]\n - !!python/tuple [151, 170]\n - !!python/tuple [173, 176]\n ...\n\nor plain text::\n\n grl convert -f txt A.xml\n ---------------\n RUN: 186178\n LUMIBLOCKS:\n 125 - 156\n 158 - 161\n ---------------\n RUN: 186179\n LUMIBLOCKS:\n 382 - 388\n 390\n 396\n 398 - 415\n 417 - 431\n 433 - 453\n 455 - 469\n 471 - 474\n 476 - 479\n ---------------\n RUN: 186180\n LUMIBLOCKS:\n 114 - 116\n 118 - 124\n 126 - 140\n 144 - 149\n 151 - 170\n 173 - 176\n ...\n\n``grl convert`` will also convert a GRL into Python code (dict of lists of\ntuples) or (as a joke) a ROOT TCut expression.\n\n\ngrl runs\n~~~~~~~~\n\n``grl runs`` simply prints the run numbers, one per line, contained\nwithin a GRL::\n\n grl runs A.xml\n 186178\n 186179\n 186180\n ...\n\nQuickly print the runs contained in a GRL from a URL::\n\n grl runs http://atlasdqm.web.cern.ch/path/to/grl.xml\n\n\ngrl find\n~~~~~~~~\n\n``grl find`` prints the GRLs containing a run number and lumiblock number (if\nany). The lumiblock number is optional, and if left unset all GRLs containing\nthe run will be printed. For example, you can determine which ROOT file contains\nthe run 215643 and lumiblock 400 with the following command::\n\n grl find --path Lumi/tau --pattern \"*.root*\" --run 215643 --lb 400 globbed*path*", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/packages/source/g/goodruns/goodruns-2.8.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://ndawe.github.com/goodruns", "keywords": null, "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "goodruns", "package_url": "https://pypi.org/project/goodruns/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/goodruns/", "project_urls": { "Download": "http://pypi.python.org/packages/source/g/goodruns/goodruns-2.8.1.tar.gz", "Homepage": "http://ndawe.github.com/goodruns" }, "release_url": "https://pypi.org/project/goodruns/2.8.1/", "requires_dist": null, "requires_python": null, "summary": "ATLAS Good Run List (GRL) reader and utilities", "version": "2.8.1" }, "last_serial": 1601407, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "24e87b95dc7aa9d9d9cd28f96cfc7bc1", "sha256": "7def03c0da2c88c9551ac3921df561b12346a03fcbc86910f22554c46fa18d24" }, "downloads": -1, "filename": "goodruns-1.0.tar.gz", "has_sig": false, "md5_digest": "24e87b95dc7aa9d9d9cd28f96cfc7bc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27477, "upload_time": "2011-10-22T08:00:47", "url": "https://files.pythonhosted.org/packages/17/99/fffde26f9e5b34b10489b86b7054f9f151e3dd91cf873ced49220846ab1b/goodruns-1.0.tar.gz" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "d0a0a84c6a32ef25c13d23a6644f5e65", "sha256": "a09e1f6d228ebfa3d053bf8abe316e7434abda5c0abf8cd423869ea0020e64c2" }, "downloads": -1, "filename": "goodruns-1.5.tar.gz", "has_sig": false, "md5_digest": "d0a0a84c6a32ef25c13d23a6644f5e65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28197, "upload_time": "2011-10-28T09:30:09", "url": "https://files.pythonhosted.org/packages/94/ba/e093f2a77dc246c38fe23f3acffb8c545a77de996049974491b619d71d33/goodruns-1.5.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "ff1239f6c651637daeec451c3a9b6d5b", "sha256": "915ef3d64c3cabcf9e1241ab1034cc3360450156e91a35d47c3b7cd1e3fd6279" }, "downloads": -1, "filename": "goodruns-2.0.tar.gz", "has_sig": false, "md5_digest": "ff1239f6c651637daeec451c3a9b6d5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29878, "upload_time": "2012-01-12T06:54:12", "url": "https://files.pythonhosted.org/packages/b9/00/dc0557968bae3df074d45b0b429e71d90af1dcccfc89d6583cda4fb5d6aa/goodruns-2.0.tar.gz" } ], "2.5": [ { "comment_text": "", "digests": { "md5": "879aa95f6c4e538f0813bfe94bb4e208", "sha256": "d1901530ff98d53059aa4cda8bfafdd70e692ed823ec46983acf840bf99008e1" }, "downloads": -1, "filename": "goodruns-2.5.tar.gz", "has_sig": false, "md5_digest": "879aa95f6c4e538f0813bfe94bb4e208", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30812, "upload_time": "2012-05-09T02:25:41", "url": "https://files.pythonhosted.org/packages/8c/ab/a548361e6723f3f8c61e0b428822ef8d048e345c3e842d868512846d93b8/goodruns-2.5.tar.gz" } ], "2.6": [ { "comment_text": "", "digests": { "md5": "4118db4d4fe935bb7ea4d6f57e54ff9a", "sha256": "d252a5bc2aafeff9c9288b90851601c8f556de49e2a64b861a2fad9be4868b8d" }, "downloads": -1, "filename": "goodruns-2.6.tar.gz", "has_sig": false, "md5_digest": "4118db4d4fe935bb7ea4d6f57e54ff9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30726, "upload_time": "2012-05-09T03:18:06", "url": "https://files.pythonhosted.org/packages/5e/60/0298f5fb17c8c6e33b1fddccea228dd4ce024780e7c008fdfc6375dd85fd/goodruns-2.6.tar.gz" } ], "2.7": [ { "comment_text": "", "digests": { "md5": "eb8633107b7170e307b18f0651d8e764", "sha256": "6f8a9ca95d94c93d8cd24464023ea040329f1ca6bbb71853c54428d909687a79" }, "downloads": -1, "filename": "goodruns-2.7.tar.gz", "has_sig": false, "md5_digest": "eb8633107b7170e307b18f0651d8e764", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54312, "upload_time": "2013-07-16T23:59:00", "url": "https://files.pythonhosted.org/packages/25/59/69ac0597c16957585f52590cd69bb687a0acaa085cb8f10aff5f18a3da85/goodruns-2.7.tar.gz" } ], "2.8.0": [ { "comment_text": "", "digests": { "md5": "20f47b4457fc45d5dbf2ee9e1f470980", "sha256": "7c55db30c389dcec677f306bd8cdd2a52066f9598af1cd80e083412ce65898a6" }, "downloads": -1, "filename": "goodruns-2.8.0.tar.gz", "has_sig": false, "md5_digest": "20f47b4457fc45d5dbf2ee9e1f470980", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48811, "upload_time": "2015-06-22T00:53:33", "url": "https://files.pythonhosted.org/packages/d7/e9/14540dc06991ff841553ad4a482f14f85f10e3de9763f59f97a9f2ad0ecb/goodruns-2.8.0.tar.gz" } ], "2.8.1": [ { "comment_text": "", "digests": { "md5": "5265a92f937ada9012ebc4dbfbbde00b", "sha256": "bb277fe7cb51c7a180715c0868ae9db83a8e6f6c5c31db4cb4b922a31fc50d58" }, "downloads": -1, "filename": "goodruns-2.8.1.tar.gz", "has_sig": false, "md5_digest": "5265a92f937ada9012ebc4dbfbbde00b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48309, "upload_time": "2015-06-22T02:56:10", "url": "https://files.pythonhosted.org/packages/86/93/684a692e5bb3b6cd9add987c6fee4118eade79c67392559243ed2c0cceb9/goodruns-2.8.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5265a92f937ada9012ebc4dbfbbde00b", "sha256": "bb277fe7cb51c7a180715c0868ae9db83a8e6f6c5c31db4cb4b922a31fc50d58" }, "downloads": -1, "filename": "goodruns-2.8.1.tar.gz", "has_sig": false, "md5_digest": "5265a92f937ada9012ebc4dbfbbde00b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48309, "upload_time": "2015-06-22T02:56:10", "url": "https://files.pythonhosted.org/packages/86/93/684a692e5bb3b6cd9add987c6fee4118eade79c67392559243ed2c0cceb9/goodruns-2.8.1.tar.gz" } ] }