Package: poetrify
PoetrifyInstallationPipfile or requirements.txt(this is trial) to pyproject.toml for Poetry.pipinstallpoetrifyrequiredpoetrycommand (See:https://poetry.eustace.io/docs/#installatio)Usage$poetrify
Poetrifyversion0.3.0

USAGEpoetrify[-h][-q][-v[<...>]][-V][--ansi][--no-ansi][-n]<command>[<arg1>]...[<argN>]ARGUMENTS<command>Thecommandtoexecute<arg>TheargumentsofthecommandGLOBALOPTIONS-h(--help)Displaythishelpmessage-q(--quiet)Donotoutputanymessage-v(--verbose)Increasetheverbosityofmessages:"-v"fornormaloutput,"-vv"formoreverboseoutputand"-vvv"fordebug-V(--version)Displaythisapplicationversion--ansiForceANSIoutput--no-ansiDisableANSIoutput-n(--no-interaction)Donotaskanyinteractivequestion

AVAILABLECOMMANDScompletionsGeneratecompletionscriptsforyourshell.generateGeneratepyproject.tomlfromthesourcefilehelpDisplaythemanualofacommandExample structure::$tree.
.
├──app.py
├──LICENSE
├──Pipfile
└──Pipfile.lockThegeneratecommand sets the way forpoetry init$poetrifygenerate
Generatedinitcommand:

poetryinit--dependency=rauth--dependency=requests--dependency=requests-cache--dependency=furl--dependency=arrow--dependency=pytest--dependency=responses--dev-dependency=pytest--dev-dependency=pytest-cov--dev-dependency=pytest-flake8--dev-dependency=responses--dev-dependency=pytest-runner--license=MIT

Executetheabovecommand.Also,thefollowingoutputisduetoPoetry.

Thiscommandwillguideyouthroughcreatingyourpyproject.tomlconfig.

Packagename[foo]:
...TrialAlso supported to requirements.txt on a trial basis.Please specifyrequirements.txtfor--srcoption. The default value of this option is Pipfile.$poetryrunpipfreeze>requirements.txt

$catrequirements.txt
aspy.yaml==1.1.1atomicwrites==1.2.1attrs==18.2.0certifi==2018.11.29cfgv==1.4.0chardet==3.0.4cleo==0.7.2Click==7.0clikit==0.2.3coverage==4.5.2identify==1.1.8idna==2.8
importlib-metadata==0.8incremental==17.5.0Jinja2==2.10licensename==0.4.2MarkupSafe==1.1.0
more-itertools==5.0.0nodeenv==1.3.3pastel==0.1.0pluggy==0.8.1
-egit+https://github.com/kk6/poetrify.git@63a861cba868298c896888f5104230c4a00896bb#egg=poetrify
pre-commit==1.14.2py==1.7.0pylev==1.3.0pytest==3.10.1
pytest-cov==2.6.1PyYAML==3.13requests==2.21.0six==1.12.0toml==0.10.0tomlkit==0.5.3towncrier==18.6.0Unidecode==1.0.23urllib3==1.24.1virtualenv==16.2.0zipp==0.3.3

$poetrifygenerate-d-srequirements.txt
Generatedinitcommand:

poetryinit--dependency=cleo--dependency=licensename--dependency=pre-commit--dependency=pytest-cov--dependency=requests--dependency=tomlkit--dependency=towncrier--license=MITAs you can see, poetrify extract only descendants packages from all the packages listed inrequirements.txtand pass only those to poetry. This is to preventpyproject.tomlfrom becoming full of package names.AutocompletionDescriptionOne can generate a completion script forpoetrifythat is compatible with a given shell. The
script is output onstdoutallowing one to re-direct the output to the file of their choosing.
Where you place the file will depend on which shell, and which operating system you are using. Your particular
configuration may also determine where these scripts need to be placed.Here are some common set ups for the three supported shells under Unix and similar operating systems (such as
GNU/Linux).BASHbashCompletion files are commonly stored in/etc/bash_completion.d/Run the command:poetrify completions bash > /etc/bash_completion.d/poetrify.bash-completionThis installs the completion script. You may have to log out and log back in to your shell session for the changes to
take effect.FISHFish completion files are commonly stored in$HOME/.config/fish/completionsRun the command:poetrify completions fish > ~/.config/fish/completions/poetrify.fishThis installs the completion script. You may have to log out and log back in to your shell session for the changes to
take effect.ZSHZSH completions are commonly stored in any directory listed in your$fpathvariable. To use these
completions, you must either add the generated script to one of those directories, or add your own to this list.Adding a custom directory is often the safest best if you're unsure of which directory to use. First create the
directory, for this example we'll create a hidden directory inside our$HOMEdirectorymkdir ~/.zfuncThen add the following lines to your.zshrcjust beforecompinitfpath+=~/.zfuncNow you can install the completions script using the following commandpoetrify completions zsh > ~/.zfunc/_poetrifyYou must then either log out and log back in, or simply runexec zshFor the new completions to take affect.CUSTOM LOCATIONSAlternatively, you could save these files to the place of your choosing, such as a custom directory inside your
$HOME. Doing so will require you to add the proper directives, such assourceing inside your login script. Consult
your shells documentation for how to add such directives.