From 9c48bd6d0a81e513ea7484018082f6736276d6ee Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Tue, 5 Apr 2022 15:22:46 +0200 Subject: [PATCH] rename package to poetry-plugin-export --- README.md | 8 ++++---- pyproject.toml | 6 +++--- .../__init__.py | 0 .../console/__init__.py | 0 .../console/commands/__init__.py | 0 .../console/commands/export.py | 3 ++- .../exporter.py | 0 .../plugins.py | 2 +- tests/console/test_export.py | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) rename src/{poetry_export_plugin => poetry_plugin_export}/__init__.py (100%) rename src/{poetry_export_plugin => poetry_plugin_export}/console/__init__.py (100%) rename src/{poetry_export_plugin => poetry_plugin_export}/console/commands/__init__.py (100%) rename src/{poetry_export_plugin => poetry_plugin_export}/console/commands/export.py (97%) rename src/{poetry_export_plugin => poetry_plugin_export}/exporter.py (100%) rename src/{poetry_export_plugin => poetry_plugin_export}/plugins.py (93%) diff --git a/README.md b/README.md index 2d08545..9c8b573 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Poetry export plugin +# Poetry Plugin: Export This package is a plugin that allows the export of locked packages to various formats. @@ -12,19 +12,19 @@ This plugin provides the same features as the existing `export` command of Poetr The easiest way to install the `export` plugin is via the `plugin add` command of Poetry. ```bash -poetry plugin add poetry-export-plugin +poetry plugin add poetry-plugin-export ``` If you used `pipx` to install Poetry you can add the plugin via the `pipx inject` command. ```bash -pipx inject poetry poetry-export-plugin +pipx inject poetry poetry-plugin-export ``` Otherwise, if you used `pip` to install Poetry you can add the plugin packages via the `pip install` command. ```bash -pip install poetry-export-plugin +pip install poetry-plugin-export ``` diff --git a/pyproject.toml b/pyproject.toml index 4cf6d1b..5c265c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "poetry-export-plugin" +name = "poetry-plugin-export" version = "0.2.1" description = "Poetry plugin to export the dependencies to various formats" authors = ["Sébastien Eustace "] @@ -7,7 +7,7 @@ license = "MIT" readme = "README.md" packages = [ - { include = "poetry_export_plugin", from = "src" } + { include = "poetry_plugin_export", from = "src" } ] include = [ @@ -25,7 +25,7 @@ pytest-mock = "^3.6.1" poetry = {git = "https://github.com/abn/poetry.git", rev = "use-export-plugin"} [tool.poetry.plugins."poetry.application.plugin"] -export = "poetry_export_plugin.plugins:ExportApplicationPlugin" +export = "poetry_plugin_export.plugins:ExportApplicationPlugin" [tool.black] target-version = ['py37'] diff --git a/src/poetry_export_plugin/__init__.py b/src/poetry_plugin_export/__init__.py similarity index 100% rename from src/poetry_export_plugin/__init__.py rename to src/poetry_plugin_export/__init__.py diff --git a/src/poetry_export_plugin/console/__init__.py b/src/poetry_plugin_export/console/__init__.py similarity index 100% rename from src/poetry_export_plugin/console/__init__.py rename to src/poetry_plugin_export/console/__init__.py diff --git a/src/poetry_export_plugin/console/commands/__init__.py b/src/poetry_plugin_export/console/commands/__init__.py similarity index 100% rename from src/poetry_export_plugin/console/commands/__init__.py rename to src/poetry_plugin_export/console/commands/__init__.py diff --git a/src/poetry_export_plugin/console/commands/export.py b/src/poetry_plugin_export/console/commands/export.py similarity index 97% rename from src/poetry_export_plugin/console/commands/export.py rename to src/poetry_plugin_export/console/commands/export.py index ff1202c..7a62f6d 100644 --- a/src/poetry_export_plugin/console/commands/export.py +++ b/src/poetry_plugin_export/console/commands/export.py @@ -3,7 +3,7 @@ from cleo.helpers import option from poetry.console.commands.installer_command import InstallerCommand -from poetry_export_plugin.exporter import Exporter +from poetry_plugin_export.exporter import Exporter class ExportCommand(InstallerCommand): @@ -73,6 +73,7 @@ def handle(self) -> None: ) exporter = Exporter(self.poetry) + print(exporter, "<<<<<<<") exporter.only_groups(list(self.activated_groups)) exporter.with_extras(self.option("extras")) exporter.with_hashes(not self.option("without-hashes")) diff --git a/src/poetry_export_plugin/exporter.py b/src/poetry_plugin_export/exporter.py similarity index 100% rename from src/poetry_export_plugin/exporter.py rename to src/poetry_plugin_export/exporter.py diff --git a/src/poetry_export_plugin/plugins.py b/src/poetry_plugin_export/plugins.py similarity index 93% rename from src/poetry_export_plugin/plugins.py rename to src/poetry_plugin_export/plugins.py index ea62a06..3666a19 100644 --- a/src/poetry_export_plugin/plugins.py +++ b/src/poetry_plugin_export/plugins.py @@ -4,7 +4,7 @@ from poetry.plugins.application_plugin import ApplicationPlugin -from poetry_export_plugin.console.commands.export import ExportCommand +from poetry_plugin_export.console.commands.export import ExportCommand if TYPE_CHECKING: diff --git a/tests/console/test_export.py b/tests/console/test_export.py index 5eaa70f..9ceec95 100644 --- a/tests/console/test_export.py +++ b/tests/console/test_export.py @@ -7,7 +7,7 @@ from poetry.core.packages.package import Package -from poetry_export_plugin.exporter import Exporter +from poetry_plugin_export.exporter import Exporter from tests.markers import MARKER_PY