resultsdbpy
Large projects (like WebKit) often have 10's of thousands of tests running on dozens of platforms. Making sense of results from theses tests is difficult. resultsdbpy aims to make visualizing, processing and storing those results easier.
Requirements
For local testing and basic prototyping, nothing is required. All data can be managed in-memory. Note, however, that running the database in this mode will not save results to disk.
If leveraging Docker, Redis and Cassandra will be automatically installed and can be used to make results more persistent.
For production instances, the Cassandra and Redis instances should be hosted seperatly from the web-app.
Usage
resultsdbpy requires fairly extensive configuration before being used. Below is an example of configuring resultsdbpy for testing and basic prototyping for Webkit, along with some comments explaining the environment setup:
import os
from fakeredis import FakeStrictRedis
from flask import Flask, request
from resultsdbpy.controller.api_routes import APIRoutes
from resultsdbpy.model.mock_cassandra_context import MockCassandraContext
from resultsdbpy.model.model import Model
from resultsdbpy.model.repository import WebKitRepository
from resultsdbpy.view.view_routes import ViewRoutes
# By default, Cassandra forbids schema management
os.environ['CQLENG_ALLOW_SCHEMA_MANAGEMENT'] = '1'
# An in-memory Cassandra database for testing
cassandra=MockCassandraContext(
nodes=['localhost'],
keyspace='testing-kespace',
create_keyspace=True,
)
model = Model(
redis=FakeStrictRedis(), # An in-memory Redis database for testing
cassandra=cassandra,
repositories=[WebKitRepository()], # This should be replaced with a class for your project's repository
default_ttl_seconds=Model.TTL_WEEK * 4, # Retain 4 weeks of results
async_processing=False, # Processing asynchronously requires instantiating worker processes
)
app = Flask(__name__)
api_routes = APIRoutes(model=model, import_name=__name__)
view_routes = ViewRoutes(
title='WebKit Results Database',
model=model, controller=api_routes, import_name=__name__,
)
@app.route('/__health', methods=('GET',))
def health():
return 'ok'
@app.errorhandler(404)
@app.errorhandler(405)
def handle_errors(error):
if request.path.startswith('/api/'):
return api_routes.error_response(error)
return view_routes.error(error=error)
app.register_blueprint(api_routes)
app.register_blueprint(view_routes)
def main():
app.run(host='0.0.0.0', port=5000)
if __name__ == '__main__':
main()
Metadata
Release files for resultsdbpy 3.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| resultsdbpy-3.1.10.tar.gz | 188.6 kB | Without provenance | Details for resultsdbpy-3.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| resultsdbpy-3.1.10-py3-none-any.whl | Python 3 | none | any | Details for resultsdbpy-3.1.10-py3-none-any.whl |
Total release size: 492.1 kB
Release files / resultsdbpy-3.1.10.tar.gz
| Download URL | resultsdbpy-3.1.10.tar.gz |
|---|---|
| Size | 188.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1337f1bf55cb40273e693bb352e65d5e128ea6c790da99fb6903ac7f1956fa3
|
|
BLAKE2b-256 checksum How to use checksums |
c706cca809f939612360bc5277bb964e0a6ee8e887b21ae3e76a40e4b5f9fa43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / resultsdbpy-3.1.10-py3-none-any.whl
| Download URL | resultsdbpy-3.1.10-py3-none-any.whl |
|---|---|
| Size | 303.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76cbb2d6302ccc7277ed0dfef8b7b745b678c3280915fa3b4ea74b98ef7bda1b
|
|
BLAKE2b-256 checksum How to use checksums |
c7ec9d55d6da64b7d111ab0fa251ddddd221a3ee20369ec692c03d8e14b7bfc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for resultsdbpy 3.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.