mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
Update pre-commit to use pinned version of dvc and correct stage names (#10621)
Co-authored-by: skshetry <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
skshetry
pre-commit-ci[bot]
parent
1e08cc5da3
commit
82e2446eb4
@@ -8,7 +8,7 @@
|
|||||||
name: DVC pre-commit
|
name: DVC pre-commit
|
||||||
require_serial: true
|
require_serial: true
|
||||||
stages:
|
stages:
|
||||||
- commit
|
- pre-commit
|
||||||
verbose: true
|
verbose: true
|
||||||
- args:
|
- args:
|
||||||
- git-hook
|
- git-hook
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
name: DVC pre-push
|
name: DVC pre-push
|
||||||
require_serial: true
|
require_serial: true
|
||||||
stages:
|
stages:
|
||||||
- push
|
- pre-push
|
||||||
- always_run: true
|
- always_run: true
|
||||||
args:
|
args:
|
||||||
- git-hook
|
- git-hook
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
id: dvc-post-checkout
|
id: dvc-post-checkout
|
||||||
language: python
|
language: python
|
||||||
language_version: python3
|
language_version: python3
|
||||||
minimum_pre_commit_version: 2.2.0
|
minimum_pre_commit_version: 3.2.0
|
||||||
name: DVC post-checkout
|
name: DVC post-checkout
|
||||||
require_serial: true
|
require_serial: true
|
||||||
stages:
|
stages:
|
||||||
|
|||||||
+4
-3
@@ -1,5 +1,6 @@
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
from dvc import version_tuple
|
||||||
from dvc.exceptions import DvcException
|
from dvc.exceptions import DvcException
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
@@ -16,19 +17,19 @@ def pre_commit_install(scm: "Git") -> None:
|
|||||||
with modify_yaml(config_path) as config:
|
with modify_yaml(config_path) as config:
|
||||||
entry = {
|
entry = {
|
||||||
"repo": "https://github.com/iterative/dvc",
|
"repo": "https://github.com/iterative/dvc",
|
||||||
"rev": "main",
|
"rev": ".".join(map(str, version_tuple[:3])),
|
||||||
"hooks": [
|
"hooks": [
|
||||||
{
|
{
|
||||||
"id": "dvc-pre-commit",
|
"id": "dvc-pre-commit",
|
||||||
"additional_dependencies": [".[all]"],
|
"additional_dependencies": [".[all]"],
|
||||||
"language_version": "python3",
|
"language_version": "python3",
|
||||||
"stages": ["commit"],
|
"stages": ["pre-commit"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "dvc-pre-push",
|
"id": "dvc-pre-push",
|
||||||
"additional_dependencies": [".[all]"],
|
"additional_dependencies": [".[all]"],
|
||||||
"language_version": "python3",
|
"language_version": "python3",
|
||||||
"stages": ["push"],
|
"stages": ["pre-push"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "dvc-post-checkout",
|
"id": "dvc-post-checkout",
|
||||||
|
|||||||
Reference in New Issue
Block a user