dnv-oneworkflow


Namednv-oneworkflow JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryPython library for developing and running workflows locally or on the OneCompute cloud platform
upload_time2024-03-20 09:30:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2024 DNV AS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords onecompute oneworkflow workflow
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OneWorkflow

OneWorkflow is a Python library for creating and executing workflows on local machine or on the OneCompute cloud platform. This library simplifies the development and management of workflows, providing an easy-to-use interface for handling complex tasks efficiently.

Its rich features empower developers to build workflows that effortlessly handle complex tasks. Whether running workflows on a local machine or utilizing the power of the cloud, OneWorkflow ensures consistent and reliable execution.

This library allows developers to tap into its extensive range of capabilities, including advanced job management, data integration, error handling, and scalability. OneWorkflow simplifies the implementation of intricate workflows, allowing developers to focus on their core objectives while ensuring a smooth end-to-end user experience.

## Usage/Examples

```python
import asyncio

from dnv.onecompute.flowmodel import WorkUnit
from dnv.oneworkflow.composite_executable_command import (
    CompositeExecutableCommand as SequentialCmd,
)
from dnv.oneworkflow.oneworkflowclient import OneWorkflowClient
from dnv.oneworkflow.python_command import PythonCommand

# Create OneWorkflow Client
client = OneWorkflowClient(
    workspace_id="TestWorkflow",
    workspace_path=r"C:\MyWorkspace",
    application_id="ImproveWorkflowWorkerHost",
    executable_name="ImproveFlowWorker",
)

# Authenticate with Veracity
client.login()

# Upload Input Files
client.upload_files()

# Create Commands
pre_process_py_cmd = PythonCommand(filename="preprocessscript.py")
post_process_py_cmd = PythonCommand(filename="postprocessscript.py")
sequential_cmd = SequentialCmd(
    [pre_process_py_cmd, post_process_py_cmd], r"C:\LoadCase"
)

# Create Work Unit
work_unit = (
    WorkUnit(sequential_cmd)
    .input_directory(r"C:\LoadCase")
    .output_directory(r"C:\Results")
)

# Run Workflow
job_id = asyncio.run(client.run_workflow_async(work_unit))
assert job_id is not None, "Job Id is done"

# Download Results & Logs
client.download_job_logs(job_id)
asyncio.run(client.download_result_files_async(job_id))
```

## License

[MIT](https://choosealicense.com/licenses/mit/)

## Support

If you encounter any issues, have questions, or want to provide feedback, please get in touch with our support team at software.support@dnv.com. We are committed to continuously improving OneWorkflow and providing timely assistance to our users.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dnv-oneworkflow",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "onecompute, oneworkflow, workflow",
    "author": null,
    "author_email": "DNV AS <software.support@dnv.com>",
    "download_url": "https://files.pythonhosted.org/packages/3e/9d/39ec4d74fdaf44f1436ae8464fea4a93824feb9526fefb16d5d92c88445f/dnv-oneworkflow-1.0.1.tar.gz",
    "platform": null,
    "description": "# OneWorkflow\r\n\r\nOneWorkflow is a Python library for creating and executing workflows on local machine or on the OneCompute cloud platform. This library simplifies the development and management of workflows, providing an easy-to-use interface for handling complex tasks efficiently.\r\n\r\nIts rich features empower developers to build workflows that effortlessly handle complex tasks. Whether running workflows on a local machine or utilizing the power of the cloud, OneWorkflow ensures consistent and reliable execution.\r\n\r\nThis library allows developers to tap into its extensive range of capabilities, including advanced job management, data integration, error handling, and scalability. OneWorkflow simplifies the implementation of intricate workflows, allowing developers to focus on their core objectives while ensuring a smooth end-to-end user experience.\r\n\r\n## Usage/Examples\r\n\r\n```python\r\nimport asyncio\r\n\r\nfrom dnv.onecompute.flowmodel import WorkUnit\r\nfrom dnv.oneworkflow.composite_executable_command import (\r\n    CompositeExecutableCommand as SequentialCmd,\r\n)\r\nfrom dnv.oneworkflow.oneworkflowclient import OneWorkflowClient\r\nfrom dnv.oneworkflow.python_command import PythonCommand\r\n\r\n# Create OneWorkflow Client\r\nclient = OneWorkflowClient(\r\n    workspace_id=\"TestWorkflow\",\r\n    workspace_path=r\"C:\\MyWorkspace\",\r\n    application_id=\"ImproveWorkflowWorkerHost\",\r\n    executable_name=\"ImproveFlowWorker\",\r\n)\r\n\r\n# Authenticate with Veracity\r\nclient.login()\r\n\r\n# Upload Input Files\r\nclient.upload_files()\r\n\r\n# Create Commands\r\npre_process_py_cmd = PythonCommand(filename=\"preprocessscript.py\")\r\npost_process_py_cmd = PythonCommand(filename=\"postprocessscript.py\")\r\nsequential_cmd = SequentialCmd(\r\n    [pre_process_py_cmd, post_process_py_cmd], r\"C:\\LoadCase\"\r\n)\r\n\r\n# Create Work Unit\r\nwork_unit = (\r\n    WorkUnit(sequential_cmd)\r\n    .input_directory(r\"C:\\LoadCase\")\r\n    .output_directory(r\"C:\\Results\")\r\n)\r\n\r\n# Run Workflow\r\njob_id = asyncio.run(client.run_workflow_async(work_unit))\r\nassert job_id is not None, \"Job Id is done\"\r\n\r\n# Download Results & Logs\r\nclient.download_job_logs(job_id)\r\nasyncio.run(client.download_result_files_async(job_id))\r\n```\r\n\r\n## License\r\n\r\n[MIT](https://choosealicense.com/licenses/mit/)\r\n\r\n## Support\r\n\r\nIf you encounter any issues, have questions, or want to provide feedback, please get in touch with our support team at software.support@dnv.com. We are committed to continuously improving OneWorkflow and providing timely assistance to our users.\r\n",
    "bugtrack_url": null,
    "license": "MIT License Copyright (c) 2024 DNV AS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Python library for developing and running workflows locally or on the OneCompute cloud platform",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://myworkspace.dnv.com/download/public/oneworkflow/docs/latest/index.html"
    },
    "split_keywords": [
        "onecompute",
        " oneworkflow",
        " workflow"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86297753a9f3b9a1a1d4f1b01a7211bfd6a705d94ffeb5ee35104b12ce4c33d2",
                "md5": "6c9c0cb1fe4525c3c6ce2782eeb493b5",
                "sha256": "5a52112ef67afe4fab93f68286338345cf00306f3fc5a7f3aa7e1fcba57e0a5a"
            },
            "downloads": -1,
            "filename": "dnv_oneworkflow-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c9c0cb1fe4525c3c6ce2782eeb493b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 72895,
            "upload_time": "2024-03-20T09:30:47",
            "upload_time_iso_8601": "2024-03-20T09:30:47.540223Z",
            "url": "https://files.pythonhosted.org/packages/86/29/7753a9f3b9a1a1d4f1b01a7211bfd6a705d94ffeb5ee35104b12ce4c33d2/dnv_oneworkflow-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e9d39ec4d74fdaf44f1436ae8464fea4a93824feb9526fefb16d5d92c88445f",
                "md5": "e2e5376bb124932e74571aa734620a6a",
                "sha256": "74ad3c7e0090bb5025b72241a085ffce550c47d5118289b50642fd8cd080045c"
            },
            "downloads": -1,
            "filename": "dnv-oneworkflow-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e2e5376bb124932e74571aa734620a6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 58551,
            "upload_time": "2024-03-20T09:30:48",
            "upload_time_iso_8601": "2024-03-20T09:30:48.879746Z",
            "url": "https://files.pythonhosted.org/packages/3e/9d/39ec4d74fdaf44f1436ae8464fea4a93824feb9526fefb16d5d92c88445f/dnv-oneworkflow-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-20 09:30:48",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "dnv-oneworkflow"
}
        
Elapsed time: 0.21800s