ansys-api-sherlock 0.1.13__tar.gz

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.
Files changed (23) hide show
  1. ansys-api-sherlock-0.1.13/LICENSE +21 -0
  2. ansys-api-sherlock-0.1.13/PKG-INFO +75 -0
  3. ansys-api-sherlock-0.1.13/README.md +63 -0
  4. ansys-api-sherlock-0.1.13/pyproject.toml +3 -0
  5. ansys-api-sherlock-0.1.13/setup.cfg +4 -0
  6. ansys-api-sherlock-0.1.13/setup.py +50 -0
  7. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/VERSION +1 -0
  8. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/__init__.py +8 -0
  9. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/py.typed +0 -0
  10. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/v0/SherlockAnalysisService.proto +150 -0
  11. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/v0/SherlockCommonService.proto +103 -0
  12. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/v0/SherlockLayerService.proto +313 -0
  13. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/v0/SherlockLifeCycleService.proto +746 -0
  14. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/v0/SherlockModelService.proto +121 -0
  15. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/v0/SherlockPartsService.proto +255 -0
  16. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/v0/SherlockProjectService.proto +169 -0
  17. ansys-api-sherlock-0.1.13/src/ansys/api/sherlock/v0/SherlockStackupService.proto +355 -0
  18. ansys-api-sherlock-0.1.13/src/ansys_api_sherlock.egg-info/PKG-INFO +75 -0
  19. ansys-api-sherlock-0.1.13/src/ansys_api_sherlock.egg-info/SOURCES.txt +21 -0
  20. ansys-api-sherlock-0.1.13/src/ansys_api_sherlock.egg-info/dependency_links.txt +1 -0
  21. ansys-api-sherlock-0.1.13/src/ansys_api_sherlock.egg-info/entry_points.txt +2 -0
  22. ansys-api-sherlock-0.1.13/src/ansys_api_sherlock.egg-info/requires.txt +2 -0
  23. ansys-api-sherlock-0.1.13/src/ansys_api_sherlock.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 ANSYS, Inc. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,75 @@
1
+ Metadata-Version: 2.1
2
+ Name: ansys-api-sherlock
3
+ Version: 0.1.13
4
+ Summary: Autogenerated python gRPC interface package for ansys-api-sherlock, built on 14:30:26 on 20 April 2023
5
+ Home-page: https://github.com/ansys/ansys-api-sherlock
6
+ Author: ANSYS, Inc.
7
+ Author-email: support@ansys.com
8
+ License: MIT
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+
13
+ ### ansys-api-sherlock gRPC Interface Package
14
+
15
+ This Python package contains the auto-generated gRPC Python interface files for
16
+ Sherlock.
17
+
18
+
19
+ #### Installation
20
+
21
+ Provided that these wheels have been published to public PyPI, they can be
22
+ installed with:
23
+
24
+ ```
25
+ pip install ansys-api-sherlock
26
+ ```
27
+
28
+ Otherwise, see the
29
+
30
+
31
+ #### Build
32
+
33
+ To build the gRPC packages, run:
34
+
35
+ ```
36
+ pip install build
37
+ python -m build
38
+ ```
39
+
40
+ This will create both the source distribution containing just the protofiles
41
+ along with the wheel containing the protofiles and build Python interface
42
+ files.
43
+
44
+ Note that the interface files are identical regardless of the version of Python
45
+ used to generate them, but the last pre-built wheel for ``grpcio~=1.17`` was
46
+ Python 3.7, so to improve your build time, use Python 3.7 when building the
47
+ wheel.
48
+
49
+
50
+ #### Manual Deployment
51
+
52
+ After building the packages, manually deploy them with:
53
+
54
+ ```
55
+ pip install twine
56
+ twine upload dist/*
57
+ ```
58
+
59
+ Note that this is automatically done through CI/CD.
60
+
61
+
62
+ #### Automatic Deployment
63
+
64
+ This repository contains GitHub CI/CD that enables the automatic building of
65
+ source and wheel packages for these gRPC Python interface files. By default,
66
+ these are built on PRs, the main branch, and on tags when pushing. Artifacts
67
+ are uploaded for each PR.
68
+
69
+ To publicly release wheels to PyPI, ensure your branch is up-to-date and then
70
+ push tags. For example, for the version ``v0.5.0``.
71
+
72
+ ```bash
73
+ git tag v0.5.0
74
+ git push --tags
75
+ ```
@@ -0,0 +1,63 @@
1
+ ### ansys-api-sherlock gRPC Interface Package
2
+
3
+ This Python package contains the auto-generated gRPC Python interface files for
4
+ Sherlock.
5
+
6
+
7
+ #### Installation
8
+
9
+ Provided that these wheels have been published to public PyPI, they can be
10
+ installed with:
11
+
12
+ ```
13
+ pip install ansys-api-sherlock
14
+ ```
15
+
16
+ Otherwise, see the
17
+
18
+
19
+ #### Build
20
+
21
+ To build the gRPC packages, run:
22
+
23
+ ```
24
+ pip install build
25
+ python -m build
26
+ ```
27
+
28
+ This will create both the source distribution containing just the protofiles
29
+ along with the wheel containing the protofiles and build Python interface
30
+ files.
31
+
32
+ Note that the interface files are identical regardless of the version of Python
33
+ used to generate them, but the last pre-built wheel for ``grpcio~=1.17`` was
34
+ Python 3.7, so to improve your build time, use Python 3.7 when building the
35
+ wheel.
36
+
37
+
38
+ #### Manual Deployment
39
+
40
+ After building the packages, manually deploy them with:
41
+
42
+ ```
43
+ pip install twine
44
+ twine upload dist/*
45
+ ```
46
+
47
+ Note that this is automatically done through CI/CD.
48
+
49
+
50
+ #### Automatic Deployment
51
+
52
+ This repository contains GitHub CI/CD that enables the automatic building of
53
+ source and wheel packages for these gRPC Python interface files. By default,
54
+ these are built on PRs, the main branch, and on tags when pushing. Artifacts
55
+ are uploaded for each PR.
56
+
57
+ To publicly release wheels to PyPI, ensure your branch is up-to-date and then
58
+ push tags. For example, for the version ``v0.5.0``.
59
+
60
+ ```bash
61
+ git tag v0.5.0
62
+ git push --tags
63
+ ```
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools >= 42.0.0", "wheel", "ansys_tools_protoc_helper"]
3
+ build-backend = "setuptools.build_meta:__legacy__"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,50 @@
1
+ """Installation file for the ansys-api-sherlock package"""
2
+
3
+ import os
4
+ from datetime import datetime
5
+
6
+ import setuptools
7
+
8
+ from ansys.tools.protoc_helper import CMDCLASS_OVERRIDE
9
+
10
+ # Get the long description from the README file
11
+ HERE = os.path.abspath(os.path.dirname(__file__))
12
+ with open(os.path.join(HERE, "README.md"), encoding="utf-8") as f:
13
+ long_description = f.read()
14
+
15
+ product = "sherlock"
16
+ library = ""
17
+ package_info = ["ansys", "api", product, library, "v0"]
18
+ with open(os.path.join(HERE, "src", "ansys", "api", product, library, "VERSION"), encoding="utf-8") as f:
19
+ version = f.read().strip()
20
+
21
+ package_name = "ansys-api-sherlock"
22
+ dot_package_name = '.'.join(filter(None, package_info))
23
+
24
+ description = f"Autogenerated python gRPC interface package for {package_name}, built on {datetime.now().strftime('%H:%M:%S on %d %B %Y')}"
25
+
26
+ if __name__ == "__main__":
27
+ setuptools.setup(
28
+ name=package_name,
29
+ version=version,
30
+ author="ANSYS, Inc.",
31
+ author_email='support@ansys.com',
32
+ description=description,
33
+ long_description=long_description,
34
+ long_description_content_type='text/markdown',
35
+ url=f"https://github.com/ansys/{package_name}",
36
+ license="MIT",
37
+ python_requires=">=3.7",
38
+ install_requires=["grpcio~=1.17", "protobuf~=3.19"],
39
+ package_dir = {"": "src"},
40
+ packages=setuptools.find_namespace_packages("src", include=("ansys.*",)),
41
+ package_data={
42
+ "": ["*.proto", "*.pyi", "py.typed", "VERSION"],
43
+ },
44
+ entry_points={
45
+ "ansys.tools.protoc_helper.proto_provider": [
46
+ f"{dot_package_name}={dot_package_name}"
47
+ ],
48
+ },
49
+ cmdclass=CMDCLASS_OVERRIDE
50
+ )
@@ -0,0 +1,8 @@
1
+ """Autogenerated Python gRPC interface package for ansys-api-sherlock."""
2
+
3
+ import pathlib
4
+
5
+ __all__ = ["__version__"]
6
+
7
+ with open(pathlib.Path(__file__).parent / "VERSION", encoding="utf-8") as f:
8
+ __version__ = f.read().strip()
@@ -0,0 +1,150 @@
1
+ // @Copyright 2023 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
2
+ syntax = "proto3";
3
+
4
+ import "ansys/api/sherlock/v0/SherlockCommonService.proto";
5
+
6
+ option java_package = "sherlock.grpc";
7
+ option java_outer_classname = "SherlockAnalysisServiceProto";
8
+
9
+ enum ModelSource {
10
+ UNKNOWN = 0; // Default enum to catch invalid source
11
+ GENERATED = 1; // Generated analysis model source
12
+ STRAIN_MAP = 2; // Strain map analysis model source
13
+ }
14
+
15
+ /**
16
+ * Request to run one or more Sherlock analysis given the project path, CCA name, analyses, lifecycle phases and events.
17
+ */
18
+ message RunAnalysisRequest {
19
+ string project = 1; // Sherlock project name.
20
+ string ccaName = 2; // The CCA name.
21
+
22
+ message Analysis {
23
+ enum AnalysisType {
24
+ reserved 6;
25
+ UNKNOWN = 0; // Default enum to catch invalid analysis.
26
+ NaturalFreq = 1; // Enum for the Natural Frequency analysis.
27
+ HarmonicVibe = 2; // Enum for the Harmonic Vibe analysis.
28
+ ICTAnalysis = 3; // Enum for the ICA analysis.
29
+ MechanicalShock = 4; // Enum for the Mechanical Shock analysis.
30
+ RandomVibe = 5; // Enum for the Random Vibe analysis.
31
+ ComponentFailureMode = 7; // Enum for the Component Failure Mechanism analysis.
32
+ DFMEAModule = 8; // Enum for the DFMEA analysis.
33
+ PTHFatigue = 9; // Enum for the PTH Fatigue analysis.
34
+ PartValidation = 10; // Enum for the Part Validation analysis.
35
+ SemiconductorWearout = 11; // Enum for the Semiconductor Wearout analysis.
36
+ SolderJointFatigue = 12; // Enum for the Solder Fatigue analysis.
37
+ ThermalDerating = 13; // Enum for the Thermal Derating analysis.
38
+ ThermalMech = 14; // Enum for the Thermal Mech analysis.
39
+ }
40
+ AnalysisType type = 1;
41
+ message Phase {
42
+ string name = 1; // Life cycle phase name.
43
+ message Event {
44
+ string name = 1; // Life cycle event name.
45
+ }
46
+ repeated Event events = 2;
47
+ }
48
+ repeated Phase phases = 2;
49
+ }
50
+
51
+ repeated Analysis analyses = 3;
52
+ }
53
+
54
+ /**
55
+ * Request to list the valid Random Vibe input fields for the provided model source and user configuration.
56
+ */
57
+ message GetRandomVibeInputFieldsRequest {
58
+ optional ModelSource modelSource = 1; // Optional model source. Default: GENERATED
59
+ }
60
+
61
+ message GetRandomVibeInputFieldsResponse {
62
+ repeated string fieldName = 1;
63
+ }
64
+
65
+ message UpdateRandomVibePropsRequest {
66
+ string project = 1; // Project name.
67
+ string ccaName = 2; // CCA name.
68
+ optional string randomVibeDamping = 3; // Modal Damping Ratio(s).
69
+ optional double naturalFreqMin = 4; // Min Frequency. For NX Nastran analysis only.
70
+ optional string naturalFreqMinUnits = 5; // Min Frequency units. For NX Nastran analysis only.
71
+ optional double naturalFreqMax = 6; // Max Frequency. For NX Nastran analysis only.
72
+ optional string naturalFreqMaxUnits = 7; // Max Frequency units. For NX Nastran analysis only.
73
+ optional double analysisTemp = 8; // Temperature.
74
+ optional string analysisTempUnits = 9; // Temperature units.
75
+ optional bool partValidationEnabled = 10; // Part Validation.
76
+ optional string forceModelRebuild = 11; // Model Creation. Valid values are "FORCE" or "AUTO"
77
+ optional bool reuseModalAnalysis = 12; // Reuse Natural Frequency. For NX Nastran analysis only.
78
+ optional bool performNFFreqRangeCheck = 13; // Frequency Range Check. For NX Nastran analysis only.
79
+ optional bool requireMaterialAssignmentEnabled = 14; // Require Material Assignment.
80
+ optional ModelSource modelSource = 15; // Optional model source. Default: GENERATED
81
+ optional string strainMapNaturalFreqs = 16; // Comma-separated list of natural frequencies for strain map analysis.
82
+ }
83
+
84
+
85
+ message GetNaturalFrequencyInputFieldsRequest {
86
+ }
87
+
88
+ message GetNaturalFrequencyInputFieldsResponse {
89
+ repeated string fieldName = 1;
90
+ }
91
+
92
+ message UpdateNaturalFrequencyPropsRequest {
93
+ string project = 1; // Project name.
94
+ string ccaName = 2; // CCA name.
95
+ int32 naturalFreqCount = 3; // NF Result Count.
96
+ double naturalFreqMin = 4; // Min Frequency.
97
+ string naturalFreqMinUnits = 5; // Min Frequency units (HZ, KHZ, MHZ, or GHZ).
98
+ double naturalFreqMax = 6; // Max Frequency.
99
+ string naturalFreqMaxUnits = 7; // Max Frequency units (HZ, KHZ, MHZ, or GHZ).
100
+ bool partValidationEnabled = 8; // Part Validation.
101
+ bool requireMaterialAssignmentEnabled = 9; // Require Material Assignment.
102
+ optional double analysisTemp = 10; // Temperature.
103
+ optional string analysisTempUnits = 11; // Temperature units (C, F, or K).
104
+ }
105
+
106
+ /**
107
+ * Request to run Sherlock strain map analysis given the project name, CCA name, and strain maps.
108
+ */
109
+ message RunStrainMapAnalysisRequest {
110
+ string project = 1; // Sherlock project name.
111
+ string ccaName = 2; // The CCA name of the main CCA for the analysis.
112
+
113
+ message StrainMapAnalysis {
114
+ enum AnalysisType {
115
+ UNKNOWN = 0; // Default enum to catch invalid analysis.
116
+ RandomVibe = 1; // Enum for the Random Vibe analysis.
117
+ }
118
+ AnalysisType type = 1;
119
+ message EventStrainMap {
120
+ string phaseName = 1; // Life cycle phase name.
121
+ string eventName = 2; // Life cycle event name.
122
+ string pcbSide = 3; // PCB side for the strain map. Supported values are: TOP, BOTTOM.
123
+ string strainMap = 4; // Strain map assigned to the event.
124
+ optional string subAssemblyName = 5; // The name of the sub-assembly CCA to be assigned the strain map.
125
+ }
126
+ repeated EventStrainMap eventStrainMaps = 2;
127
+ }
128
+
129
+ repeated StrainMapAnalysis strainMapAnalyses = 3;
130
+ }
131
+
132
+ service SherlockAnalysisService {
133
+ // Runs one or more Sherlock analysis.
134
+ rpc runAnalysis(RunAnalysisRequest) returns (ReturnCode);
135
+
136
+ // Run Sherlock strain map analysis.
137
+ rpc runStrainMapAnalysis(RunStrainMapAnalysisRequest) returns (ReturnCode);
138
+
139
+ // Returns the list of valid Random Vibe input fields for the provided model source and user configuration.
140
+ rpc getRandomVibeInputFields(GetRandomVibeInputFieldsRequest) returns (GetRandomVibeInputFieldsResponse);
141
+
142
+ // Updates the analysis properties for Random Vibe analysis.
143
+ rpc updateRandomVibeProps(UpdateRandomVibePropsRequest) returns (ReturnCode);
144
+
145
+ // Returns the list of valid Natural Frequency property fields given the user configuration.
146
+ rpc getNaturalFrequencyInputFields(GetNaturalFrequencyInputFieldsRequest) returns (GetNaturalFrequencyInputFieldsResponse);
147
+
148
+ // Updates the analysis properties for Natural Frequency analysis.
149
+ rpc updateNaturalFrequencyProps(UpdateNaturalFrequencyPropsRequest) returns (ReturnCode);
150
+ }
@@ -0,0 +1,103 @@
1
+ // © 2020 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
2
+ syntax = "proto3";
3
+
4
+ option java_package = "sherlock.grpc";
5
+ option java_outer_classname = "SherlockCommonServiceProto";
6
+
7
+ /**
8
+ * Status response of a message. A value of 0 indicates a successful request.
9
+ */
10
+ message ReturnCode {
11
+ int32 value = 1; // Status code of response. A value of 0 indicates success.
12
+ string message = 2; // Message indicating the status of response including any error.
13
+ }
14
+
15
+ /**
16
+ * Empty request to exit the gRPC connection.
17
+ */
18
+ message ExitRequest {
19
+ bool closeSherlockClient = 1; // If set to true, exits the Sherlock client if it is opened. Otherwise, just closes the gRPC connection.
20
+ }
21
+
22
+ /**
23
+ * Empty request to check if the gRPC connection is open.
24
+ */
25
+ message HealthCheckRequest {
26
+ }
27
+
28
+ /**
29
+ * Represents whether the gRPC connection is open.
30
+ */
31
+ message HealthCheckResponse {
32
+ enum ServingStatus {
33
+ UNKNOWN = 0; // Indicates an unknown connection status.
34
+ SERVING = 1; // Indicates the connection is up and server is listening.
35
+ NOT_SERVING = 2; // Indicates connection with server is closed.
36
+ }
37
+ ServingStatus status = 1;
38
+ int32 port = 2; // Listening port number on server.
39
+ }
40
+
41
+ message IsSherlockClientLoadingRequest {
42
+ }
43
+
44
+ /**
45
+ * Request for a list of valid units of the provided unit type.
46
+ */
47
+ message ListUnitsRequest {
48
+ enum UnitType {
49
+ UNKNOWN = 0; // Indicates an unknown unit type.
50
+ ACCEL_DENSITY = 1; // Units used for acceleration density.
51
+ ACCELERATION = 2; // Units used for acceleration.
52
+ AREA = 3; // Units used for area.
53
+ BANDWIDTH = 4; // Units used for bandwidth.
54
+ CAPACITANCE = 5; // Units used for electrical capacitance.
55
+ CTE = 6; // Units used for material CTE.
56
+ CURRENT = 7; // Units used for electrical current.
57
+ DENSITY = 8; // Units used for density.
58
+ DISP_DENSITY = 9; // Units used for displacement density.
59
+ FORCE = 10; // Units used for force.
60
+ FREQUENCY = 11; // Units used for frequency.
61
+ INDUCTANCE = 12; // Units used for inductance.
62
+ LENGTH = 13; // Units used for length.
63
+ POWER = 14; // Units used for electrical power.
64
+ RESISTANCE = 15; // Units used for electrical resistance.
65
+ SIZE = 16; // Units used for size.
66
+ SPECIFIC_HEAT = 17; // Units used for specific heat.
67
+ STRAIN = 18; // Units used for strain.
68
+ STRESS = 19; // Units used for stress.
69
+ TEMPERATURE = 20; // Units used for temperature.
70
+ THERMAL_CONDUCTIVITY = 21; // Units used for thermal conductivity.
71
+ THERMAL_RESISTANCE = 22; // Units used for thermal resistance.
72
+ TIME = 23; // Units used for time.
73
+ VELOCITY = 24; // Units used for velocity.
74
+ VELOCITY_DENSITY = 25; // Units used for velocity density.
75
+ VOLTAGE = 26; // Units used for electrical voltage.
76
+ VOLUME = 27; // Units used for volume.
77
+ WEIGHT = 28; // Units used for weight.
78
+ }
79
+ UnitType unitType = 1; // Unit type to request valid units of.
80
+ }
81
+
82
+ /**
83
+ * Represents a list of valid units for the provided unit type.
84
+ */
85
+ message ListUnitsResponse {
86
+ ReturnCode returnCode = 1; // Status code of response.
87
+ repeated string units = 2; // List of valid units for the requested type.
88
+ }
89
+
90
+ service SherlockCommonService {
91
+
92
+ // Returns health status of gRPC server.
93
+ rpc check(HealthCheckRequest) returns (HealthCheckResponse);
94
+
95
+ // Signals for gRPC connection to shutdown.
96
+ rpc exit(ExitRequest) returns (ReturnCode);
97
+
98
+ // Check if SherlockClient is still loading.
99
+ rpc isSherlockClientLoading(IsSherlockClientLoadingRequest) returns (ReturnCode);
100
+
101
+ // Returns a list of valid units of the provided unit type.
102
+ rpc listUnits(ListUnitsRequest) returns (ListUnitsResponse);
103
+ }