Commit Graph
100 Commits
Author SHA1 Message Date
skshetry cb96cf1487 fix name (#10920) 2025-12-01 15:52:37 +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 8912ca7d2b exp: add a retry when removing temporary refs to avoid FileLocked errors (#10840) 2025-10-12 10:05:21 +05:45
skshetry 2b19c724c5 exp run: add test for running inside a linked worktree (#10834) 2025-10-04 06:20:43 +00:00
skshetry c1af66c0a6 completion: support completing config variables (#10864) 2025-09-04 12:00:10 +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 763cbf6bd1 feat(cli): support initializing DVC repository in an arbitrary directory (#10861)
Previously, it could be only initialized in the current working directory.
2025-09-02 10:52:27 +05:45
skshetry 6f4b8c98fc completion: complete remote in zsh/bash (#10858) 2025-08-31 11:25:31 +05:45
skshetry a8bda305cd feat(cli): support multiple --keep and --drop arguments in exp show (#10857)
* feat(cli/exp-show): support multiple --keep and --drop arguments

Closes #10851.

* set upper bound for pytest-rerunfailures to <16.0

v16.0 started breaking in CI.
See https://github.com/pytest-dev/pytest-rerunfailures/issues/303.
2025-08-29 21:13:15 +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 85046843ef fix(status): treat target as a dataset path for cloud instead of search path for dvcfiles (#10849) 2025-08-19 12:04:18 +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 82efd3e780 fix some, suppress some issues from ty check (#10841) 2025-08-14 21:05:49 +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 5485e5662e exp run: fix failure when dependencies are from inside submodules (#10832) 2025-08-06 21:32:00 +05:45
skshetry e619b6dccd exp run: fix failure when dependencies are from inside submodules (#10831) 2025-08-06 21:07:07 +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 fade6c5991 cli: status: return integer instead of bool on --quiet (#10820) 2025-07-29 09:07:24 +05:45
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
skshetry ba1281a41c queue: show a hint to check celery logs if logs are missing and is a failed experiment (#10814) 2025-07-28 11:20:28 +05:45
skshetry 397f4c6f28 skip install related tests if git is missing (#10809) 2025-07-21 14:11:15 +05:45
skshetry 1f5bace250 improve performance of tests in Python>=3.12 when used with coverage (#10810) 2025-07-21 14:09:31 +05:45
skshetry 5a68e821f2 stop using gitpython in tests (#10808) 2025-07-21 11:59:27 +05:45
skshetry b4d8690799 data status: fix remote check progress bar (#10804) 2025-07-16 18:13:43 +05:45
skshetry 7f0c835eed Update badges 2025-07-15 21:19:37 +05:45
skshetry c2506abf74 Update README.rst 2025-07-15 17:01:56 +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 75083cc472 bench: git-ignore dataset fixture used for data status (#10793) 2025-06-27 21:27:40 +05:45
skshetry 493279c7e8 perf(data status): batch remote checks (#10792) 2025-06-27 13:42:20 +00:00
skshetry 3aca0edfce test_lock: increase timeout (#10791) 2025-06-26 13:24:55 +00:00
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
skshetry 549821e6be deps: bump dvc-s3 to >=3.2.1 (#10771)
Fixes https://github.com/iterative/dvc/issues/10767.
Related:
- https://github.com/iterative/dvc-s3/pull/129
- https://github.com/iterative/dvc/discussions/10768
2025-06-09 08:00:44 +05:45
skshetry bf26126e37 release(test-pypi): set dynamic url (#10766) 2025-06-06 22:51:08 +05:45
skshetry 8f1c4424d3 release(env): set dynamic url (#10765) 2025-06-06 22:48:20 +05:45
skshetry 5fb8986dbd bench: check for dvc_bin.version instead of dvc_rev (#10764)
* bench: check for dvc_bin.version instead of dvc_rev

* Update dvc/testing/benchmarks/cli/stories/use_cases/test_sharing.py

* Update dvc/testing/benchmarks/cli/stories/use_cases/test_sharing.py
2025-06-05 11:41:04 +05:45
skshetry 18177a6579 tests(bench): also check if dvc_rev is set (#10763) 2025-06-05 09:26:27 +05:45
skshetry ea02a18b23 tests(bench): remove allow_anonymous_login config use from dvc<3.59.3 (#10762) 2025-06-05 09:21:44 +05:45
skshetry e04f1499a3 fix(dvcfs): rename argument url to repo (#10754)
See #10700 for the motivation.
2025-06-05 08:30:22 +05:45
skshetry 488c30d1ea tests(bench): adapt for pytest>=8.4 (#10761) 2025-06-04 10:13:28 +05:45
skshetry 7ea1daa2b8 deps: bump minver version for dvc-gs to 3.0.2 (#10757)
To support allow_anonymous_login that was added in dvc-gs 3.0.2.

Related:
- https://github.com/iterative/dvc-gs/pull/115
- https://github.com/iterative/dvc/pull/10756
- https://github.com/iterative/dvc/issues/5797
2025-06-03 10:55:35 +05:45
skshetry fd181c78d2 fs(gs): allow configuring anonymous login (#10756) 2025-06-03 10:41:08 +05:45
skshetry 9908ca7f8e drop inputs passed to codecov-action (#10740)
It can already search and find these coverage files.
2025-05-07 14:34:27 +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
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
skshetry e6ce5f825d Revert "pre-commit: set autoupdate schedule to monthly" (#10730)
Revert "pre-commit: set autoupdate schedule to monthly (#10685)"

This reverts commit 25d2638a57.
2025-04-28 18:23:08 +05:45
skshetry b824bc4db7 ci(build): use envvar override to omit local version for Test PyPI upload (#10720)
Uses `SETUPTOOLS_SCM_OVERRIDES_FOR_DVC` to omit the local version
when uploading to Test PyPI. This is needed because (Test) PyPI
does not support local version.

This requires bumping minimum version of `setuptools_scm` to `8.0.0`.

The envvar is documented here: https://setuptools-scm.readthedocs.io/en/latest/overrides/.

Also see:
https://github.com/pypa/setuptools-scm/issues/455#issuecomment-2791301186.
2025-04-10 12:59:32 +05:45
skshetry 31270c14e3 pyproject: update license to PEP 639 format (#10709)
Requires bumping `setuptools` to 77.0.0 or later.

See:
- [PEP 639](https://peps.python.org/pep-0639)
- [Writing pyproject.toml - license](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license)
2025-03-25 09:48:50 +05:45
skshetry 1d6ea68133 ls/ls-url: do not show entry with size<=0 for a directory (#10687)
ls/ls-url: do not show size=0 when the entry is a directory
2025-02-09 12:16:53 +05:45
skshetry 25d2638a57 pre-commit: set autoupdate schedule to monthly (#10685)
Update .pre-commit-config.yaml
2025-02-06 09:33:04 +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
skshetry dd501554fe tests: try to make tests pass on Python 3.13 on unix platforms (#10665) 2025-01-09 22:36:35 +05:45
skshetry 54acfda687 fix implicit concatenated strings (#10666) 2025-01-09 22:05:33 +05:45
skshetry 2c6b917fc5 ls-url: add support for --tree/--level (#10664) 2025-01-09 21:12:34 +05:45
skshetry 64ccd9cfdb set DVC_NO_ANALYTICS on lint (#10640) 2024-11-29 18:48:01 +05:45
skshetry d38b2dbcb8 deps: bump configobj minver to 5.0.9 (#10636) 2024-11-26 10:59:28 +05:45
skshetry 9a050684f7 fix issue with pytest-benchmark==5 (#10618) 2024-11-11 17:54:08 +05:45
skshetry 6302e5f1d3 PEP 703 attestation is the default (#10607) 2024-10-31 07:00:59 +05:45
skshetry 746f028f6c ls: implement --tree to show as a tree and --level to limit depth for recursion (#10598) 2024-10-23 07:56:24 +05:45
skshetry ee1864af8e fix tests with the new pydot release (#10567) 2024-09-26 08:13:06 +05:45
skshetry 52877485d1 chore: ci: disable caching (#10565) 2024-09-25 08:41:30 +05:45
skshetry b8266ed15f add/commit: use hardlink to transfer files to the cache when cache.type is hardlink and on relink mode (#10557) 2024-09-17 13:09:32 +05:45
skshetry 7b8922b20f ci: use uv's official action, and uv build command (#10548) 2024-09-06 08:36:18 +05:45
skshetry eec3d48731 pyproject.toml: remove stale comment from dependency (#10546) 2024-08-30 18:51:56 +05:45
skshetry 5417ccd7b6 dvcfs.get: simplify and separate files into respective filesystems while walking (#10544)
dvcfs.get: simplify and separate files into respective filesystems while collecting/walking
2024-08-29 16:47:16 +00:00
skshetry f2b7b00af5 dvcfilesystem.get: prefer downloading from repo.fs before dvc.fs (#10543) 2024-08-29 13:06:21 +00:00
skshetry 4f3fb15f2e dvcfs: optimize get() by reducing index.info calls() (#10540) 2024-08-27 18:08:40 +05:45
skshetry 705b7bbea6 simplify running benchmarks (#10536) 2024-08-21 21:09:59 +05:45
skshetry 6f24d04b5e ci (bench): skip benchmark for test_import on versions >=3.53,<3.54.1 (#10535) 2024-08-20 21:22:08 +05:45
skshetry 2dcaea8119 dependency/repo: do not suppress OSError on info() (#10533) 2024-08-20 18:14:21 +05:45
skshetry e42d094310 remove epic template (#10530) 2024-08-17 09:40:57 +05:45
skshetry 38ee0a01f7 update ruff to 0.6 (#10526) 2024-08-15 20:02:09 +05:45
skshetry fd3b43df05 fix test_daemon.py::test_analytics flakiness (#10523)
Turns out `iterative-telemetry` spends a long time trying to
generate an id. Sometimes it gets frozen for a long time (>30s).
2024-08-14 16:55:18 +05:45
skshetry 7bca71db2e ci: use pytest-split based on least_duration (#10522) 2024-08-14 14:58:55 +05:45
skshetry 52405a0e10 ci: use uv to install dependencies (#10507)
* ci: use uv to install dependencies

* split Windows tests into four for each python versions

* split tests and check into two jobs

* increase timeout
2024-08-14 13:24:56 +05:45
skshetry c514b0ea31 use uv for benchmark tests while installing/creating virtualenv (#10520) 2024-08-13 22:27:05 +05:45
skshetry 853116a0e3 bump dvc-data to >=3.16.2 (#10519) 2024-08-13 08:59:06 +05:45
skshetry 5e4daf6cfb deps: bump dvc-data to >=3.16.0 (#10513) 2024-08-13 07:15:05 +05:45
skshetry 1bef0da4fb import_db: set dependency.is_in_repo to false (#10504) 2024-08-06 14:02:24 +05:45
skshetry a555c3d29a skip stage cache push/pull test for http (#10462) 2024-06-15 21:51:20 +05:45
skshetry e82356ba92 deps: bump scmrepo to >=3.3.4 (#10432)
Closes https://github.com/iterative/dvc/issues/10431.

Upstream PR: https://github.com/iterative/scmrepo/pull/359
2024-05-20 18:13:25 +05:45
skshetry cbaeff2ea1 deps: bump scmrepo minver to >=3.3.2,<4 (#10406)
Update pyproject.toml
2024-04-25 14:41:58 +05:45
skshetry 8517cccff4 artifacts: add support for monorepo (#10386) 2024-04-16 21:13:02 +05:45
skshetry c223cdaecd params/metrics: do not fail during dir expansion (#10375)
params/metrics: assume file when dir expansion raises error

Closes https://github.com/iterative/dvc/issues/10018.

We have to be careful when expanding paths. This PR fall backs to assume it
as a file when either of `isdir` and `find` raises error due to some mishaps.
The consequence of this assumption happens when we try to read the file.
In that case, if the directory exists, and we happen to try to open it
as a file, dvc will raise `IsADirectoryError`, but that is handled correctly
and won't fail catastrophically like this did.
2024-03-28 07:30:12 +05:45
skshetry 5379aa2348 add: raise DoesNotExistError only if the output path does not exist (#10373)
`dvc add` command incorrectly raises a `DoesNotExistError` when a
broken symlink exists in an output directory, and the target name
is same as the directory's name.

eg: If `data` is an output, and is the command is invoked as `dvc add data`
(i.e. no virtual directory operations to perform).

The expected behavior to raise a `FileNotFoundError`.
`DoesNotExistError` should only be raised if the output itself does not
exist.

Related: https://github.com/iterative/dvc/issues/3717
2024-03-26 11:16:35 +00:00
skshetry 6f6038888f sort imports for all libraries starting with dvc_ as a first party (#10371)
dvc_studio_client, dvc_ssh, etc. were not properly sorted.
2024-03-23 20:13:13 +05:45