Skip to content

Conversation

@morrison12
Copy link
Contributor

Add initial set of facts and operations for uv.
Comments and Suggestions welcome.

  • Pull request is based on the default branch (3.x at this time)
  • Pull request includes tests for any new/updated operations/facts
  • Pull request includes documentation for any new/updated operations/facts
  • Tests pass (see scripts/dev-test.sh)
  • Type checking & code style passes (see scripts/dev-lint.sh)

@Fizzadar Fizzadar requested a review from DonDebonair December 2, 2025 15:34
@Fizzadar Fizzadar mentioned this pull request Dec 29, 2025
Copy link
Contributor

@maisim maisim left a comment

Choose a reason for hiding this comment

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

Code review + functionnal tests

extras = " ".join(extra_args or []) if not isinstance(extra_args, str) else extra_args
install_command = f"{UV_CMD} tool install --no-progress {extras}"
uninstall_command = f"{UV_CMD} tool uninstall --no-progress {extras}"
upgrade_command = f"{install_command} --upgrade --no-progress {extras}"
Copy link
Contributor

Choose a reason for hiding this comment

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

--> Starting operation: Ensure cowsay tool is installed
[@Local] error: the argument '--no-progress' cannot be used multiple times

Suggested change
upgrade_command = f"{install_command} --upgrade --no-progress {extras}"
upgrade_command = f"{install_command} --upgrade {extras}"

Copy link
Contributor

Choose a reason for hiding this comment

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

But I don't quite understand why the tests are still passing without needing an update, since the command syntax shouldn't be correct anymore, right? Perhaps it's an untested case? I don't have time to look into it further right now; I'll come back to it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ignore my previous (now deleted) reply as I'm also confused: below is the code I see in changed files (just made the screenshot now) which doesn't have the problem (and explains why the tests passed) but doesn't explain why @maisim sees different (broken) code.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @morrison12
You have to look at line 175

https://github.com/pyinfra-dev/pyinfra/pull/1500/files#r2695177204

I submitted a PR on your fork to fix this:
https://github.com/morrison12/pyinfra/pull/1/changes

There is no error because no test on this part ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops.. indeed wrong operation.. thanks.. merged

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanx for this work !

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