Skip to content

Conversation

@Pouyanpi
Copy link
Collaborator

Description

  • Migrate from Poetry 1.8.2 to Poetry 2.2.1
  • Convert pyproject.toml from Poetry-specific format to PEP 621 standard
  • Update CI workflows, Dockerfiles, and documentation to use Poetry 2.x
  • Simplify Dockerfile install commands
  • Regenerate poetry.lock with Poetry 2.2.1

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 28, 2025

Greptile Overview

Greptile Summary

Successfully migrated from Poetry 1.8.2 to Poetry 2.2.1 with PEP 621-compliant pyproject.toml structure. All critical issues from previous review have been addressed:

  • Migration Complete: Project metadata moved from [tool.poetry] to [project] section following PEP 621 standard
  • All Previous Issues Resolved:
    • all extras properly defined in [project.optional-dependencies] with full dependency versions
    • packages field present in [tool.poetry] section
    • protobuf>=5.29.5 retained in main dependencies for CVE-2024-7254 protection
  • CI/CD Updated: All workflow files (GitHub Actions and GitLab CI) updated to Poetry 2.2.1
  • Dockerfiles Simplified: Removed redundant install commands, combining --all-extras and --with dev in single command
  • Documentation Updated: CONTRIBUTING.md and docs/conf.py updated for Poetry 2.x compatibility
  • Lock File Regenerated: poetry.lock regenerated with Poetry 2.2.1

The migration is comprehensive and maintains backward compatibility through proper extras definitions.

Confidence Score: 5/5

  • This PR is safe to merge - comprehensive Poetry 2.x migration with all critical issues from previous review addressed
  • Score reflects thorough migration approach: all previous critical issues (missing all extras, missing packages field, security-critical protobuf dependency) have been properly addressed, all CI/CD pipelines updated consistently, Dockerfiles simplified correctly, and documentation updated appropriately
  • No files require special attention - all changes are consistent and properly implemented

Important Files Changed

File Analysis

Filename Score Overview
pyproject.toml 5/5 Successfully migrated from Poetry 1.x to PEP 621 standard format with all previous issues addressed (all extras defined, packages field present, protobuf in main dependencies)
CONTRIBUTING.md 5/5 Updated documentation to reflect Poetry version requirement from >=1.8,<2.0 to >=2.0,<3.0
Dockerfile 5/5 Updated POETRY_VERSION to 2.2.1, simplified install commands by combining --all-extras and --with dev, removed redundant install step
docs/conf.py 5/5 Updated version extraction to read from [project].version instead of [tool.poetry].version
qa/Dockerfile.qa 5/5 Updated POETRY_VERSION to 2.2.1, simplified install commands, removed redundant install step

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Repo as Repository
    participant Poetry as Poetry 2.2.1
    participant CI as CI/CD Pipelines
    participant Docs as Documentation
    participant Docker as Docker Images

    Dev->>Repo: Update pyproject.toml
    Note over Repo: Migrate from [tool.poetry]<br/>to [project] (PEP 621)
    
    Dev->>Poetry: Regenerate poetry.lock
    Poetry->>Repo: Generate lock file<br/>with Poetry 2.2.1
    
    Dev->>CI: Update workflow files
    Note over CI: Set POETRY_VERSION=2.2.1<br/>in all workflows
    
    Dev->>Docker: Update Dockerfiles
    Note over Docker: ENV POETRY_VERSION=2.2.1<br/>Simplify install commands
    
    Dev->>Docs: Update docs/conf.py
    Note over Docs: Read version from<br/>[project].version
    
    Dev->>Docs: Update CONTRIBUTING.md
    Note over Docs: Require Poetry >=2.0,<3.0
    
    CI->>Poetry: Install Poetry 2.2.1
    Poetry->>CI: Ready for build/test
    
    Docker->>Poetry: Install dependencies
    Poetry->>Docker: Install with --all-extras
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (1)

  1. .gitlab-ci.yml, line 42 (link)

    syntax: Using --extras all but the all extras no longer exists in pyproject.toml. This will cause CI to fail.

10 files reviewed, 7 comments

Edit Code Review Agent Settings | Greptile

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Pouyanpi Pouyanpi marked this pull request as draft November 28, 2025 11:18
@github-actions
Copy link
Contributor

Documentation preview

https://nvidia-nemo.github.io/Guardrails/review/pr-1521

@Pouyanpi
Copy link
Collaborator Author

@greptileai

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Pouyanpi Pouyanpi force-pushed the chore/poetry-2-migration branch from a8fe499 to 24b035f Compare November 28, 2025 13:26
@Pouyanpi
Copy link
Collaborator Author

test-build-wheel workflow successful.

@Pouyanpi Pouyanpi added this to the 0.20.0 milestone Nov 28, 2025
@Pouyanpi Pouyanpi self-assigned this Nov 28, 2025
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.

2 participants