dnv-sesam-commands


Namednv-sesam-commands JSON
Version 5.22.0.0 PyPI version JSON
download
home_pageNone
SummaryA Python library for developing and executing Sesam workflows on local or cloud platforms, and for executing commands outside of workflow contexts.
upload_time2024-10-11 10:57:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2024 DNV 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 sesam
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SesamCommands: Streamlining Sesam Workflows and Local Command Execution

SesamCommands is a comprehensive Python package designed to simplify the development and execution of Sesam workflows on both local and cloud platforms. It provides a suite of executors that streamline the local execution of Sesam commands, allowing developers to invoke commands as if operating from a command-line interface, independent of any workflow context.

This package not only simplifies the development process but also adeptly handles the complexities of command execution involving Sesam Core, Wasim, and Sestra applications. The intricacies of workflow execution and management are taken care of by the OneWorkflow and OneCompute Python packages.

In summary, SesamCommands is an invaluable tool for developers seeking to enhance their productivity and streamline their Sesam workflow development process.

## Usage and Examples

For a more comprehensive understanding and additional examples, please visit the Homepage link provided on this page.

```python
"""Demonstration of executing a SesamCoreCommand as part of a larger workflow using the OneWorkflow client.
This workflow could contain many more commands."""

# Import necessary modules and functions
import asyncio
from dnv.oneworkflow.utils import (
    CommandInfo,
    one_workflow_client,
    run_managed_commands_in_parallel_async,
)
from dnv.sesam.commands import SesamCoreCommand

# Instantiate the OneWorkflow client with workspace ID and path
client = one_workflow_client(
    workspace_id="TestWorkflow", workspace_path=r"C:\MyWorkspace", cloud_run=False
)

# Create an instance of the SesamCoreCommand class, specifying the command, input file name, and options
sesam_core_command = SesamCoreCommand(
    command="uls", input_file_name="input.json", options="-v"
)

# Create an instance of the CommandInfo class, specifying the commands and load case folder name
cmd_info = CommandInfo(
    commands=[sesam_core_command],
    load_case_foldername="LoadCase1",
)

# Run workflow/command asynchronously
asyncio.run(
    run_managed_commands_in_parallel_async(
        client=client,
        commands_info=[cmd_info],
    )
)
```

```python
"""
This script demonstrates how to execute a standalone SesamCoreCommand for FLS aggregation, independent of any workflow context,
similar to running an application from the command line.
"""

import os
from dnv.sesam.commands import SesamCoreCommand
from dnv.sesam.commands.executors import execute_command

working_directory = os.path.join(
    os.getcwd(), "data", "workspace_sesamcore_aggregation", "CommonFiles"
)

score_exe_cmd = SesamCoreCommand(
    working_directory=working_directory,
    command="accumulation accumulate",
    input_file_name="accumulation-input-ElementScreening.json",
    options=" ",
)

execute_command(score_exe_cmd)
```

## 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 SesamCommands Python package and providing timely assistance to our users.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dnv-sesam-commands",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "onecompute, oneworkflow, workflow, sesam",
    "author": null,
    "author_email": "DNV AS <software.support@dnv.com>",
    "download_url": "https://files.pythonhosted.org/packages/02/af/4a2621d96210a1878a0d59acbb2d09829da75eff57858500a4ff237fcde6/dnv_sesam_commands-5.22.0.0.tar.gz",
    "platform": null,
    "description": "# SesamCommands: Streamlining Sesam Workflows and Local Command Execution\r\n\r\nSesamCommands is a comprehensive Python package designed to simplify the development and execution of Sesam workflows on both local and cloud platforms. It provides a suite of executors that streamline the local execution of Sesam commands, allowing developers to invoke commands as if operating from a command-line interface, independent of any workflow context.\r\n\r\nThis package not only simplifies the development process but also adeptly handles the complexities of command execution involving Sesam Core, Wasim, and Sestra applications. The intricacies of workflow execution and management are taken care of by the OneWorkflow and OneCompute Python packages.\r\n\r\nIn summary, SesamCommands is an invaluable tool for developers seeking to enhance their productivity and streamline their Sesam workflow development process.\r\n\r\n## Usage and Examples\r\n\r\nFor a more comprehensive understanding and additional examples, please visit the Homepage link provided on this page.\r\n\r\n```python\r\n\"\"\"Demonstration of executing a SesamCoreCommand as part of a larger workflow using the OneWorkflow client.\r\nThis workflow could contain many more commands.\"\"\"\r\n\r\n# Import necessary modules and functions\r\nimport asyncio\r\nfrom dnv.oneworkflow.utils import (\r\n    CommandInfo,\r\n    one_workflow_client,\r\n    run_managed_commands_in_parallel_async,\r\n)\r\nfrom dnv.sesam.commands import SesamCoreCommand\r\n\r\n# Instantiate the OneWorkflow client with workspace ID and path\r\nclient = one_workflow_client(\r\n    workspace_id=\"TestWorkflow\", workspace_path=r\"C:\\MyWorkspace\", cloud_run=False\r\n)\r\n\r\n# Create an instance of the SesamCoreCommand class, specifying the command, input file name, and options\r\nsesam_core_command = SesamCoreCommand(\r\n    command=\"uls\", input_file_name=\"input.json\", options=\"-v\"\r\n)\r\n\r\n# Create an instance of the CommandInfo class, specifying the commands and load case folder name\r\ncmd_info = CommandInfo(\r\n    commands=[sesam_core_command],\r\n    load_case_foldername=\"LoadCase1\",\r\n)\r\n\r\n# Run workflow/command asynchronously\r\nasyncio.run(\r\n    run_managed_commands_in_parallel_async(\r\n        client=client,\r\n        commands_info=[cmd_info],\r\n    )\r\n)\r\n```\r\n\r\n```python\r\n\"\"\"\r\nThis script demonstrates how to execute a standalone SesamCoreCommand for FLS aggregation, independent of any workflow context,\r\nsimilar to running an application from the command line.\r\n\"\"\"\r\n\r\nimport os\r\nfrom dnv.sesam.commands import SesamCoreCommand\r\nfrom dnv.sesam.commands.executors import execute_command\r\n\r\nworking_directory = os.path.join(\r\n    os.getcwd(), \"data\", \"workspace_sesamcore_aggregation\", \"CommonFiles\"\r\n)\r\n\r\nscore_exe_cmd = SesamCoreCommand(\r\n    working_directory=working_directory,\r\n    command=\"accumulation accumulate\",\r\n    input_file_name=\"accumulation-input-ElementScreening.json\",\r\n    options=\" \",\r\n)\r\n\r\nexecute_command(score_exe_cmd)\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 SesamCommands Python package and providing timely assistance to our users.\r\n",
    "bugtrack_url": null,
    "license": "MIT License Copyright (c) 2024 DNV 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": "A Python library for developing and executing Sesam workflows on local or cloud platforms, and for executing commands outside of workflow contexts.",
    "version": "5.22.0.0",
    "project_urls": {
        "Homepage": "https://myworkspace.dnv.com/knowledge-centre/sesam-workflows/usermanual/?document=sesam-workflows-getstarted"
    },
    "split_keywords": [
        "onecompute",
        " oneworkflow",
        " workflow",
        " sesam"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e200a2a05c28e2e41ac47f24c0e7a343fd2354d538fc67410984a46193374355",
                "md5": "75dea4eecd2525bdfcee9004c74ba37d",
                "sha256": "cdb5820a57c430ce555051fa68f0520ef0e7cbd0975c2c0d63eed588c646142f"
            },
            "downloads": -1,
            "filename": "dnv_sesam_commands-5.22.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "75dea4eecd2525bdfcee9004c74ba37d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 4005720,
            "upload_time": "2024-10-11T10:57:48",
            "upload_time_iso_8601": "2024-10-11T10:57:48.762569Z",
            "url": "https://files.pythonhosted.org/packages/e2/00/a2a05c28e2e41ac47f24c0e7a343fd2354d538fc67410984a46193374355/dnv_sesam_commands-5.22.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02af4a2621d96210a1878a0d59acbb2d09829da75eff57858500a4ff237fcde6",
                "md5": "43d633cf3e9a4f3aae4a03e8721a149b",
                "sha256": "73405a17df08abc99161979dfad5c02c921bbcbca7f6c46df51b6cec7e27aad5"
            },
            "downloads": -1,
            "filename": "dnv_sesam_commands-5.22.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "43d633cf3e9a4f3aae4a03e8721a149b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 3963599,
            "upload_time": "2024-10-11T10:57:51",
            "upload_time_iso_8601": "2024-10-11T10:57:51.201947Z",
            "url": "https://files.pythonhosted.org/packages/02/af/4a2621d96210a1878a0d59acbb2d09829da75eff57858500a4ff237fcde6/dnv_sesam_commands-5.22.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-11 10:57:51",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "dnv-sesam-commands"
}
        
Elapsed time: 0.41293s