rye
rye copied to clipboard
Add `autosync-before-run`, `--sync` and `--no-sync` arguments to `rye test` and `rye run` (`OneOffLock` sync mode)
This PR adds:
-
--sync/--no-syncflag arguments torunandtestcommands. They control whether Rye should install project dependencies prior to executing either command. -
sync-before-runglobal configuration flag that controls the same thing.
Note that this PR adds a special OneOffLock sync mode that explicitly skips the locking step during sync if target lock file is present. I did this as I felt the implicit "no update" flag passed to locking backends in Regular mode wasn't a strong enough guarantee that the lock files won't be updated.
Reject in favour of #1005 if you feel this is an overkill.
Closes #886.