Skip to content

Add 'exclude-newer' configuration to uv tool in pyproject.toml files - #75

Open
Dashing-Nelson wants to merge 1 commit into
mainfrom
exclude-newer
Open

Add 'exclude-newer' configuration to uv tool in pyproject.toml files#75
Dashing-Nelson wants to merge 1 commit into
mainfrom
exclude-newer

Conversation

@Dashing-Nelson

Copy link
Copy Markdown
Member

Added exlcuding newer than 7 days for python libs

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

Adds an Astral uv resolver constraint (exclude-newer) across the workspace and its member projects to avoid selecting very recently published Python packages during dependency resolution.

Changes:

  • Added [tool.uv] exclude-newer = "1 week" to the workspace pyproject.toml.
  • Added [tool.uv] exclude-newer = "1 week" to argo-test and argo-kedro project pyproject.toml files.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
pyproject.toml Introduces uv config at the workspace root.
argo-test/pyproject.toml Introduces uv config for the argo-test project.
argo-kedro/pyproject.toml Introduces uv config for the argo-kedro project.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment on lines 7 to +11
[tool.uv.workspace]
members = ["argo-kedro", "argo-test"]

[tool.uv]
exclude-newer = "1 week" No newline at end of file

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

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

In TOML, declaring a parent table after a child table is invalid in strict parsers. Since [tool.uv.workspace] already creates the tool.uv table, adding a later [tool.uv] header can cause the file to fail to parse (e.g., with Python tomllib) and break tooling that reads pyproject.toml. Move [tool.uv] (and exclude-newer) above [tool.uv.workspace], or place exclude-newer in a way that doesn’t reopen the parent table.

Suggested change
[tool.uv.workspace]
members = ["argo-kedro", "argo-test"]
[tool.uv]
exclude-newer = "1 week"
[tool.uv]
exclude-newer = "1 week"
[tool.uv.workspace]
members = ["argo-kedro", "argo-test"]

Copilot uses AI. Check for mistakes.
Comment thread argo-test/pyproject.toml
Comment on lines +89 to +91

[tool.uv]
exclude-newer = "1 week" No newline at end of file

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

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

This file already defines [tool.uv.sources] earlier, which creates the tool.uv table. Adding [tool.uv] later can be invalid TOML (parent table declared after child) and may fail parsing in strict TOML parsers. Reorder the sections so [tool.uv] appears before [tool.uv.sources] (or avoid reopening tool.uv).

Copilot uses AI. Check for mistakes.
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