Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tree API and go_package option #75

Merged
merged 5 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# Owners will be requested for review when someone opens a PR.
* @greschd @janvonrickenbach @roosre
* @greschd @roosre @SRaimondi
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
},
entry_points={
"ansys.tools.protoc_helper.proto_provider": [
"ansys.api.acp.v0=ansys.api.acp.v0"
"ansys.api.acp.v0=ansys.api.acp.v0",
"ansys.api.acp.internal=ansys.api.acp.internal",
],
},
cmdclass=CMDCLASS_OVERRIDE,
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/api/acp/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.3.0.dev0
2 changes: 1 addition & 1 deletion src/ansys/api/acp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
52 changes: 52 additions & 0 deletions src/ansys/api/acp/internal/tree.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
// 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.

syntax = "proto3";
package ansys.api.acp.internal.tree;

// The package name 'internal' has special meaning in Go:
// other modules cannot import it.
// To avoid this, we use 'unstable' instead of 'internal'.
// This only affects the generated Go code.
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/unstable/tree";

// This is an internal proto definition and should not be
// used in any public interface.
// Stability and backwards compatibility is not guaranteed.

import "ansys/api/acp/v0/base.proto";

message TreeObject {
ansys.api.acp.v0.base.BasicInfo basic_info = 1;
ansys.api.acp.v0.base.ResourcePath leaf_resource_path = 2;
}

message ListTreeObjectsRequest {
// The resource path must represent a model
ansys.api.acp.v0.base.ResourcePath resource_path = 1;
}

message FlatTree { repeated TreeObject tree_objects = 1; }

service TreeObjectService {
rpc ListTreeObjects(ListTreeObjectsRequest) returns (FlatTree);
}
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/analysis_ply.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.analysis_ply;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/analysis_ply";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/array_types.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.array_types;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/array_types";

message DoubleArray {
repeated double data = 1 [ packed = true ];
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/base.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.base;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/base";

message Empty {}

Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/boolean_selection_rule.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.boolean_selection_rule;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/boolean_selection_rule";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/butt_joint_sequence.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.butt_joint_sequence;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/butt_joint_sequence";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/cad_component.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.cad_component;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/cad_component";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/cad_geometry.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.cad_geometry;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/cad_geometry";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/control.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.control;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/control";

import "ansys/api/acp/v0/base.proto";

Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/cut_off_geometry.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.cut_off_geometry;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/cut_off_geometry";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/cut_off_material.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.cut_off_material;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/cut_off_material";

// defines the source of the cut-off material
enum MaterialHandlingType {
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/cutoff_selection_rule.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.cutoff_selection_rule;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/cutoff_selection_rule";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/cylindrical_selection_rule.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.cylindrical_selection_rule;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/cylindrical_selection_rule";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/drop_off_material.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.drop_off_material;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/drop_off_material";

// defines the source of the drop-off material
enum MaterialHandlingType {
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/edge_set.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.edge_set;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/edge_set";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/array_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/element_set.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.element_set;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/element_set";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/array_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/enum_types.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.enum_types;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/enum_types";

// the initializers are different in the backend but here it has to be
// zero-based
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/extrusion_guide.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.extrusion_guide;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/extrusion_guide";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/fabric.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.fabric;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/fabric";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/field_definition.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.field_definition;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/field_definition";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/geometrical_selection_rule.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.geometrical_selection_rule;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/geometrical_selection_rule";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/imported_analysis_ply.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.imported_analysis_ply;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/imported_analysis_ply";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/imported_modeling_group.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.imported_modeling_group;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/imported_modeling_group";

import "ansys/api/acp/v0/base.proto";

Expand Down
3 changes: 2 additions & 1 deletion src/ansys/api/acp/v0/imported_modeling_ply.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
// SPDX-License-Identifier: MIT
//
//
Expand All @@ -22,6 +22,7 @@

syntax = "proto3";
package ansys.api.acp.v0.imported_modeling_ply;
option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/v0/imported_modeling_ply";

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/enum_types.proto";
Expand Down
Loading
Loading