actfw-core


Nameactfw-core JSON
Version 2.4.0 PyPI version JSON
download
home_pagehttps://github.com/Idein/actfw-core
SummaryCore components of actfw, independent of specific devices
upload_time2024-01-23 09:50:05
maintainer
docs_urlNone
authorIdein Inc.
requires_python>=3.7,<4.0
licenseMIT
keywords actcast
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # actfw-core

Core components of actfw, a framework for Actcast Application written in Python.
actfw-core is intended to be independent of any specific device.

## Installation

```console
sudo apt-get update
sudo apt-get install -y python3-pip python3-pil 
sudo apt-get install -y libv4l-0 libv4lconvert0  # if using `V4LCameraCapture`
pip3 install actfw-core
```

## Document

* [API References](https://idein.github.io/actfw-core/latest/)

## Usage

Construct your application with a task parallel model

* Application
  * `actfw_core.Application` : Main application
* Workers
  * `actfw_core.task.Producer` : Task generator
    * `actfw_core.capture.V4LCameraCapture` : Generate UVC camera capture image
  * `actfw_core.task.Pipe` : Task to Task converter
  * `actfw_core.task.Consumer` : Task terminator

Each worker is executed in parallel.

User should

* Define subclass of `Producer/Pipe/Consumer`

```python
class MyPipe(actfw_core.task.Pipe):
    def proc(self, i):
        ...
```

* Connect defined worker objects

```python
p  = MyProducer()
f1 = MyPipe()
f2 = MyPipe()
c  = MyConsumer()
p.connect(f1)
f1.connect(f2)
f2.connect(c)
```

* Register to `Application`

```python
app = actfw_core.Application()
app.register_task(p)
app.register_task(f1)
app.register_task(f2)
app.register_task(c)
```

* Execute application

```python
app.run()
```

## Development Guide

### Installation of dev requirements

```console
pip3 install poetry
poetry install
```

### Running tests

```console
poetry run pytest -v
```

### Releasing package & API doc

CI will automatically do.
Follow the following branch/tag rules.

1. Make changes for next version in `master` branch (via pull-requests).
2. Make a PR that updates version in `pyproject.toml` and merge it to `master` branch.
3. Create GitHub release from `master` branch's HEAD.
    1. [Draft a new release](https://github.com/Idein/actfw-core/releases/new).
    2. Create new tag named `release-<New version>` (e.g. `release-1.4.0`) from `Choose a tag` pull down menu.
    3. Write title and description.
    4. Publish release.
4. Then CI will build/upload package to PyPI & API doc to GitHub Pages.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Idein/actfw-core",
    "name": "actfw-core",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "actcast",
    "author": "Idein Inc.",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/42/c3/4ac9870235e5eaea15650fc786934055c217b34a2cab8160e8c7b72ab1fc/actfw_core-2.4.0.tar.gz",
    "platform": null,
    "description": "# actfw-core\n\nCore components of actfw, a framework for Actcast Application written in Python.\nactfw-core is intended to be independent of any specific device.\n\n## Installation\n\n```console\nsudo apt-get update\nsudo apt-get install -y python3-pip python3-pil \nsudo apt-get install -y libv4l-0 libv4lconvert0  # if using `V4LCameraCapture`\npip3 install actfw-core\n```\n\n## Document\n\n* [API References](https://idein.github.io/actfw-core/latest/)\n\n## Usage\n\nConstruct your application with a task parallel model\n\n* Application\n  * `actfw_core.Application` : Main application\n* Workers\n  * `actfw_core.task.Producer` : Task generator\n    * `actfw_core.capture.V4LCameraCapture` : Generate UVC camera capture image\n  * `actfw_core.task.Pipe` : Task to Task converter\n  * `actfw_core.task.Consumer` : Task terminator\n\nEach worker is executed in parallel.\n\nUser should\n\n* Define subclass of `Producer/Pipe/Consumer`\n\n```python\nclass MyPipe(actfw_core.task.Pipe):\n    def proc(self, i):\n        ...\n```\n\n* Connect defined worker objects\n\n```python\np  = MyProducer()\nf1 = MyPipe()\nf2 = MyPipe()\nc  = MyConsumer()\np.connect(f1)\nf1.connect(f2)\nf2.connect(c)\n```\n\n* Register to `Application`\n\n```python\napp = actfw_core.Application()\napp.register_task(p)\napp.register_task(f1)\napp.register_task(f2)\napp.register_task(c)\n```\n\n* Execute application\n\n```python\napp.run()\n```\n\n## Development Guide\n\n### Installation of dev requirements\n\n```console\npip3 install poetry\npoetry install\n```\n\n### Running tests\n\n```console\npoetry run pytest -v\n```\n\n### Releasing package & API doc\n\nCI will automatically do.\nFollow the following branch/tag rules.\n\n1. Make changes for next version in `master` branch (via pull-requests).\n2. Make a PR that updates version in `pyproject.toml` and merge it to `master` branch.\n3. Create GitHub release from `master` branch's HEAD.\n    1. [Draft a new release](https://github.com/Idein/actfw-core/releases/new).\n    2. Create new tag named `release-<New version>` (e.g. `release-1.4.0`) from `Choose a tag` pull down menu.\n    3. Write title and description.\n    4. Publish release.\n4. Then CI will build/upload package to PyPI & API doc to GitHub Pages.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Core components of actfw, independent of specific devices",
    "version": "2.4.0",
    "project_urls": {
        "Changelog": "https://github.com/Idein/actfw-core/blob/master/CHANGELOG.md",
        "Documentation": "https://idein.github.io/actfw-core/latest/",
        "Homepage": "https://github.com/Idein/actfw-core",
        "Repository": "https://github.com/Idein/actfw-core"
    },
    "split_keywords": [
        "actcast"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c6311adf74717fa6471edb3474b6d965c52cee65c7e4d2729bcaf5489ca2633",
                "md5": "cf8870452b4ccd64beed2bd9e45ac57e",
                "sha256": "f78b6e6df01fc19bbe338b83ecc0a299b065e5b40912af3ee310d679e1067272"
            },
            "downloads": -1,
            "filename": "actfw_core-2.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cf8870452b4ccd64beed2bd9e45ac57e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 59555,
            "upload_time": "2024-01-23T09:50:03",
            "upload_time_iso_8601": "2024-01-23T09:50:03.433169Z",
            "url": "https://files.pythonhosted.org/packages/2c/63/11adf74717fa6471edb3474b6d965c52cee65c7e4d2729bcaf5489ca2633/actfw_core-2.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42c34ac9870235e5eaea15650fc786934055c217b34a2cab8160e8c7b72ab1fc",
                "md5": "1613ead3ab7361e443d036305b0d6b69",
                "sha256": "4dd3beda0971130dee6364edba9dc8277f5aca9d9d401f68965d62cdf4e5cc23"
            },
            "downloads": -1,
            "filename": "actfw_core-2.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1613ead3ab7361e443d036305b0d6b69",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 51043,
            "upload_time": "2024-01-23T09:50:05",
            "upload_time_iso_8601": "2024-01-23T09:50:05.080919Z",
            "url": "https://files.pythonhosted.org/packages/42/c3/4ac9870235e5eaea15650fc786934055c217b34a2cab8160e8c7b72ab1fc/actfw_core-2.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 09:50:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Idein",
    "github_project": "actfw-core",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "lcname": "actfw-core"
}
        
Elapsed time: 0.16393s