poetry-plugin-ivcap 0.1.0__tar.gz → 0.2.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: poetry-plugin-ivcap
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: A custom Poetry command for IVCAP deployments
5
5
  License: MIT
6
6
  Author: Max Ott
@@ -40,8 +40,44 @@ poetry self add poetry-plugin-ivcap
40
40
  ## Usage
41
41
 
42
42
  ```bash
43
- poetry ivcap
44
- poetry ivcap docker
43
+ poetry ivcap run
44
+ poetry ivcap docker-build
45
+ poetry ivcap docker-run
46
+ poetry ivcap docker-publish
47
+ poetry ivcap service-register
48
+ poetry ivcap create-service-id
49
+ poetry ivcap tool-register
50
+ ```
51
+
52
+ To get help on the currently installed version
53
+ ```
54
+ % poetry ivcap
55
+
56
+ IVCAP plugin
57
+
58
+ Supporting the development of services and tools for the IVCAP platform
59
+
60
+ Available subcommands:
61
+ run Run the service locally
62
+ docker-build Build the docker image for this service
63
+ docker-run Run the service's docker image locally
64
+ docker-publish Publish the service's docker image to IVCAP
65
+ service-register Register the service with IVCAP
66
+ create-service-id Create a unique service ID for the service
67
+ tool-register Register the service as an AI Tool with IVCAP
68
+
69
+ Example:
70
+ poetry ivcap run
71
+
72
+ Configurable optiosn in pyproject.toml:
73
+
74
+ [tool.poetry-plugin-ivcap]
75
+ service-file = "service.py" # The Python file that implements the service
76
+ service-file = "service.py"
77
+ service-id = "urn:ivcap:service:ac158a1f-dfb4-5dac-bf2e-9bf15e0f2cc7" # A unique identifier for the service
78
+
79
+ docker-build-template = "docker buildx build -t #DOCKER_NAME# ."
80
+ docker-run-template = "docker run -rm -p #PORT#:#PORT#"
45
81
  ```
46
82
 
47
83
  ## Development
@@ -0,0 +1,101 @@
1
+ # poetry-plugin-ivcap
2
+
3
+ A custom Poetry plugin that adds a `poetry ivcap` command for local and Docker-based deployments.
4
+
5
+ ## Example Configuration
6
+
7
+ Add to your `pyproject.toml`:
8
+
9
+ ```toml
10
+ [tool.poetry-plugin-ivcap]
11
+ default_target = "docker"
12
+ docker_tag = "myapp:dev"
13
+ ```
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ poetry self add poetry-plugin-ivcap
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```bash
24
+ poetry ivcap run
25
+ poetry ivcap docker-build
26
+ poetry ivcap docker-run
27
+ poetry ivcap docker-publish
28
+ poetry ivcap service-register
29
+ poetry ivcap create-service-id
30
+ poetry ivcap tool-register
31
+ ```
32
+
33
+ To get help on the currently installed version
34
+ ```
35
+ % poetry ivcap
36
+
37
+ IVCAP plugin
38
+
39
+ Supporting the development of services and tools for the IVCAP platform
40
+
41
+ Available subcommands:
42
+ run Run the service locally
43
+ docker-build Build the docker image for this service
44
+ docker-run Run the service's docker image locally
45
+ docker-publish Publish the service's docker image to IVCAP
46
+ service-register Register the service with IVCAP
47
+ create-service-id Create a unique service ID for the service
48
+ tool-register Register the service as an AI Tool with IVCAP
49
+
50
+ Example:
51
+ poetry ivcap run
52
+
53
+ Configurable optiosn in pyproject.toml:
54
+
55
+ [tool.poetry-plugin-ivcap]
56
+ service-file = "service.py" # The Python file that implements the service
57
+ service-file = "service.py"
58
+ service-id = "urn:ivcap:service:ac158a1f-dfb4-5dac-bf2e-9bf15e0f2cc7" # A unique identifier for the service
59
+
60
+ docker-build-template = "docker buildx build -t #DOCKER_NAME# ."
61
+ docker-run-template = "docker run -rm -p #PORT#:#PORT#"
62
+ ```
63
+
64
+ ## Development
65
+
66
+ ### Build the Plugin Package
67
+
68
+ ```bash
69
+ poetry build
70
+ ```
71
+
72
+ This creates .whl and .tar.gz files in the dist/ directory.
73
+
74
+ ### Publish to PyPI
75
+
76
+ Create an account at https://pypi.org/account/register/
77
+
78
+ Add your credentials:
79
+ ```bash
80
+ poetry config pypi-token.pypi <your-token>
81
+ ```
82
+
83
+ Publish:
84
+ ```bash
85
+ poetry publish --build
86
+ ```
87
+
88
+ ### Optional: Test on TestPyPI First
89
+
90
+ To verify your setup without publishing to the real PyPI:
91
+
92
+ ```bash
93
+ poetry config repositories.test-pypi https://test.pypi.org/legacy/
94
+ poetry publish -r test-pypi --build
95
+ ```
96
+
97
+ Then test installing via:
98
+
99
+ ```bash
100
+ poetry self add --source test-pypi poetry-plugin-deploy
101
+ ```
@@ -16,14 +16,32 @@ class IvcapCommand(Command):
16
16
  name = "ivcap"
17
17
  description = "IVCAP plugin `poetry ivcap <subcommand>`"
18
18
  help = """\
19
+
19
20
  IVCAP plugin
20
21
 
22
+ Supporting the development of services and tools for the IVCAP platform
23
+
21
24
  Available subcommands:
22
- run Run the configured service
23
- deploy Deploy using configured settings
25
+ run Run the service locally
26
+ docker-build Build the docker image for this service
27
+ docker-run Run the service's docker image locally
28
+ docker-publish Publish the service's docker image to IVCAP
29
+ service-register Register the service with IVCAP
30
+ create-service-id Create a unique service ID for the service
31
+ tool-register Register the service as an AI Tool with IVCAP
24
32
 
25
33
  Example:
26
34
  poetry ivcap run
35
+
36
+ Configurable optiosn in pyproject.toml:
37
+
38
+ [tool.poetry-plugin-ivcap]
39
+ service-file = "service.py" # The Python file that implements the service
40
+ service-file = "service.py"
41
+ service-id = "urn:ivcap:service:ac158a1f-dfb4-5dac-bf2e-9bf15e0f2cc7" # A unique identifier for the service
42
+
43
+ docker-build-template = "docker buildx build -t #DOCKER_NAME# ."
44
+ docker-run-template = "docker run -rm -p #PORT#:#PORT#"
27
45
  """
28
46
  arguments = [
29
47
  argument("subcommand", optional=True, description="Subcommand: run, deploy, etc.")
@@ -50,7 +68,9 @@ Example:
50
68
  elif sub == "tool-register":
51
69
  tool_register(data, self.line)
52
70
  else:
53
- self.line(f"<error>Unknown subcommand: {sub}</error>")
71
+ if not (sub == None or sub == "help"):
72
+ self.line(f"<error>Unknown subcommand: {sub}</error>")
73
+ print(self.help)
54
74
 
55
75
  def run_service(self, data):
56
76
  config = data.get("tool", {}).get("poetry-plugin-ivcap", {})
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "poetry-plugin-ivcap"
3
- version = "0.1.0"
3
+ version = "0.2.0"
4
4
  description = "A custom Poetry command for IVCAP deployments"
5
5
  authors = ["Max Ott <max.ott@csiro.au>"]
6
6
  license = "MIT"
@@ -1,65 +0,0 @@
1
- # poetry-plugin-ivcap
2
-
3
- A custom Poetry plugin that adds a `poetry ivcap` command for local and Docker-based deployments.
4
-
5
- ## Example Configuration
6
-
7
- Add to your `pyproject.toml`:
8
-
9
- ```toml
10
- [tool.poetry-plugin-ivcap]
11
- default_target = "docker"
12
- docker_tag = "myapp:dev"
13
- ```
14
-
15
- ## Installation
16
-
17
- ```bash
18
- poetry self add poetry-plugin-ivcap
19
- ```
20
-
21
- ## Usage
22
-
23
- ```bash
24
- poetry ivcap
25
- poetry ivcap docker
26
- ```
27
-
28
- ## Development
29
-
30
- ### Build the Plugin Package
31
-
32
- ```bash
33
- poetry build
34
- ```
35
-
36
- This creates .whl and .tar.gz files in the dist/ directory.
37
-
38
- ### Publish to PyPI
39
-
40
- Create an account at https://pypi.org/account/register/
41
-
42
- Add your credentials:
43
- ```bash
44
- poetry config pypi-token.pypi <your-token>
45
- ```
46
-
47
- Publish:
48
- ```bash
49
- poetry publish --build
50
- ```
51
-
52
- ### Optional: Test on TestPyPI First
53
-
54
- To verify your setup without publishing to the real PyPI:
55
-
56
- ```bash
57
- poetry config repositories.test-pypi https://test.pypi.org/legacy/
58
- poetry publish -r test-pypi --build
59
- ```
60
-
61
- Then test installing via:
62
-
63
- ```bash
64
- poetry self add --source test-pypi poetry-plugin-deploy
65
- ```