abcunit-backend-1.3.0
توضیحات
Backend solution for abcunit success / failure logs
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | abcunit-backend-1.3.0 |
| نام | abcunit-backend |
| نسخه کتابخانه | 1.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jonathan Haigh |
| ایمیل نویسنده | jonathan.haigh@stfc.ac.uk |
| آدرس صفحه اصلی | https://github.com/cedadev/abcunit-backend |
| آدرس اینترنتی | https://pypi.org/project/abcunit-backend/ |
| مجوز | BSD 2-Clause License |
abcunit-backend
===============
Storage backends for an ABCUnit Framework, logging success and failures of process units.
Database Backend
----------------
To use this backend you will need to contact the JASMIN help desk (support@jasmin.ac.uk) and ask them to setup a postgresql database for you. Specify a name for the database and a username to login with. JASMIN support will get back to you with the user password and host name.
After you have got your database, you'll need to export an environment variable called ``$ABCUNIT_DB_SETTINGS`` and set it to a connection string for ``psycopg2``\ :
.. code-block::
ABCUNIT_DB_SETTINGS="dbname=<name> user=<user> host=<host> password=<pwd>"
``DatabaseHandler`` class construction looks like this:
.. code-block::
DatabaseHandler(table_name="results")
Where
* ``table_name`` is the name of the table logs will be insert into
Connects to an existing database and creates a table to store results:
.. code-block::
<table_name> (id varchar(255) PRIMARY KEY, result varchar(255) NOT NULL)
.. list-table::
:header-rows: 1
* - id
- result
* - facet1.facet2.facet3
- success
* - facet1.facet2.facet3
- bad_file
* - ⋮
- ⋮
File System Backend
-------------------
``FileSystemHandler`` class construction looks like this:
.. code-block::
FileSytemHandler(base_log_dir, n_facets, sep)
Where;
* ``base_log_dir`` is the string path to top level directory for logs
* ``n_facets`` is the number of facets used to describe each unit result
* ``sep`` is the separator used for a result identifier
Uses the file system to create log files marking success and failures, categorised by directory structure:
.. code-block::
<log_base_dir>/success/facet1/facet2/facet3
<log_base_dir>/failure/error_type/facet1/facet2/facet3
نیازمندی
| مقدار | نام |
|---|---|
| >=2.8.0 | psycopg2 |
| >=2.8.0 | psycopg2 |
| >=5.4.3 | pytest |
| - | sphinx |
| - | sphinx-rtd-theme |
| - | nbsphinx |
| - | pandoc |
| - | ipython |
| - | m2r2 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.5.0 | Python |
نحوه نصب
نصب پکیج whl abcunit-backend-1.3.0:
pip install abcunit-backend-1.3.0.whl
نصب پکیج tar.gz abcunit-backend-1.3.0:
pip install abcunit-backend-1.3.0.tar.gz