Skip to content

Conversation

hpohekar
Copy link
Collaborator

@hpohekar hpohekar commented Aug 4, 2025

This pull request focuses on improving maintainability by extracting and explicitly defining allowed values for settings classes. The main change ensures that allowed values are clearly listed and type-annotated, which will help with code clarity and future maintenance.

Settings class allowed values extraction:

  • Added the _allowed_values attribute to settings classes in both implementation and stub files, making allowed values explicit and type-annotated (src/ansys/fluent/core/codegen/settingsgen.py).
  • Documented the extraction of allowed values in the changelog (doc/changelog.d/4342.maintenance.md).

@github-actions github-actions bot added the enhancement Improve any current implemented feature label Aug 4, 2025
@hpohekar hpohekar linked an issue Aug 4, 2025 that may be closed by this pull request
@seanpearsonuk
Copy link
Collaborator

@hpohekar Please can we have description text: images won't play well in the logs.

@hpohekar
Copy link
Collaborator Author

hpohekar commented Aug 6, 2025

@hpohekar Please can we have description text: images won't play well in the logs.

@seanpearsonuk Done. Thank you.

@prmukherj
Copy link
Collaborator

@hpohekar, for these things we can add a small test in test_codegen?

@hpohekar
Copy link
Collaborator Author

hpohekar commented Aug 6, 2025

@hpohekar, for these things we can add a small test in test_codegen?

@prmukherj Yes, we can. Will add one.

@hpohekar hpohekar enabled auto-merge (squash) August 6, 2025 09:59
@hpohekar
Copy link
Collaborator Author

hpohekar commented Aug 6, 2025

We need to wait for some more time as Fluent side changes are not available in the latest Fluent image. (Tests are failing due to this).

@hpohekar hpohekar disabled auto-merge August 19, 2025 11:32
@hpohekar hpohekar enabled auto-merge (squash) August 26, 2025 15:33
@hpohekar hpohekar merged commit ede4b3c into main Aug 26, 2025
59 of 60 checks passed
@hpohekar hpohekar deleted the chore/extract_allowed_values branch August 26, 2025 15:58
hpohekar added a commit that referenced this pull request Sep 2, 2025
This pull request focuses on improving maintainability by extracting and
explicitly defining allowed values for settings classes. The main change
ensures that allowed values are clearly listed and type-annotated, which
will help with code clarity and future maintenance.

Settings class allowed values extraction:

* Added the `_allowed_values` attribute to settings classes in both
implementation and stub files, making allowed values explicit and
type-annotated (`src/ansys/fluent/core/codegen/settingsgen.py`).
* Documented the extraction of allowed values in the changelog
(`doc/changelog.d/4342.maintenance.md`).

---------

Co-authored-by: pyansys-ci-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve any current implemented feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract allowed values in settings_*.py
5 participants