Repository Analysis

treeverse/dvc

🦉 Data Versioning and ML Experiments

24.4 Moderate AI signal View on GitHub
24.4
Adjusted Score
24.4
Raw Score
100%
Time Factor
2026-05-27
Last Push
15,636
Stars
Python
Language
90,352
Lines of Code
575
Files
1460
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 160MEDIUM 4LOW 1295

Pattern Findings

1460 matches across 10 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers863 hits · 875 pts
SeverityFileLineSnippet
LOWtests/unit/test_ignore.py167def test_match_ignore_from_file(
LOWtests/unit/test_ignore.py303def test_ignore_unignore_from_git_example(tmp_dir, dvc, scm):
LOWtests/unit/test_pathspec_math.py71def test_dvcignore_pattern_change_dir(tmp_dir, patterns, dirname, changed):
LOWtests/unit/test_dirs.py9def test_global_config_dir_respects_env_var(monkeypatch):
LOWtests/unit/test_dirs.py16def test_site_cache_dir_on_unix(monkeypatch):
LOWtests/unit/test_dirs.py21def test_site_cache_dir_env_var(monkeypatch):
LOWtests/unit/test_dirs.py26def test_site_cache_dir_with_config_parameter(monkeypatch):
LOWtests/unit/test_dirs.py31def test_site_cache_dir_env_var_precedence(monkeypatch):
LOWtests/unit/test_prompt.py4def test_confirm_in_tty_if_stdin_is_closed(mocker):
LOWtests/unit/test_tabular_data.py99def test_dict_like_interfaces():
LOWtests/unit/test_tabular_data.py296def test_drop_duplicates_rich_text():
LOWtests/unit/test_tabular_data.py349def test_drop_duplicates_subset(axis, subset, expected):
LOWtests/unit/test_tabular_data.py374def test_drop_duplicates_invalid_axis():
LOWtests/unit/test_updater.py71def test_check_update_respect_config(result, updater, mocker):
LOWtests/unit/test_updater.py107def test_check_refetches_each_day(mock_tty, updater, caplog, mocker):
LOWtests/unit/test_updater.py124def test_check_fetches_on_invalid_data_format(mock_tty, updater, caplog, mocker):
LOWtests/unit/test_lockfile.py8def test_stage_dump_no_outs_deps(tmp_dir, dvc):
LOWtests/unit/test_lockfile.py18def test_stage_dump_when_already_exists(tmp_dir, dvc):
LOWtests/unit/test_lockfile.py30def test_stage_dump_with_deps_and_outs(tmp_dir, dvc):
LOWtests/unit/test_lockfile.py48def test_stage_overwrites_if_already_exists(tmp_dir, dvc):
LOWtests/unit/test_lockfile.py60def test_load_when_lockfile_does_not_exist(tmp_dir, dvc):
LOWtests/unit/test_lockfile.py78def test_load_when_lockfile_is_corrupted(tmp_dir, dvc, corrupt_data):
LOWtests/unit/test_lockfile.py88def test_try_loading_lockfile_that_is_gitignored(
LOWtests/unit/test_analytics.py24def test_collect_and_send_report(mocker, tmp_global_dir):
LOWtests/unit/test_analytics.py194def test_git_remote_hash_local(mocker, git_remote):
LOWtests/unit/test_progress.py16def test_quiet_logging_disable_false(caplog, capsys, mocker):
LOWtests/unit/test_scm.py7def test_resolve_rev_empty_git_repo(scm):
LOWtests/unit/test_dvcfile.py34def test_pipelines_single_stage_file(path):
LOWtests/unit/test_dvcfile.py41def test_stage_load_on_not_existing_file(tmp_dir, dvc, file, is_dvcignored):
LOWtests/unit/test_dvcfile.py54def test_stage_load_on_non_file(tmp_dir, dvc, file):
LOWtests/unit/test_dvcfile.py62def test_stage_load_on_invalid_data(tmp_dir, dvc, file):
LOWtests/unit/test_dvcfile.py93def test_dump_multiple_pipeline_stages(tmp_dir, dvc):
LOWtests/unit/test_dvcfile.py115def test_dump_stages_single_stage(tmp_dir, dvc):
LOWtests/unit/test_dvcfile.py127def test_stage_load_file_exists_but_dvcignored(tmp_dir, dvc, scm, file):
LOWtests/unit/test_dvcfile.py140def test_try_loading_dvcfile_that_is_gitignored(tmp_dir, dvc, scm, file):
LOWtests/unit/test_dvcfile.py155def test_dvcfile_encoding_error(tmp_dir, dvc):
LOWtests/unit/test_rwlock.py59def test_rwlock_edit_is_guarded(tmp_path, mocker):
LOWtests/unit/test_config.py119def test_feature_section_supports_arbitrary_values(caplog):
LOWtests/unit/test_context.py40def test_context_dict_ignores_keys_except_str():
LOWtests/unit/test_context.py66def test_context_setitem_getitem():
LOWtests/unit/test_context.py213def test_overwrite_with_setitem():
LOWtests/unit/test_context.py322def test_track_from_multiple_files(tmp_dir):
LOWtests/unit/test_context.py400def test_resolve_resolves_dict_keys():
LOWtests/unit/test_context.py409def test_resolve_resolves_boolean_value():
LOWtests/unit/test_context.py420def test_load_from_raises_if_file_not_exist(tmp_dir, dvc):
LOWtests/unit/test_context.py427def test_load_from_raises_if_file_is_directory(tmp_dir, dvc):
LOWtests/unit/test_api.py8def test_open_raises_error_if_no_context(tmp_dir, dvc):
LOWtests/unit/test_api.py18def test_open_rev_raises_error_on_wrong_mode(tmp_dir, dvc):
LOWtests/unit/test_compare.py26def test_diff_table_with_value_column():
LOWtests/unit/test_compare.py69def test_diff_table_precision():
LOWtests/unit/test_compare.py100def test_diff_unsupported_diff_message(extra, expected):
LOWtests/unit/test_compare.py267def test_metrics_show_with_valid_falsey_values():
LOWtests/unit/test_compare.py289def test_metrics_show_with_no_revision():
LOWtests/unit/test_compare.py305def test_metrics_show_with_non_dict_values():
LOWtests/unit/test_compare.py313def test_metrics_show_with_multiple_revision():
LOWtests/unit/test_compare.py343def test_metrics_show_with_one_revision_multiple_paths():
LOWtests/unit/test_compare.py373def test_metrics_show_with_different_metrics_header():
LOWtests/unit/test_compare.py405def test_metrics_show_precision():
LOWtests/unit/test_compare.py471def test_metrics_show_default(capsys):
LOWtests/unit/test_compare.py494def test_metrics_show_markdown(capsys):
803 more matches not shown…
Cross-Language Confusion153 hits · 848 pts
SeverityFileLineSnippet
HIGHtests/func/test_ignore.py470 dvc.push()
HIGHtests/func/test_gc.py229 dvc.push()
HIGHtests/func/test_gc.py354 dvc.push(["file1", "dir1"])
HIGHtests/func/test_gc.py388 dvc.push(["file1", "dir1"], remote="other_remote")
HIGHtests/func/test_gc.py413 dvc.push()
HIGHtests/func/test_gc.py442 dvc.push()
HIGHtests/func/test_run_cache.py19 assert dvc.push(run_cache=True) == 2
HIGHtests/func/test_run_cache.py90 cmd="cp foo bar && cp foo goo",
HIGHtests/func/test_run_cache.py216 dvc.push(run_cache=True)
HIGHtests/func/test_run_cache.py247 dvc.push(run_cache=True)
HIGHtests/func/test_data_status.py415 assert dvc.push() == 4
HIGHtests/func/test_data_status.py439 dvc.push(remote="myremote")
HIGHtests/func/test_data_status.py518 dvc.push()
HIGHtests/func/test_data_status.py916 dvc.push()
HIGHtests/func/test_data_status.py1235 assert dvc.push() == 3
HIGHtests/func/test_data_status.py1264 dvc.push()
HIGHtests/func/test_external_repo.py53 erepo_dir.dvc.push()
HIGHtests/func/test_external_repo.py112 erepo_dir.dvc.push()
HIGHtests/func/test_status.py127 cmd="echo alice>alice && echo bob>bob",
HIGHtests/func/test_virtual_directory.py20 assert dvc.push() == 3
HIGHtests/func/test_virtual_directory.py33 assert dvc.push() == 2
HIGHtests/func/test_virtual_directory.py41 assert dvc.push() == 2
HIGHtests/func/test_virtual_directory.py63 assert dvc.push() == 5
HIGHtests/func/test_virtual_directory.py75 assert dvc.push() == 1
HIGHtests/func/test_virtual_directory.py85 assert dvc.push() == 1
HIGHtests/func/test_virtual_directory.py98 assert dvc.push() == 3
HIGHtests/func/test_virtual_directory.py110 assert dvc.push() == 3
HIGHtests/func/test_virtual_directory.py123 assert dvc.push() == 3
HIGHtests/func/test_virtual_directory.py134 assert dvc.push() == 2
HIGHtests/func/test_virtual_directory.py147 assert dvc.push() == 3
HIGHtests/func/test_virtual_directory.py158 assert not dvc.push()
HIGHtests/func/test_virtual_directory.py166 assert not dvc.push()
HIGHtests/func/test_virtual_directory.py180 assert dvc.push() == 22
HIGHtests/func/test_virtual_directory.py198 assert dvc.push() == 2
HIGHtests/func/test_import.py355 erepo_dir.dvc.push([os.path.join(os.fspath(erepo_dir), "dire*")], glob=True)
HIGHtests/func/test_import.py438 erepo_dir.dvc.push()
HIGHtests/func/test_import.py455 dvc.push()
HIGHtests/func/test_import.py602 erepo_dir.dvc.push()
HIGHtests/func/test_get.py233 erepo_dir.dvc.push()
HIGHtests/func/test_get.py260 dvc.push()
HIGHtests/func/test_remote.py211 dvc.push()
HIGHtests/func/test_remote.py220 dvc.push()
HIGHtests/func/test_remote.py255 dvc.push()
HIGHtests/func/test_remote.py285 dvc.push()
HIGHtests/func/test_remote.py419 dvc.push()
HIGHtests/func/test_remote.py438 dvc.push()
HIGHtests/func/test_install.py92 scm.gitpython.repo.git.push("origin", "master")
HIGHtests/func/test_data_cloud.py134 dvc.push()
HIGHtests/func/test_data_cloud.py437 assert dvc.push(["dvc.yaml:copy-ipsum-baz"]) == 1
HIGHtests/func/test_data_cloud.py441 assert dvc.push(["dvc.yaml"]) == 2
HIGHtests/func/test_data_cloud.py445 dvc.push(["dvc.yaml:StageThatDoesNotExist"])
HIGHtests/func/test_data_cloud.py531 assert dvc.push(**{key: True}) == expected
HIGHtests/func/test_data_cloud.py544 assert dvc.push("copy-foo-bar") == 1
HIGHtests/func/test_data_cloud.py548 assert dvc.push() == 0
HIGHtests/func/test_data_cloud.py177 dvc.push()
HIGHtests/func/test_data_cloud.py198 dvc.push()
HIGHtests/func/test_data_cloud.py332 dvc.push("bar")
HIGHtests/func/test_data_cloud.py363 dvc.push()
HIGHtests/func/test_data_cloud.py414 assert dvc.push() == 3
HIGHtests/func/test_data_cloud.py477 dvc.push()
93 more matches not shown…
Unused Imports309 hits · 305 pts
SeverityFileLineSnippet
LOWtests/conftest.py10
LOWtests/conftest.py12
LOWtests/conftest.py13
LOWtests/conftest.py14
LOWtests/integration/conftest.py1
LOWtests/integration/conftest.py1
LOWtests/utils/asserts.py5
LOWtests/remotes/__init__.py1
LOWtests/remotes/__init__.py1
LOWtests/remotes/__init__.py1
LOWtests/remotes/__init__.py3
LOWtests/remotes/__init__.py3
LOWtests/func/test_dataset.py26
LOWtests/func/test_data_cloud.py15
LOWtests/func/experiments/conftest.py3
LOWtests/func/experiments/conftest.py3
LOWtests/func/experiments/conftest.py3
LOWtests/func/experiments/conftest.py3
LOWtests/func/experiments/conftest.py3
LOWtests/func/experiments/conftest.py3
LOWtests/func/api/test_data.py9
LOWtests/func/api/test_experiments.py7
LOWdvc/config.py19
LOWdvc/config.py20
LOWdvc/data_cloud.py13
LOWdvc/data_cloud.py14
LOWdvc/data_cloud.py15
LOWdvc/config_schema.py23
LOWdvc/database.py19
LOWdvc/database.py19
LOWdvc/database.py19
LOWdvc/database.py20
LOWdvc/__init__.py8
LOWdvc/__init__.py9
LOWdvc/__init__.py9
LOWdvc/types.py4
LOWdvc/updater.py12
LOWdvc/ignore.py25
LOWdvc/ignore.py27
LOWdvc/dvcfile.py19
LOWdvc/dvcfile.py20
LOWdvc/dvcfile.py23
LOWdvc/cachemgr.py9
LOWdvc/exceptions.py9
LOWdvc/analytics.py10
LOWdvc/scm.py10
LOWdvc/scm.py19
LOWdvc/scm.py21
LOWdvc/_debug.py6
LOWdvc/_debug.py7
LOWdvc/output.py47
LOWdvc/output.py49
LOWdvc/ui/__init__.py10
LOWdvc/ui/__init__.py11
LOWdvc/ui/__init__.py11
LOWdvc/ui/__init__.py12
LOWdvc/ui/__init__.py13
LOWdvc/ui/__init__.py14
LOWdvc/ui/__init__.py17
LOWdvc/ui/__init__.py18
249 more matches not shown…
Deep Nesting72 hits · 72 pts
SeverityFileLineSnippet
LOWtests/unit/command/test_help.py13
LOWtests/unit/command/test_help.py17
LOWtests/unit/repo/experiments/queue/test_celery.py176
LOWtests/unit/repo/experiments/queue/test_celery.py190
LOWdvc/rwlock.py76
LOWdvc/logger.py143
LOWdvc/dagascii.py83
LOWdvc/lock.py110
LOWdvc/dvcfile.py427
LOWdvc/cachemgr.py41
LOWdvc/_debug.py34
LOWdvc/compare.py182
LOWdvc/compare.py226
LOWdvc/output.py425
LOWdvc/output.py912
LOWdvc/render/match.py68
LOWdvc/render/converter/vega.py22
LOWdvc/render/converter/vega.py33
LOWdvc/render/converter/vega.py85
LOWdvc/render/converter/vega.py122
LOWdvc/dependency/param.py124
LOWdvc/utils/collections.py6
LOWdvc/utils/table.py14
LOWdvc/utils/table.py48
LOWdvc/utils/serialize/_py.py88
LOWdvc/utils/serialize/_py.py114
LOWdvc/cli/__init__.py151
LOWdvc/testing/benchmarks/fixtures.py95
LOWdvc/testing/benchmarks/cli/stories/test_modify_data.py38
LOWdvc/api/experiments.py46
LOWdvc/api/data.py258
LOWdvc/stage/__init__.py313
LOWdvc/stage/__init__.py420
LOWdvc/commands/add.py10
LOWdvc/commands/gc.py13
LOWdvc/commands/remote.py82
LOWdvc/commands/plots.py75
LOWdvc/commands/plots.py184
LOWdvc/commands/diff.py118
LOWdvc/commands/experiments/ls.py12
LOWdvc/commands/experiments/diff.py13
LOWdvc/parsing/interpolate.py96
LOWdvc/fs/dvc.py378
LOWdvc/fs/dvc.py447
LOWdvc/repo/gc.py55
LOWdvc/repo/index.py47
LOWdvc/repo/index.py946
LOWdvc/repo/index.py467
LOWdvc/repo/index.py653
LOWdvc/repo/commit.py46
LOWdvc/repo/__init__.py102
LOWdvc/repo/open_repo.py155
LOWdvc/repo/checkout.py42
LOWdvc/repo/diff.py25
LOWdvc/repo/worktree.py305
LOWdvc/repo/data.py408
LOWdvc/repo/experiments/collect.py126
LOWdvc/repo/experiments/run.py15
LOWdvc/repo/experiments/pull.py22
LOWdvc/repo/experiments/__init__.py138
12 more matches not shown…
Excessive Try-Catch Wrapping39 hits · 42 pts
SeverityFileLineSnippet
LOWtests/unit/test_logger.py65 except Exception:
LOWtests/unit/test_logger.py76 except Exception:
LOWtests/unit/test_logger.py87 except Exception:
LOWtests/unit/test_logger.py98 except Exception:
LOWtests/unit/test_logger.py116 except Exception:
LOWtests/unit/test_logger.py136 except Exception:
LOWtests/unit/test_logger.py154 except Exception as exc: # noqa: BLE001
LOWdvc/database.py84 except Exception as exc:
LOWdvc/logger.py153 except Exception: # noqa: BLE001, S110
LOWdvc/logger.py161 except Exception: # noqa: BLE001
LOWdvc/updater.py80 except Exception as e: # noqa: BLE001
LOWdvc/analytics.py150 except Exception:
LOWdvc/analytics.py178 except Exception as exc: # noqa: BLE001
LOWdvc/_debug.py124 except Exception:
MEDIUMdvc/_debug.py121def debug():
LOWdvc/render/match.py114 except Exception as e: # noqa: BLE001
LOWdvc/utils/__init__.py393 except Exception as e: # noqa: BLE001
LOWdvc/cli/__init__.py236 except Exception as exc: # noqa: BLE001
LOWdvc/repo/fetch.py88 except Exception as exc: # noqa: BLE001
LOWdvc/repo/reproduce.py188 except Exception as exc: # noqa: BLE001
LOWdvc/repo/scm_context.py104 except Exception:
LOWdvc/repo/artifacts.py268 except Exception as exc:
LOWdvc/repo/artifacts.py336 except Exception as exc: # noqa: BLE001
LOWdvc/repo/artifacts.py364 except Exception as exc: # noqa: BLE001
LOWdvc/repo/artifacts.py378 except Exception as exc:
LOWdvc/repo/metrics/show.py69 except Exception as exc: # noqa: BLE001
LOWdvc/repo/metrics/show.py126 except Exception as e:
LOWdvc/repo/metrics/show.py227 except Exception as exc:
LOWdvc/repo/experiments/collect.py61 except Exception as exc:
LOWdvc/repo/experiments/stash.py144 except Exception:
LOWdvc/repo/experiments/push.py127 except Exception as exc: # noqa: BLE001
LOWdvc/repo/experiments/queue/tempdir.py128 except Exception as exc:
LOWdvc/repo/experiments/queue/tasks.py75 except Exception:
LOWdvc/repo/experiments/queue/workspace.py134 except Exception as exc:
LOWdvc/repo/experiments/queue/base.py427 except Exception: # noqa: BLE001
LOWdvc/repo/experiments/executor/local.py191 except Exception:
LOWdvc/repo/experiments/executor/base.py645 except Exception:
LOWdvc/repo/params/show.py111 except Exception as exc: # noqa: BLE001
LOWdvc/repo/params/show.py194 except Exception as exc:
Docstring Block Structure7 hits · 35 pts
SeverityFileLineSnippet
HIGHdvc/api/show.py41Get metrics tracked in `repo`. Without arguments, this function will retrieve all metrics from all tracked metr
HIGHdvc/api/show.py164Get parameters tracked in `repo`. Without arguments, this function will retrieve all params from all tracked pa
HIGHdvc/api/experiments.py14 Create a new DVC experiment using `exp save`. See https://dvc.org/doc/command-reference/exp/save. Args:
HIGHdvc/api/artifacts.py13 Return path and Git revision for an artifact in a DVC project. The resulting path and revision can be used in
HIGHdvc/api/data.py112 Opens a file tracked in a DVC project. This function may only be used as a context manager (using the `with`
HIGHdvc/repo/ls.py57Methods for getting files and outputs for the repo. Args: url (str): the repo url path (str, option
HIGHdvc/repo/init.py16 Creates an empty repo on the given directory -- basically a `.dvc` directory with subdirectories for configurat
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALdvc/commands/experiments/queue_worker.py11 self.repo.experiments.celery_queue.worker.start(
Fake / Example Data6 hits · 8 pts
SeverityFileLineSnippet
LOWtests/unit/utils/test_humanize.py43 text = "lorem ipsum"
LOWtests/unit/utils/test_humanize.py61 text = "lorem ipsum"
LOWtests/unit/repo/test_scm_context.py107 context.track_file("lorem ipsum")
LOWtests/unit/repo/test_scm_context.py108 assert context.files_to_track == {"foo", "lorem ipsum"}
LOWtests/unit/repo/test_scm_context.py116 assert set(match.groups()) == {"'lorem ipsum'", "foo"}
LOWtests/func/test_virtual_directory.py102 tmp_dir.gen({"dir": {"subdir": {"ipsum": "lorem ipsum", "file": "file"}}})
Over-Commented Block7 hits · 7 pts
SeverityFileLineSnippet
LOWtests/unit/test_ignore.py21 ("#to_ignore", ["\\#to_ignore"], True),
LOWtests/unit/test_pathspec_math.py21 # Put a backslash ("\") in front of the first "!" for patterns that
LOWtests/unit/test_pathspec_math.py41 # The range notation, e.g. [a-zA-Z], can be used to match one of the
LOWdvc/utils/__init__.py81 env[lp_key] = lp_orig
LOWdvc/cli/utils.py41 # see: https://bugs.python.org/issue22848
LOWdvc/stage/run.py81 kwargs = {"cwd": stage.wdir, "env": fix_env(None), "close_fds": True}
LOWdvc/fs/__init__.py121 #
Self-Referential Comments3 hits · 7 pts
SeverityFileLineSnippet
MEDIUMtests/unit/fs/test_dvcfs.py719 # Create the test dirs
MEDIUMtests/unit/fs/test_dvcfs.py748 # Create the test dir
MEDIUMdvc/cli/__init__.py1"""This module provides an entrypoint to the dvc cli and parsing utils."""