{ "info": { "author": "kk6", "author_email": "hiro.ashiya@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Code Generators" ], "description": "# Poetrify\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b6382d985bf745958b70832f6b356615)](https://app.codacy.com/app/hiro.ashiya/poetrify?utm_source=github.com&utm_medium=referral&utm_content=kk6/poetrify&utm_campaign=Badge_Grade_Settings)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/kk6/poetrify/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/poetrify.svg?style=flat-square)](https://pypi.python.org/pypi/poetrify)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n## Installation\n\nPipfile or requirements.txt(this is trial) to pyproject.toml for Poetry.\n\n```bash\npip install poetrify\n```\n\n### required\n\n`poetry` command (See: )\n\n## Usage\n\n```bash\n$ poetrify\nPoetrify version 0.3.0\n\nUSAGE\n poetrify [-h] [-q] [-v\u00a0[<...>]] [-V] [--ansi] [--no-ansi] [-n] [] ... []\n\nARGUMENTS\n The command to execute\n The arguments of the command\n\nGLOBAL OPTIONS\n -h (--help) Display this help message\n -q (--quiet) Do not output any message\n -v (--verbose) Increase the verbosity of messages: \"-v\" for normal output, \"-vv\" for more verbose output and\n \"-vvv\" for debug\n -V (--version) Display this application version\n --ansi Force ANSI output\n --no-ansi Disable ANSI output\n -n (--no-interaction) Do not ask any interactive question\n\nAVAILABLE COMMANDS\n completions Generate completion scripts for your shell.\n generate Generate pyproject.toml from the source file\n help Display the manual of a command\n```\n\nExample structure::\n\n```bash\n$ tree .\n.\n\u251c\u2500\u2500 app.py\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 Pipfile\n\u2514\u2500\u2500 Pipfile.lock\n```\n\nThe `generate` command sets the way for `poetry init`\n\n```bash\n$ poetrify generate\nGenerated init command:\n\npoetry init --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\n\nExecute the above command. Also, the following output is due to Poetry.\n\nThis command will guide you through creating your pyproject.toml config.\n\nPackage name [foo]:\n...\n```\n\n### Trial\n\nAlso supported to requirements.txt on a trial basis.\n\nPlease specify `requirements.txt` for`--src` option. The default value of this option is Pipfile.\n\n```bash\n$ poetry run pip freeze > requirements.txt\n\n$ cat requirements.txt\naspy.yaml==1.1.1\natomicwrites==1.2.1\nattrs==18.2.0\ncertifi==2018.11.29\ncfgv==1.4.0\nchardet==3.0.4\ncleo==0.7.2\nClick==7.0\nclikit==0.2.3\ncoverage==4.5.2\nidentify==1.1.8\nidna==2.8\nimportlib-metadata==0.8\nincremental==17.5.0\nJinja2==2.10\nlicensename==0.4.2\nMarkupSafe==1.1.0\nmore-itertools==5.0.0\nnodeenv==1.3.3\npastel==0.1.0\npluggy==0.8.1\n-e git+https://github.com/kk6/poetrify.git@63a861cba868298c896888f5104230c4a00896bb#egg=poetrify\npre-commit==1.14.2\npy==1.7.0\npylev==1.3.0\npytest==3.10.1\npytest-cov==2.6.1\nPyYAML==3.13\nrequests==2.21.0\nsix==1.12.0\ntoml==0.10.0\ntomlkit==0.5.3\ntowncrier==18.6.0\nUnidecode==1.0.23\nurllib3==1.24.1\nvirtualenv==16.2.0\nzipp==0.3.3\n\n$ poetry run poetrify generate -d -s requirements.txt\nGenerated init command:\n\npoetry init --dependency=cleo --dependency=licensename --dependency=pre-commit --dependency=pytest-cov --dependency=requests --dependency=tomlkit --dependency=towncrier --license=MIT\n```\n\nAs you can see, poetrify extract only descendants packages from all the packages listed in `requirements.txt` and pass only those to poetry. This is to prevent `pyproject.toml` from becoming full of package names.\n\n## Autocompletion\n\n### Description\n\nOne can generate a completion script for `poetrify` that is compatible with a given shell. The\nscript is output on `stdout` allowing one to re-direct the output to the file of their choosing.\nWhere you place the file will depend on which shell, and which operating system you are using. Your particular\nconfiguration may also determine where these scripts need to be placed.\n\nHere are some common set ups for the three supported shells under Unix and similar operating systems (such as\nGNU/Linux).\n\n### BASH\n\n`bash`\nCompletion files are commonly stored in `/etc/bash_completion.d/`\n\nRun the command:\n\n`poetrify completions bash > /etc/bash_completion.d/poetrify.bash-completion`\n\nThis installs the completion script. You may have to log out and log back in to your shell session for the changes to\ntake effect.\n\n### FISH\n\nFish completion files are commonly stored in`$HOME/.config/fish/completions`\n\nRun the command:\n\n`poetrify completions fish > ~/.config/fish/completions/poetrify.fish`\n\nThis installs the completion script. You may have to log out and log back in to your shell session for the changes to\ntake effect.\n\n### ZSH\n\nZSH completions are commonly stored in any directory listed in your `$fpath` variable. To use these\ncompletions, you must either add the generated script to one of those directories, or add your own to this list.\n\nAdding a custom directory is often the safest best if you're unsure of which directory to use. First create the\ndirectory, for this example we'll create a hidden directory inside our `$HOME` directory\n\n`mkdir ~/.zfunc`\n\nThen add the following lines to your `.zshrc` just before `compinit`\n\n`fpath+=~/.zfunc`\n\nNow you can install the completions script using the following command\n\n`poetrify completions zsh > ~/.zfunc/_poetrify`\n\nYou must then either log out and log back in, or simply run\n\n`exec zsh`\n\nFor the new completions to take affect.\n\n### CUSTOM LOCATIONS\n\nAlternatively, you could save these files to the place of your choosing, such as a custom directory inside your\n\\$HOME. Doing so will require you to add the proper directives, such as `source`ing inside your login script. Consult\nyour shells documentation for how to add such directives.\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kk6/poetrify", "keywords": "", "license": "MIT", "maintainer": "kk6", "maintainer_email": "hiro.ashiya@gmail.com", "name": "poetrify", "package_url": "https://pypi.org/project/poetrify/", "platform": "", "project_url": "https://pypi.org/project/poetrify/", "project_urls": { "Homepage": "https://github.com/kk6/poetrify", "Repository": "https://github.com/kk6/poetrify" }, "release_url": "https://pypi.org/project/poetrify/0.4.0/", "requires_dist": [ "tomlkit (>=0.5.3,<0.6.0)", "cleo (>=0.7.2,<0.8.0)", "licensename (>=0.4.2,<0.5.0)", "requests (>=2.21,<3.0)" ], "requires_python": ">=3.7,<4.0", "summary": "Pipfile to pyproject.toml for Poetry", "version": "0.4.0" }, "last_serial": 5289908, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "a3e1590a68e7fb538320ee570b88824d", "sha256": "6ec697b77c3aebd267feb2fc314f51e18b33d8778824dd1d87b33107753d6ca6" }, "downloads": -1, "filename": "poetrify-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a3e1590a68e7fb538320ee570b88824d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 5870, "upload_time": "2019-01-18T08:54:34", "url": "https://files.pythonhosted.org/packages/9b/6a/4aaf869243bed1b8bb17070d5fe90d246273a60e201eae2938657ddcba14/poetrify-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7861c71fae9a8e3bd75bc826823e6f0b", "sha256": "6ad3ef2c18c4957affc87c40c655aa2a19a2ac883f35a6fea3fcfc0f92951fc8" }, "downloads": -1, "filename": "poetrify-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7861c71fae9a8e3bd75bc826823e6f0b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 3136, "upload_time": "2019-01-18T08:54:36", "url": "https://files.pythonhosted.org/packages/d1/f8/9cd5b7189e7cb0bcdef543f838c4e42c166159b2c6f75f097f8e0cb76bad/poetrify-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "9a232b3cc4f9fe15853e4a387eeb48fc", "sha256": "5e1d76675bc3325efbce1eba286cedc02380af86f2880d78602f78652f7f7092" }, "downloads": -1, "filename": "poetrify-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9a232b3cc4f9fe15853e4a387eeb48fc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 10872, "upload_time": "2019-01-21T12:36:32", "url": "https://files.pythonhosted.org/packages/bd/7a/f240d0fd173d80a2fee8b71ee707d4863cb279995c832803a9b9735f1ade/poetrify-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4eed933c5270a890ea1b9d1a6a22a4fd", "sha256": "2be01af68be0819bf984ef1f9faa59c9f93bd98378d233117c4449b2164de60c" }, "downloads": -1, "filename": "poetrify-0.3.0.tar.gz", "has_sig": false, "md5_digest": "4eed933c5270a890ea1b9d1a6a22a4fd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 6142, "upload_time": "2019-01-21T12:36:33", "url": "https://files.pythonhosted.org/packages/46/cb/71c511355acd842d92ef970db9d34667c1b84d326fa614ed49bc7e061c2b/poetrify-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "5028b3137ca8282f8e9fdf29a74e8fb9", "sha256": "f54feaf1fefaf57c02bd049fc5becab65052a8c878f4ce1cc92cd89658f49e5a" }, "downloads": -1, "filename": "poetrify-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5028b3137ca8282f8e9fdf29a74e8fb9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 7883, "upload_time": "2019-05-20T00:05:45", "url": "https://files.pythonhosted.org/packages/d5/e7/27d59f943b93fbfd3e0e72e85b06665e4b6049781de0044ced53c5b8a603/poetrify-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a74bf2b55e21d17aad8b199d3bc23221", "sha256": "0b9abc3fc1bbbace3a19251ae7e70a7d7d0dcc2d2bd662bd31e44a9b1bdf883e" }, "downloads": -1, "filename": "poetrify-0.4.0.tar.gz", "has_sig": false, "md5_digest": "a74bf2b55e21d17aad8b199d3bc23221", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 7980, "upload_time": "2019-05-20T00:05:47", "url": "https://files.pythonhosted.org/packages/22/1c/7fedd55aeaeb766ad94efa45d24fd2d343ba33ca2887fced030ca754d13a/poetrify-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5028b3137ca8282f8e9fdf29a74e8fb9", "sha256": "f54feaf1fefaf57c02bd049fc5becab65052a8c878f4ce1cc92cd89658f49e5a" }, "downloads": -1, "filename": "poetrify-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5028b3137ca8282f8e9fdf29a74e8fb9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 7883, "upload_time": "2019-05-20T00:05:45", "url": "https://files.pythonhosted.org/packages/d5/e7/27d59f943b93fbfd3e0e72e85b06665e4b6049781de0044ced53c5b8a603/poetrify-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a74bf2b55e21d17aad8b199d3bc23221", "sha256": "0b9abc3fc1bbbace3a19251ae7e70a7d7d0dcc2d2bd662bd31e44a9b1bdf883e" }, "downloads": -1, "filename": "poetrify-0.4.0.tar.gz", "has_sig": false, "md5_digest": "a74bf2b55e21d17aad8b199d3bc23221", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 7980, "upload_time": "2019-05-20T00:05:47", "url": "https://files.pythonhosted.org/packages/22/1c/7fedd55aeaeb766ad94efa45d24fd2d343ba33ca2887fced030ca754d13a/poetrify-0.4.0.tar.gz" } ] }