actfw-core


Nameactfw-core JSON
Version 2.9.0 PyPI version JSON
download
home_pagehttps://github.com/Idein/actfw-core
SummaryCore components of actfw, independent of specific devices
upload_time2024-12-02 06:17:51
maintainerNone
docs_urlNone
authorIdein Inc.
requires_python<4.0,>=3.7
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": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.7",
    "maintainer_email": null,
    "keywords": "actcast",
    "author": "Idein Inc.",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/33/49/5ea6ed1688f8f216ad5a9d0a7b28b65c7f0a8eda76518d69fc0abe77431e/actfw_core-2.9.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.9.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": "744363a77c5c7edb5ef209f159ffe3a60b53774527c55b1f09db7356f01a0c17",
                "md5": "51a826f38d18a6e1607d20393215e459",
                "sha256": "55ee1cfb6a3b2c1470c2dfa20507cdc17afcf46d3ec0ee4592af4dcac0d33beb"
            },
            "downloads": -1,
            "filename": "actfw_core-2.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51a826f38d18a6e1607d20393215e459",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.7",
            "size": 76692,
            "upload_time": "2024-12-02T06:17:49",
            "upload_time_iso_8601": "2024-12-02T06:17:49.406227Z",
            "url": "https://files.pythonhosted.org/packages/74/43/63a77c5c7edb5ef209f159ffe3a60b53774527c55b1f09db7356f01a0c17/actfw_core-2.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33495ea6ed1688f8f216ad5a9d0a7b28b65c7f0a8eda76518d69fc0abe77431e",
                "md5": "f14b22b9200e5ca1b47fb5e20c3cbb61",
                "sha256": "467835edcbd2f63b3e37d0bc5293c0f97054aa5aaa86bffc123cee0c85e9ce29"
            },
            "downloads": -1,
            "filename": "actfw_core-2.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f14b22b9200e5ca1b47fb5e20c3cbb61",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.7",
            "size": 68082,
            "upload_time": "2024-12-02T06:17:51",
            "upload_time_iso_8601": "2024-12-02T06:17:51.044679Z",
            "url": "https://files.pythonhosted.org/packages/33/49/5ea6ed1688f8f216ad5a9d0a7b28b65c7f0a8eda76518d69fc0abe77431e/actfw_core-2.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-02 06:17:51",
    "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.35587s