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

[Feature] Check generated code #658

Merged
merged 13 commits into from
Jul 2, 2024
Merged

Conversation

figueroa1395
Copy link
Contributor

Closes #527

Signed-off-by: Santiago Figueroa <[email protected]>
Signed-off-by: Santiago Figueroa <[email protected]>
Signed-off-by: Santiago Figueroa <[email protected]>
@figueroa1395 figueroa1395 marked this pull request as ready for review July 1, 2024 15:31
Copy link
Member

@mgovers mgovers left a comment

Choose a reason for hiding this comment

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

awaiting decision on the remaining comments. the rest LGTM

.github/workflows/check-generated-code.yml Outdated Show resolved Hide resolved
.github/workflows/check-generated-code.yml Outdated Show resolved Hide resolved
@mgovers
Copy link
Member

mgovers commented Jul 2, 2024

tip: try to change something and reproduce that the action indeed works as intended:

  • change something in the generated files
  • change something in the templates
  • change something in the code generator
  • change something in the pyproject.toml

Signed-off-by: Santiago Figueroa <[email protected]>
Copy link
Member

@mgovers mgovers left a comment

Choose a reason for hiding this comment

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

LGTM. can you now do some commits to prove that indeed it works as intended? (e.g.:

  • not run on formatting issues
  • run and failing on changed template
  • run and failing on change in generated file
  • run and failing on change in code generator
  • run and passing on all up to date (this should be the last commit to ensure the previous ones are all reset)

.github/workflows/check-code-quality.yml Outdated Show resolved Hide resolved
@mgovers
Copy link
Member

mgovers commented Jul 2, 2024

maybe add an additional message, e.g.:

 Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/output.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/input.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/update.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_gen/output.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_gen/input.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_gen/update.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/static_asserts/output.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/static_asserts/input.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/static_asserts/update.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/src/power_grid_model/core/dataset_definitions.py
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model_c/src/dataset_definitions.cpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model_c/include/power_grid_model_c/dataset_definitions.h
The following files are outdated or were manually updated:
 M src/power_grid_model/core/dataset_definitions.py
Error: Process completed with exit code 1.

into

 Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/output.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/input.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/update.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_gen/output.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_gen/input.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_gen/update.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/static_asserts/output.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/static_asserts/input.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/static_asserts/update.hpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/src/power_grid_model/core/dataset_definitions.py
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model_c/src/dataset_definitions.cpp
Generating file: /home/runner/work/power-grid-model/power-grid-model/power_grid_model_c/power_grid_model_c/include/power_grid_model_c/dataset_definitions.h

Error: The following files are outdated or were manually updated:
 M src/power_grid_model/core/dataset_definitions.py
Error: Process completed with exit code 1.

mgovers
mgovers previously approved these changes Jul 2, 2024
.github/workflows/check-code-quality.yml Show resolved Hide resolved
Signed-off-by: Santiago Figueroa <[email protected]>
@figueroa1395 figueroa1395 enabled auto-merge July 2, 2024 13:02
Copy link

sonarqubecloud bot commented Jul 2, 2024

@figueroa1395 figueroa1395 added this pull request to the merge queue Jul 2, 2024
Merged via the queue into main with commit 7679ffb Jul 2, 2024
26 checks passed
@figueroa1395 figueroa1395 deleted the feature/check_generated_code branch July 2, 2024 14:22
@mgovers mgovers mentioned this pull request Nov 5, 2024
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Action to check that the generated code is up to date
2 participants