blocks-cli 0.1.25__tar.gz → 0.1.26__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.
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/PKG-INFO +1 -1
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/bundles.py +7 -7
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/setup.py +1 -1
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/LICENSE +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/MANIFEST.in +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/README.md +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/__init__.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/api.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/builds.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/__base__.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/__init__.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/configure.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/create.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/init.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/push.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/test.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/config/__init__.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/config/auth.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/config/config.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/console.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/fs.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/package.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/registration.py +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli.egg-info/SOURCES.txt +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/requirements.txt +0 -0
- {blocks-cli-0.1.25 → blocks-cli-0.1.26}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: blocks-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.26
|
|
4
4
|
Summary: CLI tool for Blocks, a platform for writing custom AI-enabled codebase automations in Python. Leverage a full codebase-aware API. Automatically trigger automations from Github, Slack, and other providers.
|
|
5
5
|
Home-page: https://github.com/BlocksOrg/sdk
|
|
6
6
|
Author: BlocksOrg
|
|
@@ -12,6 +12,7 @@ def get_bundle_upload_url():
|
|
|
12
12
|
response.raise_for_status()
|
|
13
13
|
return response.json()
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
def upload_bundle_zip(bundle_upload_url: str, base_path: Path):
|
|
16
17
|
try:
|
|
17
18
|
# Generate a unique ID for the run
|
|
@@ -31,22 +32,21 @@ def upload_bundle_zip(bundle_upload_url: str, base_path: Path):
|
|
|
31
32
|
continue
|
|
32
33
|
file_path = os.path.join(root, file)
|
|
33
34
|
arcname = os.path.relpath(file_path, base_path)
|
|
34
|
-
|
|
35
35
|
zipf.write(file_path, arcname)
|
|
36
36
|
|
|
37
37
|
# Confirm the creation of the zip file
|
|
38
38
|
if not os.path.exists(zip_filename):
|
|
39
39
|
raise Exception(f"Failed to create {zip_filename}")
|
|
40
40
|
|
|
41
|
-
# Upload the zip file to presigned S3
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
# Upload the zip file to presigned S3 URL
|
|
42
|
+
with open(zip_filename, "rb") as f:
|
|
43
|
+
response = requests.put(bundle_upload_url, data=f, headers={"Content-Type": "application/zip"})
|
|
44
|
+
response.raise_for_status()
|
|
45
|
+
|
|
46
46
|
except Exception:
|
|
47
47
|
raise
|
|
48
48
|
finally:
|
|
49
|
-
#
|
|
49
|
+
# Remove the zip file
|
|
50
50
|
os.remove(zip_filename)
|
|
51
51
|
|
|
52
52
|
return response.text
|
|
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
|