Package: poetry-pyinvoke-plugin
poetry-pyinvoke-pluginA plugin for poetry that allows you to invoke commands in yourtasks.pyfile delegating topyinvoke.Heavily inspired by the work fromkeattangon thepoetry-exec-pluginproject.poetry-pyinvoke-pluginInstallationQuickstartUser GuideConfigurationCommand Line UsageQuickstartDetailed Command UsageList All TasksRun a TaskTasks with ArgumentsSingular Positional ArgumentNamed ArgumentsMultiple Named ArgumentsTask HelpPlugin HelpInvoke HelpPublishingContributingInstallationInstallation requires poetry 1.6.0+. To install this plugin run:pipinstallpoetry-pyinvoke-plugin# ORpoetryselfaddpoetry-pyinvoke-pluginFor other methods of installing plugins see thepoetry documentation.QuickstartSeeConfigurationfor details on how to setup atasks.pyfile.List all tasks:poetryinv----listRun a task:poetryinvokelint# ORpoetryinvlintUser GuideConfigurationtasks.pyfrominvokeimporttask@taskdeflint(c):c.run("flake8")c.run("black --check .")Command Line UsageQuickstartThen:poetryinv----listExample Output:Invoke:invoke--listAvailabletasks:buildBuildwheel.formatAutoformatcodeforcodestyle.greetingExampletaskthattakesanargumentfortestingpurposes.lintLintingandstylechecking.testRuntestsuite.Run a task:poetryinvokelint# ORpoetryinvlintYou can use eitherpoetry invokeorpoetry inv. The rest of this documentation will usepoetry inv.Detailed Command UsageList All TasksThis uses--to break the arguments topoetryand lets the remainder get passed toinvoke.Command:poetryinv----listExample Output:Invoke:invoke--listAvailabletasks:buildBuildwheel.formatAutoformatcodeforcodestyle.greetingExampletaskthattakesanargumentfortestingpurposes.lintLintingandstylechecking.testRuntestsuite.Run a TaskCommand:poetryinvlintExample Output:Invoke:invokelintAlldone!✨🍰✨3fileswouldbeleftunchanged.
Skipped3files
Success:noissuesfoundin2sourcefilesTasks with ArgumentsSingular Positional ArgumentCommand:poetryinvgreetingLokiExample Output:Invoke:invokegreetingLoki

HelloLoki,fromSylvieCommand:poetryinvgreeting--LokiExample Output:Invoke:invokegreetingLoki

HelloLoki,fromSylvieNamed ArgumentsCommand:poetryinvgreeting----nameLokiExample Output:Invoke:invokegreeting--nameLoki

HelloLoki,fromSylvieCommand:poetryinvgreeting---nLokiExample Output:Invoke:invokegreeting-nLoki

HelloLoki,fromSylvieMultiple Named ArgumentsCommand:poetryinvgreeting----nameLoki--otherThorExample Output:Invoke:invokegreeting--nameLoki--otherThor

HelloLoki,fromThorCommand:poetryinvgreeting---nLoki-oThorExample Output:Invoke:invokegreeting-nLoki-oThor

HelloLoki,fromThorTask HelpThis uses--to break the arguments topoetryand lets the remainder get passed toinvoke. It also uses--helppositionally before thetaskcommand to get help for it.Command:poetryinv----helpgreetingExample Output:Invoke:invoke--helpgreeting

Usage:inv[oke][--core-opts]greeting[--options][othertaskshere...]Docstring:Exampletaskthattakesanargumentfortestingpurposes.

Options:-nSTRING,--name=STRING-oSTRING,--other=STRINGPlugin HelpCommand:poetryinv--helpExample Output:Description:Delegateouttopyinvoketasksspecifiedinyourtasks.pyfile

Usage:inv[options][--]<cmd>[<arguments>...]Arguments:cmdThecommandtorunfromyourtasks.py.argumentsAdditionalargumentstoappendtothecommand.Invoke HelpThis uses--to break the arguments topoetryand lets the remainder get passed toinvoke.Command:poetryinv----helpExample Output:Invoke:invoke--helpUsage:inv[oke][--core-opts]task1[--task1-opts]...taskN[--taskN-opts]PublishingTo publish a new version create a release frommain(after pull request).ContributingAt all times, you have the power to fork this project, make changes as you see fit and then:pipinstallhttps://github.com/user/repository/archive/branch.zipStackoverflow: pip install from github branchThat way you can run from your own custom fork in the interim or even in-house your work and simply use this project as a starting point. That is totally ok.However if you would like to contribute your changes back, then open a Pull Request "across forks".Once your changes are merged and published you can revert to the canonical version ofpip installing this package.If you're not sure how to make changes orifyou should sink the time and effort, then open an Issue instead and we can have a chat to triage the issue.