git-goose 0.3.2__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {git_goose-0.3.2 → git_goose-0.4.0}/PKG-INFO +19 -4
- {git_goose-0.3.2 → git_goose-0.4.0}/README.md +18 -3
- {git_goose-0.3.2 → git_goose-0.4.0}/pyproject.toml +3 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/git_goose.egg-info/PKG-INFO +19 -4
- {git_goose-0.3.2 → git_goose-0.4.0}/src/git_goose.egg-info/SOURCES.txt +1 -0
- git_goose-0.4.0/src/git_goose.egg-info/entry_points.txt +2 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/__main__.py +1 -1
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/_version.py +2 -2
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/asyncio.py +1 -6
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/manifest.py +3 -7
- {git_goose-0.3.2 → git_goose-0.4.0}/.dockerignore +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.editorconfig +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.github/dependabot.yml +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.github/workflows/ci.yaml +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.github/workflows/release.yaml +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.gitignore +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.goose/node/manifest.json +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.goose/node/package-lock.json +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.goose/node/package.json +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.goose/python/manifest.json +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.goose/python/requirements.txt +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.goose/type-check/manifest.json +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/.goose/type-check/requirements.txt +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/Dockerfile +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/LICENSE +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/Makefile +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/goose.yaml +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/requirements.txt +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/ruff.toml +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/setup.cfg +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/git_goose.egg-info/dependency_links.txt +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/git_goose.egg-info/requires.txt +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/git_goose.egg-info/top_level.txt +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/__init__.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/_utils/__init__.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/_utils/pydantic.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/backend/__init__.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/backend/base.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/backend/index.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/backend/node.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/backend/python.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/config.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/context.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/environment.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/executable_unit.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/filter.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/git/__init__.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/git/shared.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/git/status.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/orphan_environments.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/parallel.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/paths.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/process.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/py.typed +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/scheduler.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/src/goose/targets.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/tests/__init__.py +0 -0
- {git_goose-0.3.2 → git_goose-0.4.0}/tests/test_targets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: git-goose
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: A picky and eager Git hook runner.
|
|
5
5
|
Author-email: Anton Agestam <git@antonagestam.se>
|
|
6
6
|
License: BSD 3-Clause
|
|
@@ -84,6 +84,21 @@ the appropriate lock files under a `.goose/` directory. The `.goose/` directory
|
|
|
84
84
|
to be checked into git, so that future invocations of `goose run` can use the lock files
|
|
85
85
|
it contains to produce identical environments for hooks to run in.
|
|
86
86
|
|
|
87
|
+
```mermaid
|
|
88
|
+
---
|
|
89
|
+
title: Lock file workflow
|
|
90
|
+
---
|
|
91
|
+
flowchart LR
|
|
92
|
+
cfg["Config in goose.yaml"] -- goose upgrade --> lf
|
|
93
|
+
lf["Lock files under .goose/"] -- goose run --> env
|
|
94
|
+
env["Environments"]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- Invoking `goose upgrade` creates lock files under the in-tree `.goose` directory.
|
|
98
|
+
- Invoking `goose run` creates out-of-tree environments from the lock files. By default
|
|
99
|
+
they live under `~/.cache/goose`.
|
|
100
|
+
- Hooks are executed in the generated environments.
|
|
101
|
+
|
|
87
102
|
## Usage
|
|
88
103
|
|
|
89
104
|
Create a `goose.yaml` file in the repository root.
|
|
@@ -114,13 +129,13 @@ hooks:
|
|
|
114
129
|
Bootstrap environments, generate lock files, and install dependencies.
|
|
115
130
|
|
|
116
131
|
```sh
|
|
117
|
-
$
|
|
132
|
+
$ goose upgrade
|
|
118
133
|
```
|
|
119
134
|
|
|
120
135
|
Run all hooks over all files.
|
|
121
136
|
|
|
122
137
|
```sh
|
|
123
|
-
$
|
|
138
|
+
$ goose run --select=all
|
|
124
139
|
```
|
|
125
140
|
|
|
126
141
|
Commit configuration and lock files.
|
|
@@ -137,7 +152,7 @@ configuration to upgrade hook dependency versions, instead you just run the upgr
|
|
|
137
152
|
command.
|
|
138
153
|
|
|
139
154
|
```sh
|
|
140
|
-
$
|
|
155
|
+
$ goose upgrade
|
|
141
156
|
$ git add .goose
|
|
142
157
|
$ git commit -m 'Bump goose dependencies'
|
|
143
158
|
```
|
|
@@ -61,6 +61,21 @@ the appropriate lock files under a `.goose/` directory. The `.goose/` directory
|
|
|
61
61
|
to be checked into git, so that future invocations of `goose run` can use the lock files
|
|
62
62
|
it contains to produce identical environments for hooks to run in.
|
|
63
63
|
|
|
64
|
+
```mermaid
|
|
65
|
+
---
|
|
66
|
+
title: Lock file workflow
|
|
67
|
+
---
|
|
68
|
+
flowchart LR
|
|
69
|
+
cfg["Config in goose.yaml"] -- goose upgrade --> lf
|
|
70
|
+
lf["Lock files under .goose/"] -- goose run --> env
|
|
71
|
+
env["Environments"]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- Invoking `goose upgrade` creates lock files under the in-tree `.goose` directory.
|
|
75
|
+
- Invoking `goose run` creates out-of-tree environments from the lock files. By default
|
|
76
|
+
they live under `~/.cache/goose`.
|
|
77
|
+
- Hooks are executed in the generated environments.
|
|
78
|
+
|
|
64
79
|
## Usage
|
|
65
80
|
|
|
66
81
|
Create a `goose.yaml` file in the repository root.
|
|
@@ -91,13 +106,13 @@ hooks:
|
|
|
91
106
|
Bootstrap environments, generate lock files, and install dependencies.
|
|
92
107
|
|
|
93
108
|
```sh
|
|
94
|
-
$
|
|
109
|
+
$ goose upgrade
|
|
95
110
|
```
|
|
96
111
|
|
|
97
112
|
Run all hooks over all files.
|
|
98
113
|
|
|
99
114
|
```sh
|
|
100
|
-
$
|
|
115
|
+
$ goose run --select=all
|
|
101
116
|
```
|
|
102
117
|
|
|
103
118
|
Commit configuration and lock files.
|
|
@@ -114,7 +129,7 @@ configuration to upgrade hook dependency versions, instead you just run the upgr
|
|
|
114
129
|
command.
|
|
115
130
|
|
|
116
131
|
```sh
|
|
117
|
-
$
|
|
132
|
+
$ goose upgrade
|
|
118
133
|
$ git add .goose
|
|
119
134
|
$ git commit -m 'Bump goose dependencies'
|
|
120
135
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: git-goose
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: A picky and eager Git hook runner.
|
|
5
5
|
Author-email: Anton Agestam <git@antonagestam.se>
|
|
6
6
|
License: BSD 3-Clause
|
|
@@ -84,6 +84,21 @@ the appropriate lock files under a `.goose/` directory. The `.goose/` directory
|
|
|
84
84
|
to be checked into git, so that future invocations of `goose run` can use the lock files
|
|
85
85
|
it contains to produce identical environments for hooks to run in.
|
|
86
86
|
|
|
87
|
+
```mermaid
|
|
88
|
+
---
|
|
89
|
+
title: Lock file workflow
|
|
90
|
+
---
|
|
91
|
+
flowchart LR
|
|
92
|
+
cfg["Config in goose.yaml"] -- goose upgrade --> lf
|
|
93
|
+
lf["Lock files under .goose/"] -- goose run --> env
|
|
94
|
+
env["Environments"]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- Invoking `goose upgrade` creates lock files under the in-tree `.goose` directory.
|
|
98
|
+
- Invoking `goose run` creates out-of-tree environments from the lock files. By default
|
|
99
|
+
they live under `~/.cache/goose`.
|
|
100
|
+
- Hooks are executed in the generated environments.
|
|
101
|
+
|
|
87
102
|
## Usage
|
|
88
103
|
|
|
89
104
|
Create a `goose.yaml` file in the repository root.
|
|
@@ -114,13 +129,13 @@ hooks:
|
|
|
114
129
|
Bootstrap environments, generate lock files, and install dependencies.
|
|
115
130
|
|
|
116
131
|
```sh
|
|
117
|
-
$
|
|
132
|
+
$ goose upgrade
|
|
118
133
|
```
|
|
119
134
|
|
|
120
135
|
Run all hooks over all files.
|
|
121
136
|
|
|
122
137
|
```sh
|
|
123
|
-
$
|
|
138
|
+
$ goose run --select=all
|
|
124
139
|
```
|
|
125
140
|
|
|
126
141
|
Commit configuration and lock files.
|
|
@@ -137,7 +152,7 @@ configuration to upgrade hook dependency versions, instead you just run the upgr
|
|
|
137
152
|
command.
|
|
138
153
|
|
|
139
154
|
```sh
|
|
140
|
-
$
|
|
155
|
+
$ goose upgrade
|
|
141
156
|
$ git add .goose
|
|
142
157
|
$ git commit -m 'Bump goose dependencies'
|
|
143
158
|
```
|
|
@@ -22,6 +22,7 @@ ruff.toml
|
|
|
22
22
|
src/git_goose.egg-info/PKG-INFO
|
|
23
23
|
src/git_goose.egg-info/SOURCES.txt
|
|
24
24
|
src/git_goose.egg-info/dependency_links.txt
|
|
25
|
+
src/git_goose.egg-info/entry_points.txt
|
|
25
26
|
src/git_goose.egg-info/requires.txt
|
|
26
27
|
src/git_goose.egg-info/top_level.txt
|
|
27
28
|
src/goose/__init__.py
|
|
@@ -2,14 +2,9 @@ import asyncio
|
|
|
2
2
|
import functools
|
|
3
3
|
from collections.abc import Callable
|
|
4
4
|
from collections.abc import Coroutine
|
|
5
|
-
from typing import ParamSpec
|
|
6
|
-
from typing import TypeVar
|
|
7
5
|
|
|
8
|
-
P = ParamSpec("P")
|
|
9
|
-
R = TypeVar("R")
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
def asyncio_entrypoint(
|
|
7
|
+
def asyncio_entrypoint[R, **P](
|
|
13
8
|
fn: Callable[P, Coroutine[None, None, R]],
|
|
14
9
|
) -> Callable[P, R]:
|
|
15
10
|
@functools.wraps(fn)
|
|
@@ -6,7 +6,6 @@ from collections.abc import Iterable
|
|
|
6
6
|
from functools import total_ordering
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
from typing import Self
|
|
9
|
-
from typing import TypeVar
|
|
10
9
|
from typing import final
|
|
11
10
|
|
|
12
11
|
from pydantic import ValidationInfo
|
|
@@ -32,9 +31,6 @@ class LockFile(BaseModel):
|
|
|
32
31
|
return self.path < other.path
|
|
33
32
|
|
|
34
33
|
|
|
35
|
-
C = TypeVar("C", bound=Collection)
|
|
36
|
-
|
|
37
|
-
|
|
38
34
|
class LockManifest(BaseModel):
|
|
39
35
|
source_ecosystem: EcosystemConfig
|
|
40
36
|
source_dependencies: tuple[str, ...]
|
|
@@ -43,21 +39,21 @@ class LockManifest(BaseModel):
|
|
|
43
39
|
|
|
44
40
|
@field_validator("source_dependencies", "lock_files")
|
|
45
41
|
@classmethod
|
|
46
|
-
def validate_sorted(cls, v: C) -> C:
|
|
42
|
+
def validate_sorted[C: Collection](cls, v: C) -> C:
|
|
47
43
|
if sorted(v) != list(v):
|
|
48
44
|
raise ValueError("must be sorted")
|
|
49
45
|
return v
|
|
50
46
|
|
|
51
47
|
@field_validator("source_dependencies", "lock_files")
|
|
52
48
|
@classmethod
|
|
53
|
-
def validate_unique(cls, v: C) -> C:
|
|
49
|
+
def validate_unique[C: Collection](cls, v: C) -> C:
|
|
54
50
|
if len(set(v)) != len(v):
|
|
55
51
|
raise ValueError("must be unique")
|
|
56
52
|
return v
|
|
57
53
|
|
|
58
54
|
@field_validator("source_dependencies", "lock_files")
|
|
59
55
|
@classmethod
|
|
60
|
-
def validate_non_empty(cls, v: C) -> C:
|
|
56
|
+
def validate_non_empty[C: Collection](cls, v: C) -> C:
|
|
61
57
|
if len(v) == 0:
|
|
62
58
|
raise ValueError("must not be empty")
|
|
63
59
|
return v
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|