Skip to content

Cycle 8: CI Stabilization and Dependency Improvements - #206

Draft
NITISH-R-G wants to merge 1 commit into
mainfrom
chore/cycle-8-ci-and-deps-643167812270706846
Draft

Cycle 8: CI Stabilization and Dependency Improvements#206
NITISH-R-G wants to merge 1 commit into
mainfrom
chore/cycle-8-ci-and-deps-643167812270706846

Conversation

@NITISH-R-G

@NITISH-R-G NITISH-R-G commented Aug 24, 2026

Copy link
Copy Markdown
Owner

This cycle focused on ensuring the stability of the CI pipeline and improving the developer experience.

It accomplishes this by pinning the version of jscpd to 4.0.0 and ignoring build artifacts, which were causing CI failures. To improve local checks and avoid issues for new developers, required tools like mypy, bandit, openenv-core, and vulture were added as explicit dev dependencies in pyproject.toml.

Additionally, .mypy_cache/ and .ruff_cache/ were added to .gitignore to prevent cache bloat in the repository.

Strict ruff linting rules were implemented in .ruff.toml and tech debt across the codebase was automatically resolved. Lastly, the CI pipeline was updated to include automated security auditing with bandit and environment validation with openenv-core, as documented and justified in CYCLE_8_REPORT.md.


PR created automatically by Jules for task 643167812270706846 started by @NITISH-R-G

Summary by Sourcery

Stabilize repository quality checks and improve local development validation through pinned CI tooling, stronger linting, and explicit development dependencies.

Enhancements:

  • Enforce broader Ruff linting rules and clean up codebase technical debt, including modernized type annotations and import/style improvements.
  • Add explicit development dependencies for local static analysis and environment validation tools.

CI:

  • Stabilize code-quality checks by pinning jscpd to version 4.0.0 and excluding generated build artifacts from duplicate-code analysis.
  • Add Bandit security scanning and OpenEnv environment validation to the CI pipeline.

Documentation:

  • Add a Cycle 8 report documenting repository health findings and the CI and developer-experience improvements.

Chores:

  • Ignore mypy and Ruff cache directories to keep generated files out of the repository.

- Pinned jscpd to v4.0.0 and ignored build artifacts in code quality workflow to prevent false positives.
- Added `bandit` for SAST and `openenv-core` for environment validation to CI.
- Added `mypy`, `bandit`, `openenv-core`, and `vulture` to explicit `dev` dependencies in pyproject.toml.
- Configured explicit `.mypy_cache/` and `.ruff_cache/` exclusions in .gitignore.
- Enabled strict `ruff` linting categories and auto-fixed all resulting violations across codebase.
- Documented these changes in CYCLE_8_REPORT.md.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR stabilizes the CI/code-quality pipeline and improves local developer ergonomics by pinning/ignoring noisy tooling inputs, tightening Ruff configuration, adding dev-only dependencies, and applying automated lint fixes across the EV grid codebase, server, tools, viz, and training scripts.

Flow diagram for local developer validation setup

flowchart TD
    Checkout[Developer checkout]
    Install["Install dev dependencies"]
    Checks["Run local quality checks"]
    CI["CI uses the same validation tools"]
    Clean["Caches and build artifacts remain untracked"]

    Checkout --> Install
    Install --> Checks
    Checks --> CI
    Checkout --> Clean
Loading

File-Level Changes

Change Details Files
CI workflow now includes security and environment validation and has a pinned jscpd version that ignores build artifacts.
  • Add Bandit SAST step running python -m bandit -r . -c pyproject.toml in code-quality workflow.
  • Add OpenEnv validation step using openenv validate "$GITHUB_WORKSPACE" in code-quality workflow.
  • Pin jscpd installation to version 4.0.0 via npm.
  • Extend jscpd ignore patterns to exclude dist/ and build/ artifacts in duplicate-code checks.
.github/workflows/code-quality.yml
Repository configuration is hardened for dev experience and cleanliness, with explicit dev dependencies and expanded gitignore/cache handling.
  • Add mypy, bandit, openenv-core, and vulture to [project.optional-dependencies].dev in pyproject.
  • Ignore .mypy_cache/ and .ruff_cache/ in .gitignore to avoid committing caches.
  • Document motivations, risks, and roadmap for these changes in CYCLE_8_REPORT.md.
pyproject.toml
.gitignore
CYCLE_8_REPORT.md
Ruff configuration is made stricter and tuned, and the codebase is auto-fixed to comply (imports, typing style, minor logic/style cleanups).
  • Configure Ruff select to enable a wide set of rule families (UP, B, C4, SIM, PLC, I, BLE, TRY, RUF, FURB, PIE, EXE, PLR).
  • Expand Ruff ignore list to carve out specific rules that are noisy or not yet enforced.
  • Apply Ruff-driven cleanups: reorder imports, remove unused imports, and simplify small logic blocks across EV oracle, server, tools, viz, training.
  • Switch from typing.Optional[...] to `
Noneunion types in multiple functions and models.</li><li>Tighten dict initialization patterns and for-loops (e.g., usedict.fromkeys, iterate directly over dicts instead of .keys()`).

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

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.

1 participant