Skip to content

feat: add description to projects and workspaces#314

Open
msd-11 wants to merge 1 commit into
mainfrom
feat/decription-field
Open

feat: add description to projects and workspaces#314
msd-11 wants to merge 1 commit into
mainfrom
feat/decription-field

Conversation

@msd-11

@msd-11 msd-11 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Add description field to SimAI and GeomAI project/workspace objects.

It is possible to retrieve and update this field, and to set it on object creation.

@msd-11 msd-11 self-assigned this Jun 8, 2026
Copilot AI review requested due to automatic review settings June 8, 2026 10:16
@msd-11 msd-11 requested a review from a team as a code owner June 8, 2026 10:16
@msd-11 msd-11 requested review from marielelandais and u8slvn and removed request for a team June 8, 2026 10:16
@github-actions github-actions Bot added the enhancement New features or code improvements label Jun 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds first-class support for a description field on SimAI and GeomAI project/workspace objects, including retrieval via a property, update via a setter method, and inclusion on object creation.

Changes:

  • Added description property and set_description() mutator on Project/Workspace data models (SimAI + GeomAI).
  • Extended create() methods for projects/workspaces to accept an optional description.
  • Generalized API update_* methods to accept arbitrary fields (via **kwargs) and added/extended tests for the new behavior.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/test_workspace.py Adds workspace description tests (get/set/create).
tests/test_projects.py Adds project description tests (get/set/create).
tests/geomai/test_geomai_workspaces.py Adds GeomAI workspace description tests (get/set/create).
tests/geomai/test_geomai_projects.py Adds GeomAI project description tests (get/set/create).
src/ansys/simai/core/data/workspaces.py Adds description + set_description() and supports description in workspace creation.
src/ansys/simai/core/data/projects.py Adds description + set_description() and supports description in project creation.
src/ansys/simai/core/data/geomai/workspaces.py Adds description + set_description() and supports description in GeomAI workspace creation.
src/ansys/simai/core/data/geomai/projects.py Adds description + set_description() and supports description in GeomAI project creation.
src/ansys/simai/core/api/workspace.py Changes workspace update API to accept **kwargs.
src/ansys/simai/core/api/project.py Changes project update API to accept **kwargs.
src/ansys/simai/core/api/geomai/workspaces.py Changes GeomAI workspace update API to accept **kwargs.
src/ansys/simai/core/api/geomai/projects.py Changes GeomAI project update API to accept **kwargs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +294 to +296
return self._model_from(
self._client._api.create_workspace(name, model_id, description=description)
)
Comment on lines +344 to +346
return self._model_from(
self._client._api.create_project(name=name, description=description)
)
Comment on lines 218 to 222
return self._model_from(
self._client._api.create_geomai_workspace(name, get_id_from_identifiable(project))
self._client._api.create_geomai_workspace(
name, get_id_from_identifiable(project), description=description
)
)
Comment on lines +226 to +228
return self._model_from(
self._client._api.create_geomai_project(name=name, description=description)
)
Comment on lines +115 to 119
def update_workspace(self, workspace_id: str, **kwargs):
"""Update a workspace.

Args:
workspace_id: ID of the workspace.
Comment on lines +53 to 57
def update_project(self, project_id: str, **kwargs):
"""Update a project.

Args:
project_id: ID of the project.
Comment on lines +109 to 113
def update_geomai_workspace(self, workspace_id: str, **kwargs):
"""Update a GeomAI workspace.

Args:
workspace_id: ID of the workspace.
Comment on lines +53 to +60
def update_geomai_project(self, project_id: str, **kwargs):
"""Update a GeomAI project.

Args:
project_id: ID of the project.
**kwargs: Project fields to pass as keyword arguments.
"""
self._patch(f"geomai/projects/{project_id}", json=kwargs, return_json=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New features or code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants