poetry-plugin-sort


Namepoetry-plugin-sort JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/andrei-shabanski/poetry-plugin-sort
SummaryPoetry plugin to sort the dependencies alphabetically
upload_time2024-01-06 14:49:46
maintainer
docs_urlNone
authorAndrei Shabanski
requires_python>=3.7,<4.0
licenseMIT
keywords poetry plugin dependencies sorting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Poetry Plugin: Dependencies sorting

[![PyPI Version](https://img.shields.io/pypi/v/poetry-plugin-sort?label=PyPI)](https://pypi.org/project/poetry-plugin-sort/)
[![Python Versions](https://img.shields.io/pypi/pyversions/poetry-plugin-sort)](https://pypi.org/project/poetry-plugin-sort/)
[![check](https://github.com/andrei-shabanski/poetry-plugin-sort/actions/workflows/test.yml/badge.svg)](https://github.com/andrei-shabanski/poetry-plugin-sort/actions/workflows/test.yml)

This package is a plugin that sort dependencies alphabetically in pyproject.toml
after running `poetry init` and `poetry add`.
Since [Introduce dependency sorting #3996](https://github.com/python-poetry/poetry/pull/3996) pull request still open
this plugin is a workaround for [!312](https://github.com/python-poetry/poetry/issues/312) issue.

## Installation

Just use `poetry self add` command to add this plugin.

```bash
poetry self add poetry-plugin-sort
```

If you used pipx to install Poetry, add the plugin via `pipx inject` command.

```bash
pipx inject poetry poetry-plugin-sort
```

And if you installed Poetry using pip, you can install the plugin the same way.

```bash
pip install poetry poetry-plugin-sort
```

## Usage

The plugin sorts dependencies each time when you change dependencies via the `poetry init` and `poetry add` commands.

To sort dependencies without making changes to the dependencies list, the plugin provides a  `sort` command.

```bash
poetry sort
```

### Available options

* `--check`: Checks if dependencies are sorted and exits with a non-zero status code when it doesn't.

### Configurations

The following configuration can be set in `[tool.poetry-sort]` section of the pyproject.toml file or as system-wide environment variables:

* `enabled` \ `POETRY_SORT_ENABLED`: Enable or disable sorting after invoking `poetry init` and `poetry add` commands. Default: `True`.
* `move-optionals-to-bottom` \ `POETRY_SORT_MOVE_OPTIONALS_TO_BOTTOM`: Move optional packages to the bottom. Default: `False`.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/andrei-shabanski/poetry-plugin-sort",
    "name": "poetry-plugin-sort",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "poetry,plugin,dependencies sorting",
    "author": "Andrei Shabanski",
    "author_email": "shabanski.andrei@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3a/e1/c44bbd1132e2dd5e386512dcdbd61a79abde9b609254f95db64f4b801758/poetry_plugin_sort-0.2.1.tar.gz",
    "platform": null,
    "description": "# Poetry Plugin: Dependencies sorting\n\n[![PyPI Version](https://img.shields.io/pypi/v/poetry-plugin-sort?label=PyPI)](https://pypi.org/project/poetry-plugin-sort/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/poetry-plugin-sort)](https://pypi.org/project/poetry-plugin-sort/)\n[![check](https://github.com/andrei-shabanski/poetry-plugin-sort/actions/workflows/test.yml/badge.svg)](https://github.com/andrei-shabanski/poetry-plugin-sort/actions/workflows/test.yml)\n\nThis package is a plugin that sort dependencies alphabetically in pyproject.toml\nafter running `poetry init` and `poetry add`.\nSince [Introduce dependency sorting #3996](https://github.com/python-poetry/poetry/pull/3996) pull request still open\nthis plugin is a workaround for [!312](https://github.com/python-poetry/poetry/issues/312) issue.\n\n## Installation\n\nJust use `poetry self add` command to add this plugin.\n\n```bash\npoetry self add poetry-plugin-sort\n```\n\nIf you used pipx to install Poetry, add the plugin via `pipx inject` command.\n\n```bash\npipx inject poetry poetry-plugin-sort\n```\n\nAnd if you installed Poetry using pip, you can install the plugin the same way.\n\n```bash\npip install poetry poetry-plugin-sort\n```\n\n## Usage\n\nThe plugin sorts dependencies each time when you change dependencies via the `poetry init` and `poetry add` commands.\n\nTo sort dependencies without making changes to the dependencies list, the plugin provides a  `sort` command.\n\n```bash\npoetry sort\n```\n\n### Available options\n\n* `--check`: Checks if dependencies are sorted and exits with a non-zero status code when it doesn't.\n\n### Configurations\n\nThe following configuration can be set in `[tool.poetry-sort]` section of the pyproject.toml file or as system-wide environment variables:\n\n* `enabled` \\ `POETRY_SORT_ENABLED`: Enable or disable sorting after invoking `poetry init` and `poetry add` commands. Default: `True`.\n* `move-optionals-to-bottom` \\ `POETRY_SORT_MOVE_OPTIONALS_TO_BOTTOM`: Move optional packages to the bottom. Default: `False`.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Poetry plugin to sort the dependencies alphabetically",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/andrei-shabanski/poetry-plugin-sort",
        "Repository": "https://github.com/andrei-shabanski/poetry-plugin-sort"
    },
    "split_keywords": [
        "poetry",
        "plugin",
        "dependencies sorting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55b204a86929630baa86f01cb0146800f81f89797f48272eac09f353b99732c6",
                "md5": "5f821de956bbdde1dec111a2cdcd8549",
                "sha256": "3b43b5d405983314874dc87cc22f2edae83acfdd75dee05a78d72c54f04925eb"
            },
            "downloads": -1,
            "filename": "poetry_plugin_sort-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5f821de956bbdde1dec111a2cdcd8549",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 6895,
            "upload_time": "2024-01-06T14:49:45",
            "upload_time_iso_8601": "2024-01-06T14:49:45.612184Z",
            "url": "https://files.pythonhosted.org/packages/55/b2/04a86929630baa86f01cb0146800f81f89797f48272eac09f353b99732c6/poetry_plugin_sort-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ae1c44bbd1132e2dd5e386512dcdbd61a79abde9b609254f95db64f4b801758",
                "md5": "470c59d95d1fe3d7f0161ae807c7b181",
                "sha256": "5f2a3ac287a7fa6ae0983db48be670bc761ffeaa2a0bdac4789d0b044805b918"
            },
            "downloads": -1,
            "filename": "poetry_plugin_sort-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "470c59d95d1fe3d7f0161ae807c7b181",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 5237,
            "upload_time": "2024-01-06T14:49:46",
            "upload_time_iso_8601": "2024-01-06T14:49:46.763306Z",
            "url": "https://files.pythonhosted.org/packages/3a/e1/c44bbd1132e2dd5e386512dcdbd61a79abde9b609254f95db64f4b801758/poetry_plugin_sort-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-06 14:49:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "andrei-shabanski",
    "github_project": "poetry-plugin-sort",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "poetry-plugin-sort"
}
        
Elapsed time: 0.16220s