Skip to content

GCI35 : Check an existing rule in Credengo Python that had been implemented but not previously validated. - #456

Open
aaudric wants to merge 2 commits into
green-code-initiative:mainfrom
aaudric:main
Open

GCI35 : Check an existing rule in Credengo Python that had been implemented but not previously validated.#456
aaudric wants to merge 2 commits into
green-code-initiative:mainfrom
aaudric:main

Conversation

@aaudric

@aaudric aaudric commented May 20, 2026

Copy link
Copy Markdown

No description provided.

@MP-Aubay

Copy link
Copy Markdown
Contributor

@aaudric : Could you update the CHANGELOG.md ?

@MP-Aubay MP-Aubay moved this from Backlog to Ready To Review in Hackathon Kanban - RULES-SPECIFICATIONS May 20, 2026
@MP-Aubay MP-Aubay added 🗃️ rule rule improvment or rule development or bug python labels May 20, 2026
@aaudric

aaudric commented May 20, 2026

Copy link
Copy Markdown
Author

@MP-Aubay : It's done

@dedece35
dedece35 requested a review from Copilot May 21, 2026 21:04
@dedece35 dedece35 added 🗒️ documentation Improvements or additions to documentation 🔥 in progress 🔥 labels May 21, 2026
@dedece35 dedece35 moved this from Ready To Review to Review in progress in Hackathon Kanban - RULES-SPECIFICATIONS May 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 an os.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.

Comment thread src/main/rules/GCI35/python/GCI35.asciidoc
Comment thread src/main/rules/GCI35/python/GCI35.asciidoc
Comment thread src/main/rules/GCI35/python/GCI35.asciidoc
import os
import time

path = ('text.txt') # the famous file not founded

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@aaudric please, take into account copilot feedback

Comment on lines +108 to +110
* lower execution time
* lower CO₂ emissions
* reduced unnecessary resource consumption

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@aaudric please, take into account copilot feedback

@dedece35

Copy link
Copy Markdown
Member

Hi @aaudric ,
please take into account COpilot feedbacks. I'm agree with them.

@dedece35 dedece35 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

COpilot Feedbacks

import os
import time

path = ('text.txt') # the famous file not founded

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@aaudric please, take into account copilot feedback

Comment on lines +108 to +110
* lower execution time
* lower CO₂ emissions
* reduced unnecessary resource consumption

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@aaudric please, take into account copilot feedback

Comment thread CHANGELOG.md
### 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

please add the number of the rule

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has no activity for 60 days.
Please add a comment if you want to keep the issue open. Thank you for your contributions!

@github-actions github-actions Bot added the stale label Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗃️ rule rule improvment or rule development or bug 🔥 in progress 🔥 python 🗒️ documentation Improvements or additions to documentation stale 👀 👀 waiting commiter 👀 👀

Projects

Status: Review in progress

Development

Successfully merging this pull request may close these issues.

4 participants