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

Research single file generation for settings API #3045

Closed
mkundu1 opened this issue Jul 10, 2024 · 2 comments · Fixed by #3378
Closed

Research single file generation for settings API #3045

mkundu1 opened this issue Jul 10, 2024 · 2 comments · Fixed by #3378
Assignees
Labels
enhancement New feature or request. Feature work invariably requires testing-team involvement

Comments

@mkundu1
Copy link
Contributor

mkundu1 commented Jul 10, 2024

We shall need this to reduce number of files from the package.

@mkundu1 mkundu1 added the console integration Needed for PyFluent integratrion in console label Jul 10, 2024
@hpohekar
Copy link
Collaborator

hpohekar commented Jul 11, 2024

@mkundu1

This idea looks good to me.

I would like to discuss how following scenarios are handled currently. How settings are able to identify arguments with same name from their specific file ? How following cases will be handled using a single file. Thank you.

  1. a_1.py, a_2.py and a_3.py contain exact same class.

  2. If we see file_name.py and file_name_*.py then we have following variations.

class file_name(String):

class file_name(Filename, _OutputFile):

class file_name_1(Filename, _InputFile):

@mkundu1 mkundu1 added enhancement New feature or request. Feature work invariably requires testing-team involvement and removed console integration Needed for PyFluent integratrion in console labels Jul 11, 2024
@hpohekar hpohekar self-assigned this Jul 12, 2024
@hpohekar
Copy link
Collaborator

@seanpearsonuk @mkundu1

Findings are as follows:

  1. The file size is still huge even after separating the class definitions into other file. If we write only class names in a nested structure then it's 32 MB and at this point we have not written attributes of each class and considering that addition the file size will be too higher than 32 MB per Fluent version.

  2. We have classes with same name but with different parents. We have handled this issue but even if we separate class definitions then main challenge is to import all classes with same name.

  3. Another challenge is that few classes have same name, parents but different docstrings. Same import challenge here as mentioned above.

Insights from all discussions are as follows:

  1. The main objective of separating single file into multiple was it's size.

  2. There is not any performance issue while using single vs multiple settings files.

Suggestions to handle this challenge:

  1. Use single settings file for all releases.
    e.g. We can check whether settings_222.py exists, if not we can generate this for the first time and use it without need of generating it for every launch of Fluent. I think the hash mismatch issue will be not there as we are going to use same Fluent to generate this single file.

  2. Use single settings file for older releases only but use settings zip for the latest Fluent release.

@mkundu1 mkundu1 self-assigned this Oct 11, 2024
@mkundu1 mkundu1 linked a pull request Oct 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request. Feature work invariably requires testing-team involvement
Projects
None yet
2 participants