Access to inactive objects
- Dominant language
- Python
- Stars
- 497
- Forks
- 77
- Avg merge
- 22h 37m
- Merged PRs (30d)
- 45
Description
Children of inactive objects in the API hierarchy cannot be aliased without triggering an `InactiveObjectError`. E.g.:
```Python
>>> viscous = solver.settings.setup.models.viscous
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\spearson\AppData\Local\Temp\tmphjkcu785\ansys\fluent\core\solver\flobject.py", line 1047, in __getattribute__
raise InactiveObjectError(self.python_path)
ansys.fluent.core.solver.flobject.InactiveObjectError: '.setup.models' is currently inactive.
```
This is unnecessarily restrictive.
Contributor guide
Research direction
Start at ansys/fluent/core/solver/flobject.py around line 1047 and trace how attribute access checks inactive objects and handles aliases. Reproduce the example with an inactive parent, then define and test the expected behavior so child aliasing no longer raises InactiveObjectError while inactive-object access remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100