From af3f0108ad2bd661294799ec12b8497b3857679e Mon Sep 17 00:00:00 2001 From: moe-ad Date: Thu, 2 Jan 2025 11:54:40 +0100 Subject: [PATCH 1/2] doc: added links for context --- pyproject.toml | 2 +- src/ansys/dpf/core/core.py | 1 + src/ansys/dpf/core/fields_container.py | 3 ++- src/ansys/dpf/core/help.py | 6 ++++++ src/ansys/dpf/core/server_types.py | 1 + tests/test_operator.py | 2 +- 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d1c429c236c..e0673b008f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ select = [ # "I", # isort, see https://beta.ruff.rs/docs/rules/#isort-i # "N", # pep8-naming, see https://beta.ruff.rs/docs/rules/#pep8-naming-n "PTH", # flake9-use-pathlib, https://beta.ruff.rs/docs/rules/#flake8-use-pathlib-pth -# "TD", # flake8-todos, https://docs.astral.sh/ruff/rules/#flake8-todos-td + "TD", # flake8-todos, https://docs.astral.sh/ruff/rules/#flake8-todos-td ] ignore = [ # pycodestyle diff --git a/src/ansys/dpf/core/core.py b/src/ansys/dpf/core/core.py index 01867c338e7..33e7a3435f5 100644 --- a/src/ansys/dpf/core/core.py +++ b/src/ansys/dpf/core/core.py @@ -427,6 +427,7 @@ def load_library(self, file_path, name="", symbol="LoadOperators", generate_oper ) if generate_operators: # TODO: fix code generation upload posix + # https://github.com/ansys/pydpf-core/pull/297, todo was added in this PR def __generate_code(TARGET_PATH, filename, name, symbol): from ansys.dpf.core.dpf_operator import Operator diff --git a/src/ansys/dpf/core/fields_container.py b/src/ansys/dpf/core/fields_container.py index 39307c00d18..dd3e8efd3f9 100644 --- a/src/ansys/dpf/core/fields_container.py +++ b/src/ansys/dpf/core/fields_container.py @@ -584,7 +584,8 @@ def animate(self, save_as=None, deform_by=None, scale_factor=1.0, **kwargs): if frequencies is None: raise ValueError("The fields_container has no time_frequencies.") - # TODO /!\ We should be using a mechanical::time_selector, however it is not wrapped. + # TODO: /!\ We should be using a mechanical::time_selector, however it is not wrapped. + # https://github.com/ansys/pydpf-core/pull/432, todo was added in this PR wf.set_input_name("indices", extract_field_op.inputs.indices) # Have to do it this way wf.connect("indices", forward_index) # Otherwise not accepted diff --git a/src/ansys/dpf/core/help.py b/src/ansys/dpf/core/help.py index ff55dfcfd95..576c3bdbfc8 100644 --- a/src/ansys/dpf/core/help.py +++ b/src/ansys/dpf/core/help.py @@ -40,6 +40,9 @@ def _check_type(instance, allowable_type): # TODO: deprecate this file +# https://github.com/ansys/pydpf-core/pull/35, todo was added in this PR + + def sum(var_inp): """Sum all elementary data of a field to get one elementary data. @@ -228,6 +231,9 @@ def eqv(var_inp): # TODO: Consider combining eqv and eqv_fc +# https://github.com/ansys/pydpf-core/pull/35, todo was added in this PR + + def _eqv(field): """Retrieve the von Mises stress field. diff --git a/src/ansys/dpf/core/server_types.py b/src/ansys/dpf/core/server_types.py index f2a5c0b3137..6b8a30ad360 100644 --- a/src/ansys/dpf/core/server_types.py +++ b/src/ansys/dpf/core/server_types.py @@ -416,6 +416,7 @@ class BaseServer(abc.ABC): def __init__(self): """Define the base class for all server types, including grpc, in-process, and others.""" # TODO: Use _server_id to compare servers for equality? + # https://github.com/ansys/pydpf-core/pull/297, todo was added in this PR self._server_id = None self._session_instance = None self._base_service_instance = None diff --git a/tests/test_operator.py b/tests/test_operator.py index 64294c37e79..dfd9c866e13 100644 --- a/tests/test_operator.py +++ b/tests/test_operator.py @@ -509,7 +509,7 @@ def test_subresults_operator(cyclic_lin_rst, cyclic_ds): # model = dpf.core.Model(cyclic_lin_rst) # model.add_file_path(cyclic_ds) -# # TODO: this should be available from model's available_results +# # TODO: this should be available from model's available_results # noqa: TD003 # op = model.operator("mapdl::rst::U") # op.inputs.connect(model._data_sources) # op.inputs.bool_ignore_cyclic.connect(True) From 21e3e0f502371164bb918f3fc30337df0000c520 Mon Sep 17 00:00:00 2001 From: moe-ad Date: Thu, 2 Jan 2025 13:43:18 +0100 Subject: [PATCH 2/2] doc: changed to a central issue link --- src/ansys/dpf/core/core.py | 2 +- src/ansys/dpf/core/fields_container.py | 2 +- src/ansys/dpf/core/help.py | 4 ++-- src/ansys/dpf/core/server_types.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ansys/dpf/core/core.py b/src/ansys/dpf/core/core.py index 33e7a3435f5..20d3c2173e8 100644 --- a/src/ansys/dpf/core/core.py +++ b/src/ansys/dpf/core/core.py @@ -427,7 +427,7 @@ def load_library(self, file_path, name="", symbol="LoadOperators", generate_oper ) if generate_operators: # TODO: fix code generation upload posix - # https://github.com/ansys/pydpf-core/pull/297, todo was added in this PR + # https://github.com/ansys/pydpf-core/issues/1984, todo was added in this PR def __generate_code(TARGET_PATH, filename, name, symbol): from ansys.dpf.core.dpf_operator import Operator diff --git a/src/ansys/dpf/core/fields_container.py b/src/ansys/dpf/core/fields_container.py index dd3e8efd3f9..fdb755036ad 100644 --- a/src/ansys/dpf/core/fields_container.py +++ b/src/ansys/dpf/core/fields_container.py @@ -585,7 +585,7 @@ def animate(self, save_as=None, deform_by=None, scale_factor=1.0, **kwargs): raise ValueError("The fields_container has no time_frequencies.") # TODO: /!\ We should be using a mechanical::time_selector, however it is not wrapped. - # https://github.com/ansys/pydpf-core/pull/432, todo was added in this PR + # https://github.com/ansys/pydpf-core/issues/1984, todo was added in this PR wf.set_input_name("indices", extract_field_op.inputs.indices) # Have to do it this way wf.connect("indices", forward_index) # Otherwise not accepted diff --git a/src/ansys/dpf/core/help.py b/src/ansys/dpf/core/help.py index 576c3bdbfc8..8fe723d6f07 100644 --- a/src/ansys/dpf/core/help.py +++ b/src/ansys/dpf/core/help.py @@ -40,7 +40,7 @@ def _check_type(instance, allowable_type): # TODO: deprecate this file -# https://github.com/ansys/pydpf-core/pull/35, todo was added in this PR +# https://github.com/ansys/pydpf-core/issues/1984, todo was added in this PR def sum(var_inp): @@ -231,7 +231,7 @@ def eqv(var_inp): # TODO: Consider combining eqv and eqv_fc -# https://github.com/ansys/pydpf-core/pull/35, todo was added in this PR +# https://github.com/ansys/pydpf-core/issues/1984, todo was added in this PR def _eqv(field): diff --git a/src/ansys/dpf/core/server_types.py b/src/ansys/dpf/core/server_types.py index 6b8a30ad360..63502e9206b 100644 --- a/src/ansys/dpf/core/server_types.py +++ b/src/ansys/dpf/core/server_types.py @@ -416,7 +416,7 @@ class BaseServer(abc.ABC): def __init__(self): """Define the base class for all server types, including grpc, in-process, and others.""" # TODO: Use _server_id to compare servers for equality? - # https://github.com/ansys/pydpf-core/pull/297, todo was added in this PR + # https://github.com/ansys/pydpf-core/issues/1984, todo was added in this PR self._server_id = None self._session_instance = None self._base_service_instance = None