ansys / ansys/pyfluent

Codegen refactor required

Open
#3,887 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
497
Forks
77
Avg merge
22h 37m
Merged PRs (30d)
45

Description

1. Adding a new datamodel API to the codegen code requires specifying it in approximately five locations. We could define these specifications once in a declarative format along with metadata. This data could then be processed in multiple places.
2. There is a significant amount of boilerplate code in codegen. This boilerplate code can be significantly reduced.
3. I temporarily altered the top-level codegen script to generate code for a specific API. The script should be configurable via command-line arguments instead.

This refactoring will improve the maintainability, readability, and extensibility of the codegen mechanism, and it will also reduce the amount of code needed to add new datamodel APIs.

Contributor guide

Open the contributing guide

Research direction

Start by locating the top-level codegen script and the approximately five locations where datamodel APIs are specified. Map the existing boilerplate and the temporary API-specific generation path before proposing a declarative format and command-line configuration. Done means API metadata has one source, boilerplate is reduced, and the generator supports selecting an API through command-line arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.