diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index e888423..9d00d47 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -25,4 +25,4 @@ jobs: contents: write pull-requests: write with: - plugin_path: "arcaflow_plugin_template_python/template_python_plugin.py" + plugin_path: "arcaflow_plugin_template_python/arcaflow_template_python_plugin.py" diff --git a/Dockerfile b/Dockerfile index 5648e8c..1f31009 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,7 @@ RUN python -m pip install -r requirements.txt WORKDIR /app/${package} -ENTRYPOINT ["python", "template_python_plugin.py"] +ENTRYPOINT ["python", "arcaflow_template_python_plugin.py"] CMD [] LABEL org.opencontainers.image.source="https://github.com/arcalot/arcaflow-plugin-template-python" diff --git a/arcaflow_plugin_template_python/template_python_plugin.py b/arcaflow_plugin_template_python/arcaflow_template_python_plugin.py similarity index 95% rename from arcaflow_plugin_template_python/template_python_plugin.py rename to arcaflow_plugin_template_python/arcaflow_template_python_plugin.py index 4b2260c..25fbbe7 100644 --- a/arcaflow_plugin_template_python/template_python_plugin.py +++ b/arcaflow_plugin_template_python/arcaflow_template_python_plugin.py @@ -3,7 +3,7 @@ import sys import typing from arcaflow_plugin_sdk import plugin -from template_python_schema import ( +from arcaflow_template_python_schema import ( InputParams, SuccessOutput, ErrorOutput, diff --git a/arcaflow_plugin_template_python/template_python_schema.py b/arcaflow_plugin_template_python/arcaflow_template_python_schema.py similarity index 100% rename from arcaflow_plugin_template_python/template_python_schema.py rename to arcaflow_plugin_template_python/arcaflow_template_python_schema.py diff --git a/pyproject.toml b/pyproject.toml index fbc125c..025b492 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Arcalot"] license = "Apache-2.0+GPL-2.0-only" packages = [ - { include="template_python_plugin.py", from="./arcaflow_plugin_template_python" }, + { include="arcaflow_template_python_plugin.py", from="./arcaflow_plugin_template_python" }, ] [tool.poetry.dependencies] diff --git a/tests/test_arcaflow_plugin_template_python.py b/tests/test_arcaflow_plugin_template_python.py index 7759ea5..c261d33 100644 --- a/tests/test_arcaflow_plugin_template_python.py +++ b/tests/test_arcaflow_plugin_template_python.py @@ -1,26 +1,26 @@ #!/usr/bin/env python3 import unittest -import template_python_plugin -from arcaflow_plugin_sdk import plugin +import arcaflow_template_python_plugin as plugin +from arcaflow_plugin_sdk import plugin as plugin_sdk class HelloWorldTest(unittest.TestCase): @staticmethod def test_serialization(): - plugin.test_object_serialization(template_python_plugin.InputParams("John Doe")) + plugin_sdk.test_object_serialization(plugin.InputParams("John Doe")) - plugin.test_object_serialization( - template_python_plugin.SuccessOutput("Hello, world!") + plugin_sdk.test_object_serialization( + plugin.SuccessOutput("Hello, world!") ) - plugin.test_object_serialization( - template_python_plugin.ErrorOutput(error="This is an error") + plugin_sdk.test_object_serialization( + plugin.ErrorOutput(error="This is an error") ) def test_functional(self): - input = template_python_plugin.InputParams(name="Example Joe") + input = plugin.InputParams(name="Example Joe") - output_id, output_data = template_python_plugin.hello_world( + output_id, output_data = plugin.hello_world( params=input, run_id="plugin_ci" ) @@ -28,7 +28,7 @@ def test_functional(self): self.assertEqual("success", output_id) self.assertEqual( output_data, - template_python_plugin.SuccessOutput("Hello, Example Joe!"), + plugin.SuccessOutput("Hello, Example Joe!"), )