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

update to poetry 2.0 #229 #238

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

iam-flo
Copy link
Contributor

@iam-flo iam-flo commented Feb 3, 2025

Upgrade poetry to version 2.0

To test run
poetry self update
and then
poetry install
then test that the application still runs and performs as before.

Summary by CodeRabbit

  • Chores

    • Upgraded the dependency management tool to version 2.0.1, ensuring smoother installations and improved performance.
  • Documentation

    • Revised installation instructions to advise users with outdated dependency tool versions to run poetry self update before proceeding.
  • Refactor

    • Modernized the project configuration by restructuring dependency definitions and adding explicit Python version compatibility.

@iam-flo iam-flo self-assigned this Feb 3, 2025
@iam-flo iam-flo linked an issue Feb 3, 2025 that may be closed by this pull request
@github-actions github-actions bot added intelligence-service size:L This PR changes 100-499 lines, ignoring generated files. labels Feb 3, 2025
@iam-flo
Copy link
Contributor Author

iam-flo commented Feb 3, 2025

need to change workflow as well

Copy link

coderabbitai bot commented Feb 10, 2025

Walkthrough

This update changes the Poetry version used in two GitHub Actions workflows by updating it from 1.8.5 to 2.0.1. In addition, the README now includes an instruction for users with older Poetry versions to run poetry self update. The project configuration in pyproject.toml has been reformatted by migrating key metadata to a [project] section, introducing a Python version requirement, adjusting dependency declarations, and adding a development dependency group.

Changes

File(s) Change Summary
.github/workflows/.../generate-intelligence-service-client.yml
.github/workflows/.../intelligence-service-qa.yml
Updated the Poetry installation step, changing the version from 1.8.5 to 2.0.1 and removing the --no-update flag from the poetry lock command.
server/intelligence-service/README.md Added a note in the installation section advising users to run poetry self update if their Poetry version is below 2.0.0.
server/intelligence-service/pyproject.toml Reformatted project configuration: migrated from [tool.poetry] to [project], added requires-python = ">=3.12,<4.0.0", restructured dependency declarations, moved package-mode, and introduced a dev dependency group including black.

Poem

I’m a rabbit bound by code’s delight,
Hopping through workflows in the light.
Upgraded Poetry with a skip and a bound,
README and config changes nicely found.
Cheers to neat changes that make our code tight! 🐰


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d341598 and 7703226.

📒 Files selected for processing (2)
  • .github/workflows/generate-intelligence-service-client.yml (2 hunks)
  • .github/workflows/intelligence-service-qa.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/generate-intelligence-service-client.yml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/intelligence-service-qa.yml

[warning] 27-27: wrong indentation: expected 12 but found 10

(indentation)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Webapp / Build linux/arm64 Docker Image for ghcr.io/ls1intum/hephaestus/webapp
  • GitHub Check: Application Server / Build linux/arm64 Docker Image for ghcr.io/ls1intum/hephaestus/application-server
  • GitHub Check: Webapp / Build linux/amd64 Docker Image for ghcr.io/ls1intum/hephaestus/webapp
  • GitHub Check: Intelligence Service / Build linux/arm64 Docker Image for ghcr.io/ls1intum/hephaestus/intelligence-service
  • GitHub Check: Application Server / Build linux/amd64 Docker Image for ghcr.io/ls1intum/hephaestus/application-server
  • GitHub Check: Intelligence Service / Build linux/amd64 Docker Image for ghcr.io/ls1intum/hephaestus/intelligence-service
  • GitHub Check: Code Quality Checks
🔇 Additional comments (2)
.github/workflows/intelligence-service-qa.yml (2)

27-27: Fix YAML Indentation for Poetry Version

YAMLlint reports an indentation issue on this line. The key "version: 2.0.1" currently has 10 spaces while 12 spaces are expected. Please adjust the indentation accordingly.

Suggested diff:

-          version: 2.0.1
+            version: 2.0.1
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 27-27: wrong indentation: expected 12 but found 10

(indentation)


42-42: Verify Removal of --no-update Flag

The poetry lock command now omits the --no-update flag, which is likely intentional with the upgrade to Poetry 2.0. Please confirm that this change aligns with the desired dependency resolution behavior and doesn’t inadvertently update dependencies in an unexpected manner.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
server/intelligence-service/pyproject.toml (1)

12-24: Dependency Specification Format Review

The dependencies are now declared as a list under the new [dependencies] section. Please verify that the version specifiers maintain a consistent format. For example, removing extra spaces around operators (e.g., "fastapi[standard]==0.115.6" instead of "fastapi[standard] == 0.115.6") and reviewing the use of parentheses in dependency strings (e.g., "langgraph-checkpoint-postgres (>=2.0.8,<3.0.0)") so that they are parsed correctly by Poetry.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17edefc and d341598.

⛔ Files ignored due to path filters (1)
  • server/intelligence-service/poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/workflows/generate-intelligence-service-client.yml (1 hunks)
  • .github/workflows/intelligence-service-qa.yml (1 hunks)
  • server/intelligence-service/README.md (1 hunks)
  • server/intelligence-service/pyproject.toml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/intelligence-service-qa.yml

[warning] 27-27: wrong indentation: expected 12 but found 10

(indentation)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Webhook Ingest / Build linux/arm64 Docker Image for ghcr.io/ls1intum/hephaestus/webhook-ingest
  • GitHub Check: Webhook Ingest / Build linux/amd64 Docker Image for ghcr.io/ls1intum/hephaestus/webhook-ingest
  • GitHub Check: Intelligence Service / Build linux/arm64 Docker Image for ghcr.io/ls1intum/hephaestus/intelligence-service
  • GitHub Check: Webapp / Build linux/arm64 Docker Image for ghcr.io/ls1intum/hephaestus/webapp
  • GitHub Check: Application Server / Build linux/arm64 Docker Image for ghcr.io/ls1intum/hephaestus/application-server
  • GitHub Check: Intelligence Service / Build linux/amd64 Docker Image for ghcr.io/ls1intum/hephaestus/intelligence-service
  • GitHub Check: Webapp / Build linux/amd64 Docker Image for ghcr.io/ls1intum/hephaestus/webapp
  • GitHub Check: Application Server / Build linux/amd64 Docker Image for ghcr.io/ls1intum/hephaestus/application-server
🔇 Additional comments (5)
server/intelligence-service/README.md (1)

23-26: Clear Poetry Update Instruction Added

The new instruction clearly advises users with Poetry versions less than 2.0.0 to run poetry self update before installing dependencies. This is a helpful addition to ensure compatibility with the updated configuration. You might also consider adding a brief note about verifying the Poetry version afterward.

server/intelligence-service/pyproject.toml (2)

1-10: Adoption of New [project] Configuration

The migration to a [project] section for metadata (including name, version, description, authors, readme, and requires-python) is well executed and aligns with modern standards. The structured authors list is clear and concise.


26-30: Development Dependencies and Package Mode Configuration

The [tool.poetry] block now specifies package-mode = false and includes a dedicated development dependency group with Black. This configuration appears correct and consistent with the updated project structure.

.github/workflows/intelligence-service-qa.yml (1)

25-32: Poetry Version Update in Workflow

The "Install Poetry" step has been updated to use version 2.0.1, which is consistent with the new project requirements. This change helps ensure that all workflow steps operate with the same Poetry version.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 27-27: wrong indentation: expected 12 but found 10

(indentation)

.github/workflows/generate-intelligence-service-client.yml (1)

43-51: Consistent Poetry Version in Client Generation Workflow

The "Install Poetry" step in this workflow now specifies version 2.0.1, matching the update made in the QA workflow. The configuration parameters (virtualenv creation, in-project setting, etc.) are correctly set, which should ensure consistency in dependency management across workflows.

@@ -24,7 +24,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.5
version: 2.0.1
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

YAML Indentation Issue

YAMLlint flagged an indentation problem on line 27 (expected 12 spaces but found 10). Please adjust the indentation for the version: 2.0.1 line to comply with YAML formatting standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 27-27: wrong indentation: expected 12 but found 10

(indentation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intelligence-service size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Poetry to version 2
1 participant