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.
Files changed (26) hide show
  1. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/PKG-INFO +1 -1
  2. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/bundles.py +7 -7
  3. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/setup.py +1 -1
  4. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/LICENSE +0 -0
  5. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/MANIFEST.in +0 -0
  6. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/README.md +0 -0
  7. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/__init__.py +0 -0
  8. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/api.py +0 -0
  9. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/builds.py +0 -0
  10. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/__base__.py +0 -0
  11. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/__init__.py +0 -0
  12. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/configure.py +0 -0
  13. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/create.py +0 -0
  14. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/init.py +0 -0
  15. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/push.py +0 -0
  16. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/commands/test.py +0 -0
  17. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/config/__init__.py +0 -0
  18. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/config/auth.py +0 -0
  19. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/config/config.py +0 -0
  20. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/console.py +0 -0
  21. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/fs.py +0 -0
  22. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/package.py +0 -0
  23. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli/registration.py +0 -0
  24. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/blocks_cli.egg-info/SOURCES.txt +0 -0
  25. {blocks-cli-0.1.25 → blocks-cli-0.1.26}/requirements.txt +0 -0
  26. {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.25
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 url
42
- response = requests.put(bundle_upload_url, files={
43
- "file": (zip_filename, open(zip_filename, "rb"))
44
- })
45
- response.raise_for_status()
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
- # remove the zip file
49
+ # Remove the zip file
50
50
  os.remove(zip_filename)
51
51
 
52
52
  return response.text
@@ -6,7 +6,7 @@ with open("requirements.txt") as f:
6
6
 
7
7
  setup(
8
8
  name="blocks-cli",
9
- version="0.1.25",
9
+ version="0.1.26",
10
10
  packages=find_packages(),
11
11
  include_package_data=True,
12
12
  install_requires=requirements,
File without changes
File without changes
File without changes
File without changes