workpeg 0.4.1__tar.gz → 0.4.2__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 (35) hide show
  1. {workpeg-0.4.1/src/workpeg.egg-info → workpeg-0.4.2}/PKG-INFO +1 -1
  2. {workpeg-0.4.1 → workpeg-0.4.2}/pyproject.toml +1 -1
  3. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/submit.py +4 -4
  4. {workpeg-0.4.1 → workpeg-0.4.2/src/workpeg.egg-info}/PKG-INFO +1 -1
  5. {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_submit.py +5 -5
  6. {workpeg-0.4.1 → workpeg-0.4.2}/LICENSE +0 -0
  7. {workpeg-0.4.1 → workpeg-0.4.2}/MANIFEST.in +0 -0
  8. {workpeg-0.4.1 → workpeg-0.4.2}/README.md +0 -0
  9. {workpeg-0.4.1 → workpeg-0.4.2}/setup.cfg +0 -0
  10. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/__init__.py +0 -0
  11. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/build.py +0 -0
  12. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/cli.py +0 -0
  13. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/config.py +0 -0
  14. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/context.py +0 -0
  15. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/create_new.py +0 -0
  16. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/run.py +0 -0
  17. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/runtime.py +0 -0
  18. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/__init__.py +0 -0
  19. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/Dockerfile +0 -0
  20. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/LICENSE +0 -0
  21. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/README.md +0 -0
  22. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/app/__init__.py +0 -0
  23. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/app/main.py +0 -0
  24. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/requirements.txt +0 -0
  25. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/SOURCES.txt +0 -0
  26. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/dependency_links.txt +0 -0
  27. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/entry_points.txt +0 -0
  28. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/requires.txt +0 -0
  29. {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/top_level.txt +0 -0
  30. {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_build.py +0 -0
  31. {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_cli.py +0 -0
  32. {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_context.py +0 -0
  33. {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_create_new.py +0 -0
  34. {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_run.py +0 -0
  35. {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_runtime.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workpeg
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Workpeg function runtime and SDK
5
5
  Author-email: Workpeg <support@workpeg.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "workpeg"
7
- version = "0.4.1"
7
+ version = "0.4.2"
8
8
  description = "Workpeg function runtime and SDK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -106,7 +106,7 @@ def submit_bundle(
106
106
  api_base: str,
107
107
  peg_id: str,
108
108
  token: str,
109
- function_id: str,
109
+ branch_id: str,
110
110
  version: str,
111
111
  bundle_bytes: bytes,
112
112
  timeout_s: int = 60,
@@ -117,7 +117,7 @@ def submit_bundle(
117
117
  "bundle": ("bundle.tar.gz", bundle_bytes, "application/gzip"),
118
118
  }
119
119
  data = {
120
- "function_id": function_id,
120
+ "branch_id": branch_id,
121
121
  "version": version,
122
122
  }
123
123
  headers = {
@@ -144,7 +144,7 @@ def main(argv=None) -> None:
144
144
  parser.add_argument(
145
145
  "ref",
146
146
  help="Function reference in the form <branch_name>:<version>"
147
- " (e.g., fn_echo:1.0.0)")
147
+ " (e.g., main:1.0.0)")
148
148
  parser.add_argument("--api", default=os.environ.get(API_ENV,
149
149
  DEFAULT_API_BASE), help="API base URL")
150
150
  parser.add_argument("--path", default=os.environ.get(PATH_ENV,
@@ -173,7 +173,7 @@ def main(argv=None) -> None:
173
173
  api_base=args.api,
174
174
  peg_id=str(peg_id),
175
175
  token=token,
176
- function_id=branch_name,
176
+ branch_id=branch_name,
177
177
  version=version,
178
178
  bundle_bytes=bundle_bytes,
179
179
  timeout_s=args.timeout,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workpeg
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Workpeg function runtime and SDK
5
5
  Author-email: Workpeg <support@workpeg.com>
6
6
  License: MIT
@@ -155,7 +155,7 @@ def test_submit_bundle_success_builds_request(mock_post):
155
155
  api_base="https://repo.workpeg.com",
156
156
  peg_id="peg-123",
157
157
  token="jwt-token",
158
- function_id="fn_echo",
158
+ branch_id="fn_echo",
159
159
  version="1.0.0",
160
160
  bundle_bytes=b"tgz-bytes",
161
161
  timeout_s=60,
@@ -168,7 +168,7 @@ def test_submit_bundle_success_builds_request(mock_post):
168
168
 
169
169
  assert args[0] == "https://repo.workpeg.com/api/pegs/peg-123/functions/"
170
170
  assert kwargs["headers"]["Authorization"] == "Bearer jwt-token"
171
- assert kwargs["data"] == {"function_id": "fn_echo", "version": "1.0.0"}
171
+ assert kwargs["data"] == {"branch_id": "fn_echo", "version": "1.0.0"}
172
172
  assert "files" in kwargs
173
173
  file_tuple = kwargs["files"]["bundle"]
174
174
  assert file_tuple[0] == "bundle.tar.gz"
@@ -189,7 +189,7 @@ def test_submit_bundle_http_error_json(mock_post):
189
189
  api_base="https://repo.workpeg.com",
190
190
  peg_id="peg-123",
191
191
  token="jwt-token",
192
- function_id="fn_echo",
192
+ branch_id="fn_echo",
193
193
  version="1.0.0",
194
194
  bundle_bytes=b"tgz-bytes",
195
195
  )
@@ -209,7 +209,7 @@ def test_submit_bundle_http_error_non_json(mock_post):
209
209
  api_base="https://repo.workpeg.com",
210
210
  peg_id="peg-123",
211
211
  token="jwt-token",
212
- function_id="fn_echo",
212
+ branch_id="fn_echo",
213
213
  version="1.0.0",
214
214
  bundle_bytes=b"tgz-bytes",
215
215
  )
@@ -265,7 +265,7 @@ def test_main_happy_path_uses_default_api_base(
265
265
  _, kwargs = mock_submit_bundle.call_args
266
266
  assert kwargs["api_base"] == "https://repo.workpeg.com"
267
267
  assert kwargs["peg_id"] == "peg-123"
268
- assert kwargs["function_id"] == "fn_echo"
268
+ assert kwargs["branch_id"] == "fn_echo"
269
269
  assert kwargs["version"] == "1.0.0"
270
270
  assert kwargs["token"] == token
271
271
  assert isinstance(kwargs["bundle_bytes"], (bytes, bytearray))
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