librehtf


Namelibrehtf JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/mcpcpc/librehtf
SummaryAn open hardware test framework.
upload_time2023-02-02 17:57:53
maintainer
docs_urlNone
authorMichael Czigler
requires_python>=3.7
licenseBSD-3-Clause
keywords flask hardware test framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LibreHTF

An open hardware test framework.

## Install

### PyPI

Install and update using pip:

```shell
pip install -U librehtf
```

### Repository

When using git, clone the repository and change your present working directory.

```shell
git clone http://github.com/mcpcpc/librehtf
cd librehtf/
```

Create and activate a virtual environment.

```shell
python3 -m venv venv
source venv/bin/activate
```

Install LibreHTF to the virtual environment.

```shell
pip install -e .
```

## Commands

### db-init

The Sqlite3 database can be initialized or re-initialized with the
following command.

```shell
flask --app librehtf init-db
```

## Deployment

Before deployment, we *strongly* encourage you to override the
default `SECRET_KEY` variable. This can be done by creating a
`conf.py` file and placing it in the same root as the instance (i.e. typically where the SQLite database resides).

```python
SECRET_KEY = “192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf“
```

There are a number of ways to generate a secret key value. The
simplest would be to use the built-in secrets Python library.

```shell
$ python -c ‘import secrets; print(secrets.token_hex())’
‘192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf’
```

### Waitress

Production WSGI via waitress.

```shell
pip install waitress
waitress-serve --call librehtf:create_app
```

## Test

```shell
python3 -m unittest
```

Run with coverage report.

```shell
coverage run -m unittest
coverage report
coverage html  # open htmlcov/index.html in a browser
```

## Authorization

OpenHTF provides a simple role-based access control (RBAC) for protecting both APIs and environment configuration. There are three levels of user access controls: administrator, functional and public. Responsibilities range from least restrictive to most restrictive, respectively.

| Function      | Description                                                         | Evaluation | API Access | Management |
|---------------|---------------------------------------------------------------------|------------|------------|------------|
| Administrator | An individual for system administration and user management.        | Yes        | Yes        | Yes        |
| Functional    | A non-human interface, typically for machine integration.           | Yes        | Yes        | Limited    |
| Public        | Typically an operator or technician responsible for test execution. | Yes        | No         | No         |

## Nomenclature 

OpenHTF is architected to allow inherent branching of tests.  At the core, there are three tiers of organization: device, test and task.

### Device

Devices refer to specific to hardware versions or product configurations. These are typically descriptive in nature and are useful when organizing hardware test interfaces that are intended to be used with multiple product offerings. Each device may have one or multiple *test* configurations. 

### Test

Tests are a collection of similar or related tasks. Thus, executing a test will execute all collected task operators.

### Task

The smallest unitdiscretized observation for a given test. The result of running a task can either be informative or comparative. When comparing the result of a task, the resulting outcome either yields PASS or FAIL.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mcpcpc/librehtf",
    "name": "librehtf",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "flask,hardware,test,framework",
    "author": "Michael Czigler",
    "author_email": "contact@mcpcpc.com",
    "download_url": "https://files.pythonhosted.org/packages/79/87/5598f2d4d88bfffbebf8a642c577d6bbaf289ec1812300ab425549891d43/librehtf-0.0.3.tar.gz",
    "platform": null,
    "description": "# LibreHTF\n\nAn open hardware test framework.\n\n## Install\n\n### PyPI\n\nInstall and update using pip:\n\n```shell\npip install -U librehtf\n```\n\n### Repository\n\nWhen using git, clone the repository and change your present working directory.\n\n```shell\ngit clone http://github.com/mcpcpc/librehtf\ncd librehtf/\n```\n\nCreate and activate a virtual environment.\n\n```shell\npython3 -m venv venv\nsource venv/bin/activate\n```\n\nInstall LibreHTF to the virtual environment.\n\n```shell\npip install -e .\n```\n\n## Commands\n\n### db-init\n\nThe Sqlite3 database can be initialized or re-initialized with the\nfollowing command.\n\n```shell\nflask --app librehtf init-db\n```\n\n## Deployment\n\nBefore deployment, we *strongly* encourage you to override the\ndefault `SECRET_KEY` variable. This can be done by creating a\n`conf.py` file and placing it in the same root as the instance (i.e. typically where the SQLite database resides).\n\n```python\nSECRET_KEY = \u201c192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf\u201c\n```\n\nThere are a number of ways to generate a secret key value. The\nsimplest would be to use the built-in secrets Python library.\n\n```shell\n$ python -c \u2018import secrets; print(secrets.token_hex())\u2019\n\u2018192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf\u2019\n```\n\n### Waitress\n\nProduction WSGI via waitress.\n\n```shell\npip install waitress\nwaitress-serve --call librehtf:create_app\n```\n\n## Test\n\n```shell\npython3 -m unittest\n```\n\nRun with coverage report.\n\n```shell\ncoverage run -m unittest\ncoverage report\ncoverage html  # open htmlcov/index.html in a browser\n```\n\n## Authorization\n\nOpenHTF provides a simple role-based access control (RBAC) for protecting both APIs and environment configuration. There are three levels of user access controls: administrator, functional and public. Responsibilities range from least restrictive to most restrictive, respectively.\n\n| Function      | Description                                                         | Evaluation | API Access | Management |\n|---------------|---------------------------------------------------------------------|------------|------------|------------|\n| Administrator | An individual for system administration and user management.        | Yes        | Yes        | Yes        |\n| Functional    | A non-human interface, typically for machine integration.           | Yes        | Yes        | Limited    |\n| Public        | Typically an operator or technician responsible for test execution. | Yes        | No         | No         |\n\n## Nomenclature \n\nOpenHTF is architected to allow inherent branching of tests.  At the core, there are three tiers of organization: device, test and task.\n\n### Device\n\nDevices refer to specific to hardware versions or product configurations. These are typically descriptive in nature and are useful when organizing hardware test interfaces that are intended to be used with multiple product offerings. Each device may have one or multiple *test* configurations. \n\n### Test\n\nTests are a collection of similar or related tasks. Thus, executing a test will execute all collected task operators.\n\n### Task\n\nThe smallest unitdiscretized observation for a given test. The result of running a task can either be informative or comparative. When comparing the result of a task, the resulting outcome either yields PASS or FAIL.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "An open hardware test framework.",
    "version": "0.0.3",
    "split_keywords": [
        "flask",
        "hardware",
        "test",
        "framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "172dcc6b407bdb9c378c35cd63aa931398eac5a529dae1286a19eb9e9130ab71",
                "md5": "92a9390df1ef7c55b6c2766ea029bee7",
                "sha256": "4c761da75549d0ad800c46200fb77f994043096b87e941e16acf4ac070254d65"
            },
            "downloads": -1,
            "filename": "librehtf-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "92a9390df1ef7c55b6c2766ea029bee7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 32227,
            "upload_time": "2023-02-02T17:57:51",
            "upload_time_iso_8601": "2023-02-02T17:57:51.256146Z",
            "url": "https://files.pythonhosted.org/packages/17/2d/cc6b407bdb9c378c35cd63aa931398eac5a529dae1286a19eb9e9130ab71/librehtf-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "79875598f2d4d88bfffbebf8a642c577d6bbaf289ec1812300ab425549891d43",
                "md5": "b9678fd84746df7bd46b2f0d05d7711b",
                "sha256": "d3437abb80cbbdca97954680c38b21caa47ae0a6ce78d26faa0aee57fe3a7457"
            },
            "downloads": -1,
            "filename": "librehtf-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b9678fd84746df7bd46b2f0d05d7711b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 19715,
            "upload_time": "2023-02-02T17:57:53",
            "upload_time_iso_8601": "2023-02-02T17:57:53.293147Z",
            "url": "https://files.pythonhosted.org/packages/79/87/5598f2d4d88bfffbebf8a642c577d6bbaf289ec1812300ab425549891d43/librehtf-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-02 17:57:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "mcpcpc",
    "github_project": "librehtf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "librehtf"
}
        
Elapsed time: 0.04271s