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

Enable automatic update of operators #699

Merged
merged 32 commits into from
Jan 9, 2023
Merged

Conversation

PProfizi
Copy link
Contributor

@PProfizi PProfizi commented Dec 16, 2022

This PR adds a workflow to be triggered manually or by the dpf-standalone repository, which automatically regenerates the operators' Python code using the DPF Server in question, and creates a PR on pydpf-core with the new operators.
This goes one step towards having an automatic update of operators on update of the development server.

Further required steps:

  • trigger the generation of the Premium and Entry static operator documentations (docs/source/_static/dpf_entry.html and docs/source/_static/dpf_premium.html) and commit that to the same PR as the operators (see .ci/operator_doc_per_context.py)

/!\ The internal name for the pressure operator, used during operator generation, is capitalized server-side. However, the doc generation operator seems to use the scripting name, which is lower-case. These will need to be made coherent. Until this is solved, one of these steps will always fail.
Python classes generated for operators should be named after the scripting name (here pressure) which is the case in master. The init should then import pressure, and the operator code generation process is wrong if it generates a Pressureoperator.
-> the operator cgns::cgns::Pressure is ignored during operators build, a bug has been raised server-side.

Once merged: trigger the update_operators workflow from the server's pipelines

This PR will fix #720.

@PProfizi PProfizi added the CI/CD Related to CI/CD label Dec 16, 2022
@PProfizi PProfizi self-assigned this Dec 16, 2022
@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Merging #699 (79a7854) into master (1bc0fea) will decrease coverage by 0.15%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #699      +/-   ##
==========================================
- Coverage   88.60%   88.44%   -0.16%     
==========================================
  Files          71       71              
  Lines        8081     8091      +10     
==========================================
- Hits         7160     7156       -4     
- Misses        921      935      +14     

…erator is capitalized server-side. However, the doc generation operator seems to use tje scripting name, which is not. These will need to be made coherent.
…ssure operator is capitalized server-side. However, the doc generation operator seems to use tje scripting name, which is not. These will need to be made coherent."

This reverts commit f57df63.
@PProfizi
Copy link
Contributor Author

PProfizi commented Jan 9, 2023

@cbellot000 this PR is ready for merging, it contains:

  • the callable workflow enabling automatic creation of a PR on pydpf-core with updated operators and static doc. We will be able to call for an update manually when required.
  • the resulting updated operators and affiliated doc from such a PR made onto this branch.

The next step is to call this workflow when the server is updated, so that updating the server automatically proposes the corresponding update of the python code for the operators.

The code quality is screaming due to the operators and the code_generation.py script but is not a problem.

@PProfizi PProfizi merged commit dabc865 into master Jan 9, 2023
@PProfizi PProfizi deleted the maint/fix_src_code_generation branch January 9, 2023 14:33
@PProfizi PProfizi restored the maint/fix_src_code_generation branch January 16, 2023 08:34
@PProfizi PProfizi deleted the maint/fix_src_code_generation branch October 28, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Related to CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug when using mesh_cut operator
2 participants