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

Doc: flake8 todos #1981

Merged
merged 3 commits into from
Jan 2, 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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/ansys/dpf/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/issues/1984, todo was added in this PR

def __generate_code(TARGET_PATH, filename, name, symbol):
from ansys.dpf.core.dpf_operator import Operator
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/dpf/core/fields_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/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
Expand Down
6 changes: 6 additions & 0 deletions src/ansys/dpf/core/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def _check_type(instance, allowable_type):


# TODO: deprecate this file
# https://github.com/ansys/pydpf-core/issues/1984, todo was added in this PR


def sum(var_inp):
"""Sum all elementary data of a field to get one elementary data.

Expand Down Expand Up @@ -228,6 +231,9 @@ def eqv(var_inp):


# TODO: Consider combining eqv and eqv_fc
# https://github.com/ansys/pydpf-core/issues/1984, todo was added in this PR


def _eqv(field):
"""Retrieve the von Mises stress field.

Expand Down
1 change: 1 addition & 0 deletions src/ansys/dpf/core/server_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/issues/1984, todo was added in this PR
self._server_id = None
self._session_instance = None
self._base_service_instance = None
Expand Down
2 changes: 1 addition & 1 deletion tests/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading