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

Update the operators for 2023.2.pre0 #644

Merged
merged 11 commits into from
Nov 25, 2022
Merged

Conversation

PProfizi
Copy link
Contributor

@PProfizi PProfizi commented Nov 24, 2022

Use of .ci/code_generation.py to generate the python code for operators contained in DPF Server 2023.2.pre0

  • Check the server used to generate the operators is the latest release candidate
  • Check the list of plugins included in the list to generate operators for in code_generation.py
  • Check the list of operators, especially those which might have been suppressed

Signed-off-by: paul.profizi <paul.profizi@ansys.com>
…rver - Customer Portal-20221123.1

Signed-off-by: paul.profizi <paul.profizi@ansys.com>
@PProfizi PProfizi self-assigned this Nov 24, 2022
@PProfizi PProfizi added the maintenance Repository structure maintenance label Nov 24, 2022
@PProfizi PProfizi added this to the v0.7.0 milestone Nov 24, 2022
@PProfizi
Copy link
Contributor Author

PProfizi commented Nov 24, 2022

@cbellot000 @anslpa @rafacanton @rlagha the issue here seems to be that (as discussed briefly with Rafael) the init methods of the result operators have been reworked and do not include all the possible inputs as was the case before.
Thus, asking for dpf.operators.result.displacement(mesh=mesh) does for example not work, just like dpf.operators.result.stress_von_mises(requested_location="Nodal") and many others.
What is the new strategy here? What is the new best practice? Do we go back to using op.connect() for any pin not in the default operator constructor?
For reference, constructors of the result operators now all look like this:
__init__(self, time_scoping=None, mesh_scoping=None, data_sources=None, config=None, server=None)

@rafacanton
Copy link
Contributor

@PProfizi, @cbellot000, @anslpa I guess that we don't have any other option than connecting thorugh the connect method. Personally, I don't dislike it. It makes more explicit the concept of operator with input pins and how can Dpf be used to build workflows

@PProfizi PProfizi linked an issue Nov 25, 2022 that may be closed by this pull request
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
@@ -58,17 +61,22 @@
os.remove(f)
except:
pass
core.start_local_server(config=core.AvailableServerConfigs.LegacyGrpcServer)
core.start_local_server(config=core.AvailableServerConfigs.GrpcServer)
code_gen = core.Operator("python_generator")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only work for PREMIUM. Should we explicitly add it as context?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafacanton, sure, we can add it explicitely at the beginning of the script.
Also, sorry about the confusion Rafael, the problems with the constructors of the operators is that there is a second step in the operator generation, which I now added to the script.

Signed-off-by: paul.profizi <paul.profizi@ansys.com>
@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Merging #644 (53545b6) into master (9b842f4) will decrease coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #644      +/-   ##
==========================================
- Coverage   88.14%   88.05%   -0.10%     
==========================================
  Files          69       69              
  Lines        7750     7750              
==========================================
- Hits         6831     6824       -7     
- Misses        919      926       +7     

Signed-off-by: paul.profizi <paul.profizi@ansys.com>
…e to 221)

Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
@PProfizi PProfizi merged commit b4bdc2f into master Nov 25, 2022
@PProfizi PProfizi deleted the maint/update_operators_23.2.pre0 branch November 25, 2022 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Repository structure maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regenerate operators before 231 release
3 participants