workpeg 0.4.0__tar.gz → 0.4.1__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.0/src/workpeg.egg-info → workpeg-0.4.1}/PKG-INFO +1 -1
  2. {workpeg-0.4.0 → workpeg-0.4.1}/pyproject.toml +1 -1
  3. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/submit.py +10 -10
  4. {workpeg-0.4.0 → workpeg-0.4.1/src/workpeg.egg-info}/PKG-INFO +1 -1
  5. {workpeg-0.4.0 → workpeg-0.4.1}/LICENSE +0 -0
  6. {workpeg-0.4.0 → workpeg-0.4.1}/MANIFEST.in +0 -0
  7. {workpeg-0.4.0 → workpeg-0.4.1}/README.md +0 -0
  8. {workpeg-0.4.0 → workpeg-0.4.1}/setup.cfg +0 -0
  9. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/__init__.py +0 -0
  10. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/build.py +0 -0
  11. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/cli.py +0 -0
  12. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/config.py +0 -0
  13. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/context.py +0 -0
  14. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/create_new.py +0 -0
  15. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/run.py +0 -0
  16. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/runtime.py +0 -0
  17. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/templates/__init__.py +0 -0
  18. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/templates/functions/Dockerfile +0 -0
  19. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/templates/functions/LICENSE +0 -0
  20. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/templates/functions/README.md +0 -0
  21. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/templates/functions/app/__init__.py +0 -0
  22. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/templates/functions/app/main.py +0 -0
  23. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg/templates/functions/requirements.txt +0 -0
  24. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg.egg-info/SOURCES.txt +0 -0
  25. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg.egg-info/dependency_links.txt +0 -0
  26. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg.egg-info/entry_points.txt +0 -0
  27. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg.egg-info/requires.txt +0 -0
  28. {workpeg-0.4.0 → workpeg-0.4.1}/src/workpeg.egg-info/top_level.txt +0 -0
  29. {workpeg-0.4.0 → workpeg-0.4.1}/tests/test_build.py +0 -0
  30. {workpeg-0.4.0 → workpeg-0.4.1}/tests/test_cli.py +0 -0
  31. {workpeg-0.4.0 → workpeg-0.4.1}/tests/test_context.py +0 -0
  32. {workpeg-0.4.0 → workpeg-0.4.1}/tests/test_create_new.py +0 -0
  33. {workpeg-0.4.0 → workpeg-0.4.1}/tests/test_run.py +0 -0
  34. {workpeg-0.4.0 → workpeg-0.4.1}/tests/test_runtime.py +0 -0
  35. {workpeg-0.4.0 → workpeg-0.4.1}/tests/test_submit.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workpeg
3
- Version: 0.4.0
3
+ Version: 0.4.1
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.0"
7
+ version = "0.4.1"
8
8
  description = "Workpeg function runtime and SDK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -24,20 +24,20 @@ def _fail(msg: str, code: int = 2) -> None:
24
24
 
25
25
  def parse_ref(ref: str) -> Tuple[str, str]:
26
26
  """
27
- Parse "function_name:version"
27
+ Parse "branch_name:version"
28
28
  """
29
29
  if ":" not in ref:
30
- _fail("Expected <function_name>:<version> (example: fn_echo:1.0.0)")
31
- function_id, version = ref.split(":", 1)
32
- function_id = function_id.strip()
30
+ _fail("Expected <branch_name>:<version> (example: fn_echo:1.0.0)")
31
+ branch_name, version = ref.split(":", 1)
32
+ branch_name = branch_name.strip()
33
33
  version = version.strip()
34
34
 
35
- if not function_id:
36
- _fail("function_name is empty")
35
+ if not branch_name:
36
+ _fail("branch_name is empty")
37
37
  if not version:
38
38
  _fail("version is empty")
39
39
 
40
- return function_id, version
40
+ return branch_name, version
41
41
 
42
42
 
43
43
  def decode_jwt_payload_no_verify(token: str) -> dict:
@@ -143,7 +143,7 @@ def main(argv=None) -> None:
143
143
  description="Submit a Workpeg function bundle to a Peg.")
144
144
  parser.add_argument(
145
145
  "ref",
146
- help="Function reference in the form <function_name>:<version>"
146
+ help="Function reference in the form <branch_name>:<version>"
147
147
  " (e.g., fn_echo:1.0.0)")
148
148
  parser.add_argument("--api", default=os.environ.get(API_ENV,
149
149
  DEFAULT_API_BASE), help="API base URL")
@@ -157,7 +157,7 @@ def main(argv=None) -> None:
157
157
  if not token:
158
158
  _fail(f"Missing env var {JWT_ENV}")
159
159
 
160
- function_id, version = parse_ref(args.ref)
160
+ branch_name, version = parse_ref(args.ref)
161
161
 
162
162
  payload = decode_jwt_payload_no_verify(token)
163
163
  peg_id = payload.get("peg_namespace")
@@ -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=function_id,
176
+ function_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.0
3
+ Version: 0.4.1
4
4
  Summary: Workpeg function runtime and SDK
5
5
  Author-email: Workpeg <support@workpeg.com>
6
6
  License: MIT
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