Commit Graph
3370 Commits
Author SHA1 Message Date
skshetry 796903a14b drop pytest-test-utils (#10934) 2025-12-20 21:26:00 +05:45
f342cc7db5 feat(webdav): add bearer_token_command for dynamic token acquisition (#10917)
Co-authored-by: GreenHatHG <[email protected]>
Co-authored-by: skshetry <[email protected]>
2025-12-05 11:07:22 +05:45
Staszek Markowski d086bbbd3a exp: add support for --no-hydra flag (#10866) 2025-12-02 16:05:13 +05:45
skshetry cb96cf1487 fix name (#10920) 2025-12-01 15:52:37 +05:45
Saugat Pachhai (सौगात) dc123102cc fix tests 2025-11-27 09:00:19 +05:45
skshetry 19c146e392 fix(data-status): iterate/expand index upto tracked directory in shallow mode (#10900) 2025-10-27 17:06:07 +00:00
skshetry bda614baa8 support Python 3.14 (#10896) 2025-10-24 19:26:50 +05:45
skshetry 498a4d5d3a move: fix error message when dst stage file exists (#10893) 2025-10-17 19:07:51 +05:45
skshetry 61d5de54e5 support moving missing file keeping the metadata intact (#10890) 2025-10-13 05:34:14 +00:00
skshetry ca7454980d move: support moving output from import/import-url stages (#10889) 2025-10-12 17:28:41 +00:00
skshetry 2b19c724c5 exp run: add test for running inside a linked worktree (#10834) 2025-10-04 06:20:43 +00:00
pre-commit-ci[bot]andSaugat Pachhai 6e896d396c [pre-commit.ci] pre-commit autoupdate (#10869)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.12 → v0.13.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.12...v0.13.0)

* fix ruff errors

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Saugat Pachhai (सौगात) <[email protected]>
2025-09-20 10:22:37 +05:45
skshetry 75c5d17d1e fix(data status): handle missing DVC repo at Git HEAD (#10862)
Avoid raising errors in `data_status()` when Git HEAD does not contain a DVC
repository. Instead, fall back to an empty index.

Tests now cover both unborn and committed Git repos, with and without subdirs.
2025-09-02 12:15:20 +05:45
skshetry 4f4c5b1d01 ignore: simplify and reuse same implementation across check-ignore and is_ignored API (#10856) 2025-08-28 17:09:33 +05:45
skshetry 76cfe92960 minor refactor on check-ignore (#10854) 2025-08-27 19:14:29 +05:45
skshetry 5a86586f3a feat(data status): detect file moves/renames by default (#10846) 2025-08-18 21:23:01 +05:45
skshetry d142d0d6af fix dvc.yaml filepath in error message when reading from git revisions (#10847) 2025-08-16 13:44:48 +00:00
skshetry 9b5ee43ce1 fix(diff): do not show missing cache entries on diff result (#10845) 2025-08-16 05:11:54 +00:00
skshetry 6e223633e7 fix(diff): show in "Not in cache" if dir entry is missing (#10844) 2025-08-15 17:17:57 +00:00
skshetry 29386a0dbb data status: add --remote option to check files against a different remote (#10843) 2025-08-15 21:23:46 +05:45
skshetry e027bc6a87 checkout/pull: report granular summary of changes (#10842) 2025-08-15 20:54:13 +05:45
skshetry a68dda4164 commit: batch dump stages, do not re-read on save from the workspace (#10839) 2025-08-14 16:45:42 +05:45
skshetry 4b1adfd646 fix(perf): only load a stage/.dvc file if the target is an address to that stage (#10838) 2025-08-13 15:54:04 +05:45
skshetry e619b6dccd exp run: fix failure when dependencies are from inside submodules (#10831) 2025-08-06 21:07:07 +05:45
B. John Braddock a72402c843 hashing: Add usedforsecurity=False on hashlib calls (#10826) 2025-08-03 11:19:44 +05:45
Samandar MirjalilovandSaugat Pachhai 1f325bc21e exp: add --hide-workspace flag to exp show (#10798)
Co-authored-by: Saugat Pachhai (सौगात) <[email protected]>
2025-07-31 14:23:00 +05:45
skshetry ca73078b80 fix(data status): handle missing .dir file from the cache on not_in_remote checks (#10822) 2025-07-31 07:57:15 +00:00
skshetry a370f80f90 try to fix test with new rich (#10815) 2025-07-28 15:49:58 +05:45
skshetry dc13186759 analytics: send remote types and git-remote's path hashes (#10816) 2025-07-28 15:07:41 +05:45
pre-commit-ci[bot] abb5977a38 [pre-commit.ci] pre-commit autoupdate (#10811)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-22 00:12:09 +05:45
skshetry 397f4c6f28 skip install related tests if git is missing (#10809) 2025-07-21 14:11:15 +05:45
skshetry 5a68e821f2 stop using gitpython in tests (#10808) 2025-07-21 11:59:27 +05:45
skshetry 1b9b1f870a try to reset log-level after setting it (#10800) 2025-07-11 20:17:29 +05:45
skshetry a23810f0b5 partially rollback batch remote checks (#10796) 2025-06-30 17:19:26 +05:45
skshetry 3aca0edfce test_lock: increase timeout (#10791) 2025-06-26 13:24:55 +00:00
pre-commit-ci[bot] 5bec7d1bb9 [pre-commit.ci] pre-commit autoupdate (#10786)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-26 18:49:25 +05:45
f3836ab29a [cli,lock] Allow wait_for_lock (#10784)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Saugat Pachhai (सौगात) <[email protected]>
2025-06-26 18:34:57 +05:45
skshetryandpre-commit-ci[bot] e278c9cdf4 fix(data status): show committed changes in a new Git repository (#10790)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-26 11:11:04 +00:00
skshetry aac32e1b64 data status: support targets to limit scope of command (#10789) 2025-06-26 16:21:17 +05:45
Thorvald Molthe BallestadandSaugat Pachhai 45fd1025e2 feat: ignore files not in remote when push is false (#10749)
Co-authored-by: Saugat Pachhai (सौगात) <[email protected]>
2025-06-26 15:02:20 +05:45
Rodrigo Goya c7c7ba69fb (fix) DVC_SITE_CACHE_DIR environment variable should override core.site_cache_dir (#10778)
* Prioritize DVC_SITE_CACHE_DIR over core.site_cache_dir

* Add tests for proper prioritization of env var and config

* Tests require python-3.9 compatible typing, use Optional

* Remove comment

* Fixup
2025-06-12 14:19:30 +05:45
Rodrigo Goya 346b1c064e (fix) site_cache_dir() must return DVC_SITE_CACHE_DIR if it exists (#10776)
* DVC_SITE_CACHE_DIR must be sent first, deal with platformdirs afterwards

* Test should check default behaviour when no env var is set

* Add test: site_cache_dir() must return the env var if set
2025-06-12 07:12:04 +00:00
skshetry e04f1499a3 fix(dvcfs): rename argument url to repo (#10754)
See #10700 for the motivation.
2025-06-05 08:30:22 +05:45
skshetry 0eebeb9900 tests: fix flaky test in test_get_used_objs (#10739)
Clear logs before assertions so that logs from other tests do not interfere with the test.
Some destructors may also run in between due to GC, so hopefully this will fix that issue too,
or reduce the chances of it happening.

See
https://github.com/iterative/dvc/actions/runs/14873217814/job/41775314725#step:6:97.

```console
>       assert first(caplog.messages) == expected_message
E       assert 'RC: discarding all clients' == "Output 'path... 'stage.dvc'."
E
E         + RC: discarding all clients
E         - Output 'path'(stage: 'stage.dvc') is missing version info. Cache for it will not be collected. Use `dvc repro` to get your pipeline up to date.
E         - You can also use `dvc commit stage.dvc` to associate existing 'path' with stage: 'stage.dvc'.
```
2025-05-07 12:40:51 +05:45
skshetry 415d4bc980 repo: try to support opening uninitialized/broken repositories (#10736)
This `_get_remote_config()` should use `uninitialized=True` so that it supports
more broader kinds of broken/partially-initialized repositories, including some that have
`.dvc` directory missing, or `.git` directory missing.

This partially reverts #10719. #10608 is also fixed, and no longer requires `core.no_scm` to be passed.
This was already supported by `dvc.api.get_url` as it uses `uninitialized=True`, but this was not respected
in `_get_remote_config()` where it would fail before.

That said, this whole `open_repo`/`_get_remote_config` is terribly broken. For one, it is opening
a local repository, and forcing it's remote config to a repository opened with `Repo(rev=...)`,
where the config may be different.
2025-05-06 08:39:23 +00:00
Rodrigo Goyaandskshetry 4bde0e754e Forward args to _get_remote_config() and honour core/no_scm if present (#10719)
* Forward args to _get_remote_config and honour core/no_scm if present

* Pass full config, except cache, to Repo()

* Avoid modifying original kwargs contents

* Simplify if config

* Add test

* Relax error matching.. .. Avoid windows vs unix paths

* Update dvc/repo/open_repo.py

---------

Co-authored-by: skshetry <[email protected]>
2025-04-30 12:20:09 +05:45
skshetry 88f1ada4bf tests: func test for #4344 (#10732)
See https://github.com/iterative/dvc-data/pull/601 that fixed the issue.
The test is based on reproduction steps from:
https://github.com/iterative/dvc/issues/4344#issuecomment-2822000925
2025-04-29 13:25:28 +05:45
pre-commit-ci[bot]andSaugat Pachhai 6cc349edb4 [pre-commit.ci] pre-commit autoupdate (#10717)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.9...v0.11.4)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix ruff errors

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Saugat Pachhai (सौगात) <[email protected]>
2025-04-08 03:15:09 +00:00
Rory CreanandRMCrean e455ee69aa remote: show default when run "dvc remote list" (#10711)
* remote: show default when run "dvc remote list"

Fixes #10708

* Indent other remotes if there is a default remote

Now regardless of whether there is a default remote or not, all remotes are equally indented

* stricter test for listing remotes shows default

* Rewrite dvc remote list implemetation

- Default remote is indicated at end of the output and colored green
- Remotes no longer reordered to show default first
- Test updated to reflect changes and remove need for function escape_ansi.

---------

Co-authored-by: RMCrean <[email protected]>
2025-04-07 09:02:09 +05:45
skshetry 7d14acb5a7 3.13 support for Windows (#10667)
python/cpython#113829 changed `os.path.isabs` on Windows to not consider a path starting a single backslash to be an absolute path.

We do a lot of naive `posixpath` to `ntpath` conversions, and it broke DVC in multiple places. DVC is likely broken in many other places, and these bugs are difficult to identify.

In this commit, I have tried to fix in the places where the tests failed. And mostly by trying to imitate pre-3.13 behaviour.
Some of the changes may not be correct but keeps the old behaviour in place.

Also re-enabled the CI for all Python versions supported for Windows.
2025-01-10 18:39:38 +05:45