# resultsdb_conventions
resultsdb_conventions is a Python library that represents various conventions for reporting test results to [ResultsDB][1]. It allows you to report results easily and without a lot of boilerplate, and be relatively confident their ResultsDB metadata will be consistent with other results of the same basic nature.
## Installation
resultsdb_conventions packages are available in the Fedora and [EPEL][2] 7 repositories. The core package is `python2-resultsdb_conventions`, and the `fedora` module is in the package `python2-resultsdb_conventions-fedora`. For other distributions, or if you want to use the git code, you can simply make the library available in the Python path for your consumer in some way, or to install the library systemwide, just run `sudo python setup.py install`. You will need the `cached-property` library as well, and the `fedfind` library if you wish to use the Fedora conventions (these are both packaged for Fedora and EPEL). For actually submitting results, you will need the `ResultsDBapi` class from the `resultsdb_api` module.
resultsdb_conventions is intended to be compatible with Python 2.6+ and current Python 3. Please report bugs if you find compatibility problems.
## Use
The simplest way to use resultsdb_conventions is to pick the `Result` subclass that most closely represents the kind of result you wish to submit, instantiate it with appropriate arguments, get an instance of `ResultsDBapi`, and run the `report()` method. This will apply the 'default' metadata for the result (based on the kind of result and the args used for instantiation), and submit it to whichever ResultsDB you got an API instance for. The `Result` subclasses should all document their required and optional arguments.
For simple modifications of the submitted result, you can simply adjust the `extradata` property (which is just a dict of arbitrary string key:value pairs that are passed to ResultsDB and stored as-is) after getting the instance but before running `report()`. You can also cause the result to be added to more groups by including an iterable of group dicts or UUID strings as the `groups` arg when instantiating the result class, or by adjusting the instance's `groups` property directly.
For more complex changes to the behaviour, you can of course start from the most relevant class and create a subclass, then adjust things as appropriate. The important conventions for how subclasses should be implemented are documented in the `Result` class. If your subclass is likely to have utility outside your project, you may want to submit a pull request for it, so other projects can conveniently report results according to the same conventions.
A simple validation mechanism has been included, but currently none of the included classes implements any significant validation. The validation is intended to enforce the convention being encoded, not to do fundamental checks on the validity of the result in ResultsDB terms; ResultsDB will reject any outright invalid submission. Please consider implementing validation for any pull requests you submit.
## Bugs, pull requests etc.
You can file issues and pull requests on the [resultsdb_conventions project][3] in Pagure.
## Credits
Jan Sedlak and Josef Skladanka contributed valuable inspiration, ideas and reviews.
## Licensing
resultsdb_conventions is available under the GPL, version 3 or any later version. A copy is included as COPYING.
[1]: https://fedoraproject.org/wiki/ResultsDB
[2]: https://fedoraproject.org/wiki/EPEL
[3]: https://pagure.io/taskotron/resultsdb_conventions
Raw data
{
"_id": null,
"home_page": "https://pagure.io/fedora-qa/resultsdb_conventions",
"name": "resultsdb-conventions",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "fedora rhel epel resultsdb test taskotron",
"author": "Adam Williamson",
"author_email": "awilliam@redhat.com",
"download_url": "https://files.pythonhosted.org/packages/2f/d4/97be62888ce68eb2584e12f25464bc72d1974f53758374cf045268922c9e/resultsdb_conventions-3.0.2.tar.gz",
"platform": null,
"description": "# resultsdb_conventions\n\nresultsdb_conventions is a Python library that represents various conventions for reporting test results to [ResultsDB][1]. It allows you to report results easily and without a lot of boilerplate, and be relatively confident their ResultsDB metadata will be consistent with other results of the same basic nature.\n\n## Installation\n\nresultsdb_conventions packages are available in the Fedora and [EPEL][2] 7 repositories. The core package is `python2-resultsdb_conventions`, and the `fedora` module is in the package `python2-resultsdb_conventions-fedora`. For other distributions, or if you want to use the git code, you can simply make the library available in the Python path for your consumer in some way, or to install the library systemwide, just run `sudo python setup.py install`. You will need the `cached-property` library as well, and the `fedfind` library if you wish to use the Fedora conventions (these are both packaged for Fedora and EPEL). For actually submitting results, you will need the `ResultsDBapi` class from the `resultsdb_api` module.\n\nresultsdb_conventions is intended to be compatible with Python 2.6+ and current Python 3. Please report bugs if you find compatibility problems.\n\n## Use\n\nThe simplest way to use resultsdb_conventions is to pick the `Result` subclass that most closely represents the kind of result you wish to submit, instantiate it with appropriate arguments, get an instance of `ResultsDBapi`, and run the `report()` method. This will apply the 'default' metadata for the result (based on the kind of result and the args used for instantiation), and submit it to whichever ResultsDB you got an API instance for. The `Result` subclasses should all document their required and optional arguments.\n\nFor simple modifications of the submitted result, you can simply adjust the `extradata` property (which is just a dict of arbitrary string key:value pairs that are passed to ResultsDB and stored as-is) after getting the instance but before running `report()`. You can also cause the result to be added to more groups by including an iterable of group dicts or UUID strings as the `groups` arg when instantiating the result class, or by adjusting the instance's `groups` property directly.\n\nFor more complex changes to the behaviour, you can of course start from the most relevant class and create a subclass, then adjust things as appropriate. The important conventions for how subclasses should be implemented are documented in the `Result` class. If your subclass is likely to have utility outside your project, you may want to submit a pull request for it, so other projects can conveniently report results according to the same conventions.\n\nA simple validation mechanism has been included, but currently none of the included classes implements any significant validation. The validation is intended to enforce the convention being encoded, not to do fundamental checks on the validity of the result in ResultsDB terms; ResultsDB will reject any outright invalid submission. Please consider implementing validation for any pull requests you submit.\n\n## Bugs, pull requests etc.\n\nYou can file issues and pull requests on the [resultsdb_conventions project][3] in Pagure.\n\n## Credits\n\nJan Sedlak and Josef Skladanka contributed valuable inspiration, ideas and reviews.\n\n## Licensing\n\nresultsdb_conventions is available under the GPL, version 3 or any later version. A copy is included as COPYING.\n\n[1]: https://fedoraproject.org/wiki/ResultsDB\n[2]: https://fedoraproject.org/wiki/EPEL\n[3]: https://pagure.io/taskotron/resultsdb_conventions\n",
"bugtrack_url": null,
"license": "GPLv3+",
"summary": "Module for conveniently reporting to ResultsDB following conventions",
"version": "3.0.2",
"project_urls": {
"Homepage": "https://pagure.io/fedora-qa/resultsdb_conventions"
},
"split_keywords": [
"fedora",
"rhel",
"epel",
"resultsdb",
"test",
"taskotron"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c21b113199a492f8576255e2e75d203cdc7fd6c5e375730a7cce8af81fdb5c0c",
"md5": "f5d80c6e34a292eaa8aa6980612fcd09",
"sha256": "4c49cb804be941cb8a4318317b2fbbe6f1d80012bc5c6dc08f4cc81b93559204"
},
"downloads": -1,
"filename": "resultsdb_conventions-3.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f5d80c6e34a292eaa8aa6980612fcd09",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 25054,
"upload_time": "2023-06-19T18:00:18",
"upload_time_iso_8601": "2023-06-19T18:00:18.202745Z",
"url": "https://files.pythonhosted.org/packages/c2/1b/113199a492f8576255e2e75d203cdc7fd6c5e375730a7cce8af81fdb5c0c/resultsdb_conventions-3.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2fd497be62888ce68eb2584e12f25464bc72d1974f53758374cf045268922c9e",
"md5": "131f295da003e52a98747a5a9cf5f21c",
"sha256": "41fd695243d1a6fc43e83282211120c10d45c570baa2b6f5f5ef63bc8eb55fdb"
},
"downloads": -1,
"filename": "resultsdb_conventions-3.0.2.tar.gz",
"has_sig": false,
"md5_digest": "131f295da003e52a98747a5a9cf5f21c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26714,
"upload_time": "2023-06-19T18:00:19",
"upload_time_iso_8601": "2023-06-19T18:00:19.738148Z",
"url": "https://files.pythonhosted.org/packages/2f/d4/97be62888ce68eb2584e12f25464bc72d1974f53758374cf045268922c9e/resultsdb_conventions-3.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-19 18:00:19",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "resultsdb-conventions"
}