ansys-saf-cli 4.1.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ansys/saf/cli/__init__.py +15 -0
- ansys/saf/cli/_cli/__init__.py +15 -0
- ansys/saf/cli/_cli/main.py +816 -0
- ansys/saf/cli/_cli/py.typed +0 -0
- ansys/saf/cli/_config/__init__.py +15 -0
- ansys/saf/cli/_config/const.py +45 -0
- ansys/saf/cli/_config/py.typed +0 -0
- ansys/saf/cli/_database/__init__.py +15 -0
- ansys/saf/cli/_database/manager.py +94 -0
- ansys/saf/cli/_database/models.py +53 -0
- ansys/saf/cli/_database/py.typed +0 -0
- ansys/saf/cli/_solutions/__init__.py +15 -0
- ansys/saf/cli/_solutions/add_step.py +256 -0
- ansys/saf/cli/_solutions/dependencies.py +162 -0
- ansys/saf/cli/_solutions/environment.py +1145 -0
- ansys/saf/cli/_solutions/plugins.py +254 -0
- ansys/saf/cli/_solutions/py.typed +0 -0
- ansys/saf/cli/_solutions/scaffolding.py +73 -0
- ansys/saf/cli/_solutions/templates/__init__.py +15 -0
- ansys/saf/cli/_solutions/templates/py.typed +0 -0
- ansys/saf/cli/_solutions/templates/solution/cookiecutter.json +18 -0
- ansys/saf/cli/_solutions/templates/solution/hooks/post_gen_project.py +54 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.codespell.ignore +2 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.devcontainer/devcontainer.json +26 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.env +5 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.flake8 +8 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.github/labeler.yml +9 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.github/labels.yml +27 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.github/workflows/build-release.yml +175 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.github/workflows/label.yml +89 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.gitignore +137 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.pre-commit-config.yaml +48 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.release-please-manifest.json +3 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.reuse/templates/copyright.jinja2 +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.vscode/extensions.json +8 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.vscode/launch.json +28 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/AUTHORS +12 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CHANGELOG.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CODEOWNERS +3 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CODE_OF_CONDUCT.md +65 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CONTRIBUTING.md +2 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CONTRIBUTORS.md +9 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/LICENSE.rst +41 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/README.md +69 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/Dockerfile +43 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/README.md +13 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/distributed-deployment-template/.env +27 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/distributed-deployment-template/compose.yaml +132 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone/.env +20 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone/compose.yaml +118 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone-with-hps/.env +28 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone-with-hps/compose.yaml +146 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone-with-minerva/.env +25 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone-with-minerva/compose.yaml +122 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/.vale.ini +28 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/Makefile +30 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/changelog.d/changelog_template.jinja +17 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/make.bat +46 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/_static/css/custom.css +8 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/_static/images/repository-banner.png +0 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/_templates/README.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/changelog.rst +12 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/conf.py +253 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/examples.rst +8 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/getting_started/desktop_installation.rst +165 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/getting_started/docker_installation.rst +68 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/index.rst +51 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/user_guide/index.rst +6 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/styles/config/vocabularies/ANSYS/accept.txt +5 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/styles/config/vocabularies/ANSYS/reject.txt +0 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/examples/README.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/lock_files/dash/poetry.lock +7621 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/lock_files/no_ui/poetry.lock +7173 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/minerva/cli/README.md +3 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/minerva/oauth/App_Data/Certificates/README.md +3 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/minerva/oauth/oauth.config +9 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/pyproject.toml +192 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/release-please-config.json +9 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/sonar-project.properties +12 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/__init__.py +3 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/main.py +19 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/portal_assets/application.svg +36 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/portal_assets/description.json +3 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/portal_assets/project.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/definition.py +24 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/first_step.py +34 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/method_assets/README.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/scripts/README.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/scripts/assets/README.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/second_step.py +12 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/app.py +30 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/css/all.css +9 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/css/bootstrap.min.css +6 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/css/style.css +47 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/carbon--ibm-engineering-workflow-mgmt.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/carbon--return.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/game-icons--crossed-air-flows.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/material-symbols--home.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/radix-icons--moon.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/radix-icons--sun.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/streamline--startup-solid.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/teenyicons--doc-solid.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/carbon--ibm-engineering-workflow-mgmt.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/carbon--return.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/game-icons--crossed-air-flows.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/material-symbols--home.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/radix-icons--moon.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/radix-icons--sun.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/streamline--startup-solid.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/teenyicons--doc-solid.svg +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/images/README.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/images/workflow-placeholder.png +0 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/installer/README.md +5 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/logos/dark/placeholder_logo.png +0 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/logos/light/placeholder_logo.png +0 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/orchestrator/README.md +3 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/pywebview/README.md +3 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/scripts/README.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/components/README.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/pages/about_page.py +71 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/pages/first_page.py +147 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/pages/page.py +367 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/pages/second_page.py +32 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tests/common_test_files/README.md +1 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tests/conftest.py +37 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tests/unit/test_solution_api.py +42 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tests/unit/test_solution_ui.py +30 -0
- ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tox.ini +56 -0
- ansys/saf/cli/_utilities/__init__.py +15 -0
- ansys/saf/cli/_utilities/archiver.py +67 -0
- ansys/saf/cli/_utilities/backup.py +181 -0
- ansys/saf/cli/_utilities/conversion.py +64 -0
- ansys/saf/cli/_utilities/platform.py +26 -0
- ansys/saf/cli/_utilities/py.typed +0 -0
- ansys/saf/cli/_utilities/solution_modules.py +173 -0
- ansys/saf/cli/integrations/solutions_manager.py +64 -0
- ansys/saf/cli/py.typed +0 -0
- ansys_saf_cli-4.1.dev0.dist-info/METADATA +201 -0
- ansys_saf_cli-4.1.dev0.dist-info/RECORD +143 -0
- ansys_saf_cli-4.1.dev0.dist-info/WHEEL +4 -0
- ansys_saf_cli-4.1.dev0.dist-info/entry_points.txt +3 -0
- ansys_saf_cli-4.1.dev0.dist-info/licenses/AUTHORS +12 -0
- ansys_saf_cli-4.1.dev0.dist-info/licenses/LICENSE +201 -0
ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/minerva/cli/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Ansys Minerva CLI
|
|
2
|
+
|
|
3
|
+
Place in this directory the Ansys Minerva CLI downloaded following the documentation on [how to download and install the Ansys Minerva CLI](https://saf.glow.docs.solutions.ansys.com/version/stable/user_guide/data_management_systems/minerva.html#download-and-install-ansys-minerva-cli).
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# OpenSSL certificate
|
|
2
|
+
|
|
3
|
+
Place in this directory the Personal Information Exchange file (*.pfx) that was generated following the documentation on [how to generate the necessary OpenSSL certificate](https://saf-cli.docs.solutions.ansys.com/version/dev/user_guide/solution_s2s_deployment.html#configure-oauth-certificate-based-authentication-for-minerva).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<oauth>
|
|
3
|
+
<client id="SAFServer">
|
|
4
|
+
<secret type="JwtBearerAssertionClientSecret">
|
|
5
|
+
<certificate filePath="App_Data/Certificates/SAFServer.pfx" password="Minerva!"></certificate>
|
|
6
|
+
<tokenLifetime assertionTokenLifetime="300"></tokenLifetime>
|
|
7
|
+
</secret>
|
|
8
|
+
</client>
|
|
9
|
+
</oauth>
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["poetry-core>=2.0.0", "setuptools>=67.0"]
|
|
3
|
+
build-backend = "poetry.core.masonry.api"
|
|
4
|
+
|
|
5
|
+
# The following lines were added to enforce the poetry version needed for the project.
|
|
6
|
+
# This version will be used by saf-cli to install the solution's dependencies, and by saf-desktop-installer to
|
|
7
|
+
# create the solution package and its installation executable.
|
|
8
|
+
[build-system-requirements]
|
|
9
|
+
build-system-version = "2.3.2"
|
|
10
|
+
|
|
11
|
+
[saf-cli-version]
|
|
12
|
+
saf-cli-version = "{{cookiecutter.__saf_cli_version}}"
|
|
13
|
+
|
|
14
|
+
[tool.poetry]
|
|
15
|
+
name = "{{cookiecutter.__pkg_name}}"
|
|
16
|
+
version = "{{cookiecutter.__version}}"
|
|
17
|
+
description = ""
|
|
18
|
+
license = "Proprietary"
|
|
19
|
+
authors = ["ANSYS, Inc. <solution-applications.maintainers@ansys.com>"]
|
|
20
|
+
maintainers = ["ANSYS, Inc. <solution-applications.maintainers@ansys.com>"]
|
|
21
|
+
readme = "README.md"
|
|
22
|
+
keywords = ["Ansys Solutions"]
|
|
23
|
+
classifiers = [
|
|
24
|
+
"Development Status :: 3 - Alpha",
|
|
25
|
+
"Intended Audience :: Other Audience",
|
|
26
|
+
"License :: Other/Proprietary License",
|
|
27
|
+
"Natural Language :: English",
|
|
28
|
+
"Operating System :: Microsoft :: Windows",
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Programming Language :: Python :: 3.10",
|
|
31
|
+
"Programming Language :: Python :: 3.11",
|
|
32
|
+
"Programming Language :: Python :: 3.12",
|
|
33
|
+
"Programming Language :: Python :: 3.13",
|
|
34
|
+
"Programming Language :: Python :: 3.14",
|
|
35
|
+
"Topic :: Scientific/Engineering"
|
|
36
|
+
]
|
|
37
|
+
{% set namespace_parent = cookiecutter.__solution_namespace.split(".")[0] %}
|
|
38
|
+
|
|
39
|
+
packages = [
|
|
40
|
+
{ include = "{{ namespace_parent }}", from = "src" },
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
# Required to override .gitignore exclusions
|
|
44
|
+
include = [
|
|
45
|
+
"src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/html-doc/**/*",
|
|
46
|
+
"src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/solution/**/*.encrypted",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[[tool.poetry.source]]
|
|
50
|
+
name = "PyPI"
|
|
51
|
+
priority = "primary"
|
|
52
|
+
|
|
53
|
+
[tool.poetry.dependencies]
|
|
54
|
+
python = ">=3.10,<3.15"
|
|
55
|
+
ansys-saf-glow-engine = {version = "^1.41.dev2", allow-prereleases=true, extras = ["hps"]} # extras are for using HPS; can be deleted if not used
|
|
56
|
+
ansys-saf-product-manager = {version = ">=0.4.dev0, <1.0.0", allow-prereleases=true}
|
|
57
|
+
|
|
58
|
+
[tool.poetry.group.desktop]
|
|
59
|
+
optional = true
|
|
60
|
+
[tool.poetry.group.desktop.dependencies]
|
|
61
|
+
ansys-saf-desktop-orchestrator = {version = "^1.12.dev0", allow-prereleases=true, extras = ["all"]}
|
|
62
|
+
|
|
63
|
+
{% if cookiecutter.__ui_framework == "dash" %}
|
|
64
|
+
[tool.poetry.group.ui]
|
|
65
|
+
optional = true
|
|
66
|
+
[tool.poetry.group.ui.dependencies]
|
|
67
|
+
dash = "^3, <3.4.0" # 3.4.0 incompatible with dash-extensions < 2.0.5
|
|
68
|
+
dash_bootstrap_components = "^1.2"
|
|
69
|
+
dash-uploader = "^0.6"
|
|
70
|
+
ansys-solutions-dash-super-components = {version = ">=0.2.dev7, <1.0.0", allow-prereleases=true}
|
|
71
|
+
dash-extensions = ">=0.1.13"
|
|
72
|
+
dash-mantine-components = "^2.6.0"
|
|
73
|
+
{% endif %}
|
|
74
|
+
|
|
75
|
+
[tool.poetry.group.doc]
|
|
76
|
+
optional = true
|
|
77
|
+
[tool.poetry.group.doc.dependencies]
|
|
78
|
+
ansys-sphinx-theme = { version = "^1.7.0", extras = [ "autoapi" ] }
|
|
79
|
+
autodoc-pydantic = { version = "^2.2.0" }
|
|
80
|
+
numpydoc = { version = "^1.10.0" }
|
|
81
|
+
sphinx = { version = "^8.1.3", python = ">=3.10,<4" }
|
|
82
|
+
sphinx-autodoc-typehints = { version = "^2.2.0" }
|
|
83
|
+
sphinx-copybutton = { version = "^0.5.2" }
|
|
84
|
+
sphinx-design = { version = "^0.6.1" }
|
|
85
|
+
sphinx-jinja = { version = "^2.0.0" }
|
|
86
|
+
toml = { version = "^0.10.2" }
|
|
87
|
+
nbsphinx = { version = "^0.9.8" }
|
|
88
|
+
sphinx_toolbox = { version = "^4.1.0" }
|
|
89
|
+
sphinxcontrib-mermaid = { version = "^1.2.3" }
|
|
90
|
+
sphinxcontrib-video = { version = "^0.4.1" }
|
|
91
|
+
sphinx-code-tabs = { version = "^0.5.5" }
|
|
92
|
+
sphinx-tabs = { version = ">=1.2.1,<3.5.0" }
|
|
93
|
+
sphinx-gallery = { version = "^0.20" }
|
|
94
|
+
sphinx-markdown-builder = { version = "^0.6.9" }
|
|
95
|
+
sphinxemoji = { version = "^0.3.1" }
|
|
96
|
+
vale = { version = "^3.13.0.0" }
|
|
97
|
+
|
|
98
|
+
[tool.poetry.group.tests]
|
|
99
|
+
optional = true
|
|
100
|
+
[tool.poetry.group.tests.dependencies]
|
|
101
|
+
coverage = "^7.0.0"
|
|
102
|
+
filelock = "^3.8.0"
|
|
103
|
+
mock = "^4.0.3"
|
|
104
|
+
pytest = "^9.0.3"
|
|
105
|
+
pytest-cov = "^7.0.0"
|
|
106
|
+
pytest-dependency = "^0.5.1"
|
|
107
|
+
pytest-flakes = "^4.0.5"
|
|
108
|
+
pytest-pep8 = "^1.0"
|
|
109
|
+
pytest-pythonpath = "^0.7"
|
|
110
|
+
pytest-xdist = "^3.0.2"
|
|
111
|
+
pytest-mock = "^3.12"
|
|
112
|
+
tox = "^4.4.0"
|
|
113
|
+
ansys-saf-testing = {version = ">=0.11.dev0, <1.0.0", allow-prereleases = true, extras = ["solution", "selenium"]}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
[tool.poetry.group.build]
|
|
117
|
+
optional = true
|
|
118
|
+
[tool.poetry.group.build.dependencies]
|
|
119
|
+
build = "^0.8.0"
|
|
120
|
+
twine = "6.0.1"
|
|
121
|
+
pkginfo = "^1.12.1.2"
|
|
122
|
+
pyinstaller = { version = "^6.16", python = "<3.15" }
|
|
123
|
+
toml = "^0.10.2"
|
|
124
|
+
pyc-wheel = "^1.2.7"
|
|
125
|
+
ansys-saf-desktop-installer = {version = "^1.15.dev1", allow-prereleases=true, extras = ["all"]}
|
|
126
|
+
|
|
127
|
+
[tool.poetry.group.style]
|
|
128
|
+
optional = true
|
|
129
|
+
[tool.poetry.group.style.dependencies]
|
|
130
|
+
black = "^26.3.1"
|
|
131
|
+
isort = "^7.0.0"
|
|
132
|
+
flake8 = {version="^7.3.0", python=">=3.8.1,<4"}
|
|
133
|
+
codespell = "^2.4.1"
|
|
134
|
+
pydocstyle = "^6.3.0"
|
|
135
|
+
tox = "^4.4.0"
|
|
136
|
+
|
|
137
|
+
[tool.black]
|
|
138
|
+
line-length = 120
|
|
139
|
+
|
|
140
|
+
[tool.isort]
|
|
141
|
+
profile = "black"
|
|
142
|
+
force_sort_within_sections = true
|
|
143
|
+
line_length = 120
|
|
144
|
+
default_section = "THIRDPARTY"
|
|
145
|
+
src_paths = ["doc", "src", "tests"]
|
|
146
|
+
|
|
147
|
+
[tool.codespell]
|
|
148
|
+
skip = '.github,.venv,.tox,requirements,CODEOWNERS,*.tmp,CHANGELOG.md'
|
|
149
|
+
count = ''
|
|
150
|
+
quiet-level = 3
|
|
151
|
+
check-hidden = ""
|
|
152
|
+
ignore-words = ".codespell.ignore"
|
|
153
|
+
|
|
154
|
+
[tool.coverage.run]
|
|
155
|
+
source = ["{{ cookiecutter.__solution_namespace }}"]
|
|
156
|
+
|
|
157
|
+
[tool.coverage.report]
|
|
158
|
+
show_missing = true
|
|
159
|
+
|
|
160
|
+
[tool.towncrier]
|
|
161
|
+
package = "{{ cookiecutter.__pkg_namespace }}"
|
|
162
|
+
directory = "doc/changelog.d"
|
|
163
|
+
filename = "doc/source/changelog.rst"
|
|
164
|
+
start_string = ".. towncrier release notes start\n"
|
|
165
|
+
template = "doc/changelog.d/changelog_template.jinja"
|
|
166
|
+
title_format = "`{version} <https://github.com/ansys/{{ cookiecutter.__solution_name }}/releases/tag/v{version}>`_ - {project_date}"
|
|
167
|
+
issue_format = "`#{issue} <https://github.com/ansys/{{ cookiecutter.__solution_name }}/pull/{issue}>`_"
|
|
168
|
+
|
|
169
|
+
[[tool.towncrier.type]]
|
|
170
|
+
directory = "added"
|
|
171
|
+
name = "Added"
|
|
172
|
+
showcontent = true
|
|
173
|
+
|
|
174
|
+
[[tool.towncrier.type]]
|
|
175
|
+
directory = "changed"
|
|
176
|
+
name = "Changed"
|
|
177
|
+
showcontent = true
|
|
178
|
+
|
|
179
|
+
[[tool.towncrier.type]]
|
|
180
|
+
directory = "fixed"
|
|
181
|
+
name = "Fixed"
|
|
182
|
+
showcontent = true
|
|
183
|
+
|
|
184
|
+
[[tool.towncrier.type]]
|
|
185
|
+
directory = "dependencies"
|
|
186
|
+
name = "Dependencies"
|
|
187
|
+
showcontent = true
|
|
188
|
+
|
|
189
|
+
[[tool.towncrier.type]]
|
|
190
|
+
directory = "miscellaneous"
|
|
191
|
+
name = "Miscellaneous"
|
|
192
|
+
showcontent = true
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
|
|
3
|
+
sonar.projectKey=<copy-this-from-the-sonarqube-server-webpage> # TODO: replace with real value
|
|
4
|
+
sonar.projectName={{cookiecutter.__pkg_name}}
|
|
5
|
+
sonar.projectVersion={{cookiecutter.__version}} # x-release-please-version
|
|
6
|
+
sonar.sources=src
|
|
7
|
+
sonar.exclusions=**/tests/**, **/testing/**, **/dist/**, **/coverage/**, **/build/**, **/.venv/**, **/.poetry/**, **/.ruff_cache/**, **/.tox/**
|
|
8
|
+
sonar.tests=tests
|
|
9
|
+
sonar.projectBaseDir=.
|
|
10
|
+
|
|
11
|
+
sonar.python.version=3.10,3.11,3.12,3.13,3.14
|
|
12
|
+
sonar.python.coverage.reportPaths=coverage-*/coverage.xml
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
|
|
3
|
+
"""Entry point."""
|
|
4
|
+
|
|
5
|
+
from ansys.saf.glow.runtime import glow_main
|
|
6
|
+
|
|
7
|
+
from {{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.solution import definition
|
|
8
|
+
{%- if cookiecutter.__ui_framework != "none" %}
|
|
9
|
+
from {{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.ui import app
|
|
10
|
+
{%- endif %}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main():
|
|
14
|
+
"""Entry point."""
|
|
15
|
+
glow_main(definition, {% if cookiecutter.__ui_framework != "none" %}app{% else %}None{% endif %})
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
if __name__ == "__main__":
|
|
19
|
+
main()
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 27.8.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 400 200" style="enable-background:new 0 0 400 200;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#FFFFFF;}
|
|
7
|
+
.st1{fill:#FCB618;}
|
|
8
|
+
</style>
|
|
9
|
+
<g id="Ansys_Logo_Blk_Screen_00000055667838048801124960000008909429316679592099_">
|
|
10
|
+
<g>
|
|
11
|
+
<g>
|
|
12
|
+
<path class="st0" d="M185.72,78.65c3.3,3.9,4.9,9.8,4.9,17.6v33.6h-17.1v-32.8c0-3.8-0.7-6.5-2.1-8.3c-1.4-1.7-3.6-2.6-6.5-2.6
|
|
13
|
+
c-3.6,0-6.4,1.1-8.6,3.4c-2.2,2.3-3.2,5.3-3.2,9.1v31.2h-17.1v-55.6h16.6v7.9c2-3,4.5-5.3,7.7-6.9c3.1-1.6,6.7-2.4,10.6-2.4
|
|
14
|
+
C177.52,72.85,182.52,74.85,185.72,78.65"/>
|
|
15
|
+
<path class="st0" d="M209.42,129.05c-4.3-1.2-8-2.9-11.1-5l4.5-11.8c3,2,6.4,3.6,10,4.8c3.6,1.1,7.3,1.7,11,1.7
|
|
16
|
+
c2.6,0,4.7-0.4,6.2-1.3c1.5-0.9,2.2-2.1,2.2-3.6c0-1.4-0.5-2.4-1.5-3.2s-2.9-1.4-5.7-2l-9.1-2c-5.4-1.2-9.3-3.1-11.9-5.6
|
|
17
|
+
c-2.5-2.5-3.8-6-3.8-10.4c0-3.5,1-6.5,3-9.2c2-2.6,4.8-4.7,8.5-6.2c3.7-1.5,7.8-2.3,12.5-2.3c4,0,7.9,0.6,11.7,1.8
|
|
18
|
+
c3.8,1.2,7.2,2.9,10.2,5.1l-4.5,11.3c-5.9-4.1-11.7-6.1-17.5-6.1c-2.6,0-4.7,0.5-6.2,1.4s-2.3,2.2-2.3,3.9c0,1.2,0.5,2.2,1.4,2.8
|
|
19
|
+
c0.9,0.7,2.5,1.3,4.8,1.9l9.4,2.2c5.7,1.3,9.8,3.2,12.4,5.8s3.9,6.1,3.9,10.6c0,5.4-2.1,9.6-6.4,12.6c-4.3,3.1-10.2,4.6-17.6,4.6
|
|
20
|
+
C218.42,130.85,213.72,130.25,209.42,129.05"/>
|
|
21
|
+
<path class="st0" d="M323.52,129.05c-4.3-1.2-8-2.9-11.1-5l4.5-11.8c3,2,6.4,3.6,10,4.8c3.6,1.1,7.3,1.7,11,1.7
|
|
22
|
+
c2.6,0,4.7-0.4,6.2-1.3c1.5-0.9,2.2-2.1,2.2-3.6c0-1.4-0.5-2.4-1.5-3.2s-2.9-1.4-5.7-2l-9.1-2c-5.4-1.2-9.3-3.1-11.9-5.6
|
|
23
|
+
c-2.5-2.5-3.8-6-3.8-10.4c0-3.5,1-6.5,3-9.2c2-2.6,4.8-4.7,8.5-6.2s7.8-2.3,12.5-2.3c4,0,7.9,0.6,11.7,1.8
|
|
24
|
+
c3.8,1.2,7.2,2.9,10.2,5.1l-4.5,11.3c-5.9-4.1-11.7-6.1-17.5-6.1c-2.6,0-4.7,0.5-6.2,1.4s-2.3,2.2-2.3,3.9c0,1.2,0.5,2.2,1.4,2.8
|
|
25
|
+
c0.9,0.7,2.5,1.3,4.8,1.9l9.4,2.2c5.7,1.3,9.8,3.2,12.4,5.8s3.9,6.1,3.9,10.6c0,5.4-2.1,9.6-6.4,12.6c-4.3,3.1-10.2,4.6-17.6,4.6
|
|
26
|
+
C332.52,130.85,327.82,130.25,323.52,129.05"/>
|
|
27
|
+
</g>
|
|
28
|
+
<g>
|
|
29
|
+
<polygon class="st1" points="71.72,49.75 37.72,129.85 60.92,129.85 93.72,49.75 "/>
|
|
30
|
+
<polygon class="st0" points="97.72,52.35 86.72,79.25 107.42,129.85 130.72,129.85 "/>
|
|
31
|
+
</g>
|
|
32
|
+
<polygon class="st0" points="295.22,74.25 281.22,107.15 267.22,74.25 250.32,74.25 272.82,126.95 262.82,150.35 279.72,150.35
|
|
33
|
+
312.12,74.25 "/>
|
|
34
|
+
</g>
|
|
35
|
+
</g>
|
|
36
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="98" height="88" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><defs><clipPath id="clip0"><rect x="476" y="163" width="98" height="88"/></clipPath></defs><g clip-path="url(#clip0)" transform="translate(-476 -163)"><path d="M184.888 78.2977C188.173 82.1802 189.766 88.0538 189.766 95.8188L189.766 129.268 172.743 129.268 172.743 96.6152C172.743 92.8323 172.046 90.1444 170.652 88.3524 169.258 86.66 167.068 85.7641 164.181 85.7641 160.597 85.7641 157.81 86.8591 155.62 89.1488 153.43 91.4385 152.434 94.4251 152.434 98.2081L152.434 129.268 135.411 129.268 135.411 73.9174 151.936 73.9174 151.936 81.782C153.927 78.7954 156.416 76.5057 159.602 74.9129 162.688 73.3201 166.272 72.5236 170.154 72.5236 176.725 72.5236 181.702 74.5147 184.888 78.2977" fill="#FFFFFF" transform="matrix(1.00553 0 0 1 439.763 116.674)"/><path d="M208.482 128.472C204.201 127.277 200.518 125.585 197.432 123.494L201.911 111.747C204.898 113.738 208.283 115.331 211.867 116.526 215.45 117.621 219.134 118.218 222.817 118.218 225.406 118.218 227.496 117.82 228.99 116.924 230.483 116.028 231.18 114.833 231.18 113.34 231.18 111.946 230.682 110.951 229.686 110.154 228.691 109.358 226.799 108.761 224.012 108.163L214.953 106.172C209.577 104.978 205.694 103.086 203.106 100.597 200.617 98.1085 199.323 94.6242 199.323 90.2439 199.323 86.7596 200.319 83.773 202.31 81.0851 204.301 78.4968 207.088 76.4062 210.772 74.9129 214.455 73.4196 218.537 72.6232 223.216 72.6232 227.198 72.6232 231.08 73.2205 234.863 74.4151 238.646 75.6098 242.031 77.3021 245.017 79.4923L240.538 90.7417C234.664 86.66 228.89 84.669 223.116 84.669 220.528 84.669 218.437 85.1668 216.944 86.0627 215.45 86.9587 214.654 88.2529 214.654 89.9452 214.654 91.1399 215.152 92.1354 216.048 92.7327 216.944 93.4296 218.537 94.0269 220.826 94.6242L230.184 96.8143C235.859 98.1085 239.94 100 242.529 102.588 245.117 105.177 246.411 108.661 246.411 113.141 246.411 118.517 244.321 122.698 240.04 125.684 235.759 128.771 229.886 130.264 222.519 130.264 217.442 130.264 212.763 129.667 208.482 128.472" fill="#FFFFFF" transform="matrix(1.00553 0 0 1 439.763 116.674)"/><path d="M322.071 128.472C317.79 127.277 314.107 125.585 311.02 123.494L315.5 111.747C318.487 113.738 321.872 115.331 325.455 116.526 329.039 117.621 332.723 118.218 336.406 118.218 338.995 118.218 341.085 117.82 342.578 116.924 344.072 116.028 344.769 114.833 344.769 113.34 344.769 111.946 344.271 110.951 343.275 110.154 342.28 109.358 340.388 108.761 337.601 108.163L328.542 106.172C323.166 104.978 319.283 103.086 316.695 100.597 314.206 98.1085 312.912 94.6242 312.912 90.2439 312.912 86.7596 313.907 83.773 315.898 81.0851 317.889 78.4968 320.677 76.4062 324.36 74.9129 328.044 73.4196 332.125 72.6232 336.804 72.6232 340.786 72.6232 344.669 73.2205 348.452 74.4151 352.235 75.6098 355.62 77.3021 358.606 79.4923L354.126 90.7417C348.253 86.66 342.479 84.669 336.705 84.669 334.116 84.669 332.026 85.1668 330.533 86.0627 329.039 86.9587 328.243 88.2529 328.243 89.9452 328.243 91.1399 328.741 92.1354 329.637 92.7327 330.533 93.4296 332.125 94.0269 334.415 94.6242L343.773 96.8143C349.447 98.1085 353.529 100 356.117 102.588 358.706 105.177 360 108.661 360 113.141 360 118.517 357.909 122.698 353.629 125.684 349.348 128.771 343.474 130.264 336.108 130.264 331.03 130.264 326.351 129.667 322.071 128.472" fill="#FFFFFF" transform="matrix(1.00553 0 0 1 439.763 116.674)"/><path d="M71.3987 49.5271 37.551 129.268 60.6471 129.268 93.3002 49.5271Z" fill="#FCB618" transform="matrix(1.00553 0 0 1 439.763 116.674)"/><path d="M97.2822 52.1155 86.3315 78.895 106.939 129.268 130.134 129.268Z" fill="#FFFFFF" transform="matrix(1.00553 0 0 1 439.763 116.674)"/><path d="M293.897 73.9174 279.96 106.67 266.023 73.9174 249.199 73.9174 271.598 126.381 261.643 149.676 278.467 149.676 310.722 73.9174Z" fill="#FFFFFF" transform="matrix(1.00553 0 0 1 439.763 116.674)"/></g></svg>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
|
|
3
|
+
"""Solution definition module."""
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
from ansys.saf.glow.solution import Solution, StepsModel
|
|
7
|
+
|
|
8
|
+
from {{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.solution.first_step import FirstStep
|
|
9
|
+
from {{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.solution.second_step import SecondStep
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Steps(StepsModel):
|
|
13
|
+
"""Workflow definition."""
|
|
14
|
+
|
|
15
|
+
first_step: FirstStep
|
|
16
|
+
second_step: SecondStep
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class {{ cookiecutter.__solution_definition_class_name }}(Solution):
|
|
20
|
+
"""Solution definition."""
|
|
21
|
+
|
|
22
|
+
display_name: str = "{{ cookiecutter.__solution_display_name.replace('"', '') }}"
|
|
23
|
+
version: int = 1
|
|
24
|
+
steps: Steps
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
|
|
3
|
+
"""Backend of the first step."""
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
from ansys.saf.glow.solution import NO_ENTITY, EntityHandle, StepModel, StepSpec, transaction
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FirstStep(StepModel):
|
|
10
|
+
"""Step definition of the first step."""
|
|
11
|
+
|
|
12
|
+
first_arg: float = 0
|
|
13
|
+
second_arg: float = 0
|
|
14
|
+
result: float = 0
|
|
15
|
+
|
|
16
|
+
result_file: EntityHandle = NO_ENTITY
|
|
17
|
+
|
|
18
|
+
@transaction(self=StepSpec(upload=["result"], download=["first_arg", "second_arg"]))
|
|
19
|
+
def calculate(self) -> None:
|
|
20
|
+
"""Compute the sum of two numbers."""
|
|
21
|
+
self.result = self.first_arg + self.second_arg
|
|
22
|
+
|
|
23
|
+
@transaction(self=StepSpec(upload=["result_file"], download=["result"]))
|
|
24
|
+
def save_result(self) -> None:
|
|
25
|
+
"""Save the result to result file."""
|
|
26
|
+
self.result_file = self.storage_scope.store_stream(str(self.result).encode("utf-8"))
|
|
27
|
+
|
|
28
|
+
@transaction(self=StepSpec(download=["result_file"]))
|
|
29
|
+
def load_result(self) -> float | None:
|
|
30
|
+
"""Load the result from result file."""
|
|
31
|
+
if self.result_file == NO_ENTITY:
|
|
32
|
+
return None
|
|
33
|
+
result = self.storage_scope.get_text(self.result_file)
|
|
34
|
+
return float(result)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Add here your script files to use the AssetFileReference feature
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Package containing the business logic modules.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Assets such as input decks required to run the business logic.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
|
|
3
|
+
"""Application."""
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import tempfile
|
|
7
|
+
|
|
8
|
+
import dash
|
|
9
|
+
from dash_extensions.enrich import DashProxy, MultiplexerTransform, TriggerTransform
|
|
10
|
+
import dash_uploader as du
|
|
11
|
+
|
|
12
|
+
dash._dash_renderer._set_react_version("18.2.0")
|
|
13
|
+
|
|
14
|
+
app = DashProxy(
|
|
15
|
+
__name__,
|
|
16
|
+
suppress_callback_exceptions=True,
|
|
17
|
+
transforms=[TriggerTransform(), MultiplexerTransform()],
|
|
18
|
+
requests_pathname_prefix=f"{os.getenv('GLOW_UI_PATH_PREFIX', '/')}",
|
|
19
|
+
use_pages=True,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
# If folder doesn't exist, it will be created later
|
|
23
|
+
UPLOAD_DIRECTORY = os.path.join(tempfile.gettempdir(), "GLOW")
|
|
24
|
+
du.configure_upload(app, UPLOAD_DIRECTORY)
|
|
25
|
+
|
|
26
|
+
# !IMPORTANT Keeping the import line here to adapt with dash_uploader config, moving the import above will fail the
|
|
27
|
+
# dash uploader configuration
|
|
28
|
+
from {{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.ui.pages.page import layout
|
|
29
|
+
|
|
30
|
+
app.layout = layout
|