GCI35 : Check an existing rule in Credengo Python that had been implemented but not previously validated. - #456
GCI35 : Check an existing rule in Credengo Python that had been implemented but not previously validated.#456aaudric wants to merge 2 commits into
Conversation
…ut not previously validated.
|
@aaudric : Could you update the |
|
@MP-Aubay : It's done |
There was a problem hiding this comment.
Pull request overview
This PR updates the Python specification for rule GCI35 to include a concrete “experimental verification” section intended to validate the rule’s impact (runtime and CO₂ emissions), and records the change in the project changelog.
Changes:
- Updated the non-compliant/compliant code examples to use
with open(...)and anos.path.isfile(...)guard. - Added an “Experimental Verification” section with benchmark code, reported results, and plots.
- Added a corresponding entry to
CHANGELOG.md.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/main/rules/GCI35/python/GCI35.asciidoc |
Expands the rule documentation with updated examples plus benchmarking/verification content and plots. |
CHANGELOG.md |
Adds an entry documenting the GCI35 documentation/validation update. |
Comments suppressed due to low confidence (6)
src/main/rules/GCI35/python/GCI35.asciidoc:50
- Grammar in this comment is incorrect ("function who use", "no compliant_solution"). This is user-facing documentation; please correct the wording.
#function who use the no compliant_solution
src/main/rules/GCI35/python/GCI35.asciidoc:64
- Grammar in this comment is incorrect ("function who use"). Please correct the wording for readability.
#function who use the compliant solution
src/main/rules/GCI35/python/GCI35.asciidoc:146
- There are multiple spelling/wording issues in this plot section ("en kg", and inconsistent CO₂/CO2). Adjusting the axis label improves clarity.
plt.xlabel("Iterations")
plt.ylabel("CO2 emissions en kg")
plt.legend()
src/main/rules/GCI35/python/GCI35.asciidoc:151
- Spelling in the image caption/alt text is incorrect ("splutions", "for the both"). Please correct it for readability and professionalism.
image::../python/comparison_plots.png[Metrics for the both splutions]
src/main/rules/GCI35/python/GCI35.asciidoc:104
- The “Initial Results” text contains spelling issues ("Emisssion") and inconsistent phrasing. Since these values are presented as a reference, fix the wording for clarity.
Emisssion no compliant solution : 2.76e-05
Time for no compliant solution : 39.21
Emisssion compliant solution : 1.86e-05
Time for compliant solution : 26.35
src/main/rules/GCI35/python/GCI35.asciidoc:46
- Section title uses inconsistent spelling (“Non compliant”). Elsewhere in the document you use “Compliant”; for consistency and standard English usage, prefer “Non-compliant”.
=== Non compliant Implementation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import os | ||
| import time | ||
|
|
||
| path = ('text.txt') # the famous file not founded |
| * lower execution time | ||
| * lower CO₂ emissions | ||
| * reduced unnecessary resource consumption |
|
Hi @aaudric , |
| import os | ||
| import time | ||
|
|
||
| path = ('text.txt') # the famous file not founded |
| * lower execution time | ||
| * lower CO₂ emissions | ||
| * reduced unnecessary resource consumption |
| ### Added | ||
|
|
||
| - [#438](https://github.com/green-code-initiative/creedengo-rules-specifications/pull/438) Add rule GCI113 (Python): AI - Prefer XGBoost to RandomForest | ||
| - [#456](https://github.com/green-code-initiative/creedengo-rules-specifications/pull/456) Adding a check to a rule already implemented in Python |
There was a problem hiding this comment.
please add the number of the rule
|
This PR has been automatically marked as stale because it has no activity for 60 days. |
No description provided.