primitive 0.1.76__tar.gz → 0.1.77__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.
- {primitive-0.1.76 → primitive-0.1.77}/PKG-INFO +4 -13
- {primitive-0.1.76 → primitive-0.1.77}/README.md +3 -12
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/__about__.py +1 -1
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/agent/process.py +25 -1
- {primitive-0.1.76 → primitive-0.1.77}/uv.lock +1 -1
- {primitive-0.1.76 → primitive-0.1.77}/.git-hooks/pre-commit +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/.gitattributes +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/.github/workflows/lint.yml +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/.github/workflows/publish.yml +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/.gitignore +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/.vscode/settings.json +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/LICENSE.txt +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/Makefile +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/linux setup.md +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/pyproject.toml +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/agent/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/agent/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/agent/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/agent/provision.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/agent/runner.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/agent/uploader.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/auth/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/auth/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/auth/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/auth/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/auth/graphql/queries.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/cli.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/client.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/daemons/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/daemons/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/daemons/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/daemons/launch_agents.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/daemons/launch_service.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/exec/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/exec/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/exec/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/exec/interactive.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/files/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/files/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/files/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/files/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/files/graphql/fragments.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/files/graphql/mutations.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/files/graphql/queries.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/git/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/git/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/git/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/git/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/git/graphql/queries.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/graphql/relay.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/graphql/sdk.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/graphql/utility_fragments.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/hardware/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/hardware/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/hardware/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/hardware/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/hardware/graphql/fragments.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/hardware/graphql/mutations.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/hardware/graphql/queries.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/jobs/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/jobs/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/jobs/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/jobs/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/jobs/graphql/fragments.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/jobs/graphql/mutations.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/jobs/graphql/queries.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/organizations/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/organizations/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/organizations/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/organizations/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/organizations/graphql/fragments.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/organizations/graphql/mutations.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/organizations/graphql/queries.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/projects/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/projects/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/projects/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/projects/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/projects/graphql/fragments.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/projects/graphql/mutations.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/projects/graphql/queries.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/provisioning/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/provisioning/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/provisioning/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/provisioning/graphql/queries.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/reservations/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/reservations/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/reservations/commands.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/reservations/graphql/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/reservations/graphql/fragments.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/reservations/graphql/mutations.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/reservations/graphql/queries.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/__init__.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/actions.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/auth.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/cache.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/chunk_size.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/config.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/files.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/git.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/memory_size.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/printer.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/shell.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/src/primitive/utils/verible.py +0 -0
- {primitive-0.1.76 → primitive-0.1.77}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: primitive
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.77
|
4
4
|
Project-URL: Documentation, https://github.com//primitivecorp/primitive-cli#readme
|
5
5
|
Project-URL: Issues, https://github.com//primitivecorp/primitive-cli/issues
|
6
6
|
Project-URL: Source, https://github.com//primitivecorp/primitive-cli
|
@@ -98,19 +98,10 @@ git config --global user.name “<firstName lastName>”
|
|
98
98
|
brew install make
|
99
99
|
fish_add_path /opt/homebrew/opt/make/libexec/gnubin
|
100
100
|
|
101
|
-
# install pyenv (python version manager)
|
102
|
-
brew install pyenv
|
103
|
-
set -Ux PYENV_ROOT $HOME/.pyenv
|
104
|
-
fish_add_path $PYENV_ROOT/bin
|
105
|
-
echo 'pyenv init - | source' >> ~/.config/fish/config.fish
|
106
|
-
|
107
|
-
# install the latest version of python
|
108
|
-
pyenv install 3.12.2
|
109
|
-
pyenv global 3.12.2
|
110
|
-
pip install --upgrade pip
|
111
|
-
|
112
101
|
# install uv
|
113
|
-
|
102
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
103
|
+
uv python install
|
104
|
+
fish_add_path "$(uv python dir)/bin"
|
114
105
|
```
|
115
106
|
|
116
107
|
### Repository Setup
|
@@ -69,19 +69,10 @@ git config --global user.name “<firstName lastName>”
|
|
69
69
|
brew install make
|
70
70
|
fish_add_path /opt/homebrew/opt/make/libexec/gnubin
|
71
71
|
|
72
|
-
# install pyenv (python version manager)
|
73
|
-
brew install pyenv
|
74
|
-
set -Ux PYENV_ROOT $HOME/.pyenv
|
75
|
-
fish_add_path $PYENV_ROOT/bin
|
76
|
-
echo 'pyenv init - | source' >> ~/.config/fish/config.fish
|
77
|
-
|
78
|
-
# install the latest version of python
|
79
|
-
pyenv install 3.12.2
|
80
|
-
pyenv global 3.12.2
|
81
|
-
pip install --upgrade pip
|
82
|
-
|
83
72
|
# install uv
|
84
|
-
|
73
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
74
|
+
uv python install
|
75
|
+
fish_add_path "$(uv python dir)/bin"
|
85
76
|
```
|
86
77
|
|
87
78
|
### Repository Setup
|
@@ -1,7 +1,11 @@
|
|
1
|
+
from typing import List
|
2
|
+
from pathlib import Path
|
1
3
|
from subprocess import Popen, PIPE
|
2
4
|
import shlex
|
5
|
+
import glob
|
3
6
|
import selectors
|
4
7
|
from loguru import logger
|
8
|
+
from abc import abstractmethod
|
5
9
|
|
6
10
|
|
7
11
|
class Process:
|
@@ -11,7 +15,9 @@ class Process:
|
|
11
15
|
env,
|
12
16
|
workdir: str = ".",
|
13
17
|
):
|
14
|
-
self.cmd =
|
18
|
+
self.cmd = Process.expand_glob_in_cmd(
|
19
|
+
cmd_parts=shlex.split(cmd), workdir=workdir
|
20
|
+
)
|
15
21
|
self.env = env
|
16
22
|
self.workdir = workdir
|
17
23
|
self.process = None
|
@@ -90,6 +96,24 @@ class Process:
|
|
90
96
|
if self.process:
|
91
97
|
self.process.kill()
|
92
98
|
|
99
|
+
@abstractmethod
|
100
|
+
def expand_glob_in_cmd(cmd_parts: List[str], workdir: Path):
|
101
|
+
# Characters that indicate a glob pattern
|
102
|
+
glob_chars = {"*", "?", "[", "]", "{", "}"}
|
103
|
+
expanded_cmd = []
|
104
|
+
for part in cmd_parts:
|
105
|
+
if any(c in part for c in glob_chars):
|
106
|
+
matches = glob.glob(str(workdir / part))
|
107
|
+
if matches:
|
108
|
+
expanded_cmd.extend(
|
109
|
+
[str(Path(match).relative_to(workdir)) for match in matches]
|
110
|
+
)
|
111
|
+
else:
|
112
|
+
expanded_cmd.append(part)
|
113
|
+
else:
|
114
|
+
expanded_cmd.append(part)
|
115
|
+
return expanded_cmd
|
116
|
+
|
93
117
|
@property
|
94
118
|
def errors(self) -> int:
|
95
119
|
return self._errors
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|