Metadata-Version: 2.5
Name: odoo-sort-manifest-depends
Version: 1.5
Summary: Sort modules dependencies section in odoo addon's manifest
Project-URL: Documentation, https://github.com/acsone/odoo-sort-manifest-depends#readme
Project-URL: Issues, https://github.com/acsone/odoo-sort-manifest-depends/issues
Project-URL: Source, https://github.com/acsone/odoo-sort-manifest-depends
Author: Acsone
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.10
Requires-Dist: click
Requires-Dist: diskcache
Requires-Dist: manifestoo-core>=1.1
Requires-Dist: mousebender
Requires-Dist: packaging
Requires-Dist: platformdirs
Requires-Dist: requests
Description-Content-Type: text/markdown

# odoo-sort-manifest-depends

[![Test Status](https://github.com/acsone/odoo-sort-manifest-depends/actions/workflows/test.yml/badge.svg)](https://github.com/acsone/odoo-sort-manifest-depends/actions/workflows/test.yml)
[![Code Coverage](https://img.shields.io/codecov/c/github/acsone/odoo-sort-manifest-depends)](https://codecov.io/gh/acsone/odoo-sort-manifest-depends)

## Table of Contents

- [Help](#help)
- [Pre-commit hook](#pre-commit)
- [License](#license)

## Help

```
Usage: odoo-sort-manifest-depends [OPTIONS]

  Sort modules dependencies section in odoo addons manifests and group them by
  type (Third-party, Odoo Community, Odoo Enterprise, Local) and module
  category.

Options:
  --local-addons-dir DIRECTORY  Directory containing manifests to sort
                                [required]
  --odoo-version TEXT           Project's Odoo version (e.g. 16.0)  [required]
  --project-name TEXT           Name of the project, will be the name of
                                category of local addons (default: Local)
  --oca-category [basic|repository]
                                Add category for third party addons coming
                                from OCA. If 'basic': category is set to
                                'OCA'. If 'repository': category is set as
                                'OCA/<repository_name>', if the repository
                                can not be identified, it falls into the
                                default 'OCA' category.
  --reset-cache                 Purge cache used to identify OCA addons
  --help                        Show this message and exit.
```

## Using from the command line

This project is distributed on PyPI. The recommended way to run it is with
[pipx](https://github.com/pypa/pipx), with a command like this:

`pipx run odoo-sort-manifest-depends --local-addons-dir=odoo/addons --odoo-version=16.0`

## Running tests

### Local development with Hatch

```bash
# Install hatch if you don't have it
pip install hatch

# Run tests
hatch run test

# Run tests with coverage
hatch run test-cov
```

### Using pytest directly

```bash
pip install -r requirements-test.txt
pytest tests/ -v
```

## Using with pre-commit

This project may be used as a [pre-commit](https://pre-commit.com) hook, with an
entry like this in `.pre-commit-config.yml`.

```yaml
  - repo: https://github.com/acsone/odoo-sort-manifest-depends
    rev: v1.x  # see the release page https://github.com/acsone/odoo-sort-manifest-depends/releases
    hooks:
      - id: odoo-sort-manifest-depends
        args:
          [
            --local-addons-dir=./odoo/addons/,
            --odoo-version=16.0,
            --project-name=MyProject,
          ]
```

## Credits

 * [Laurent Mignon](https://github.com/lmignon)
 * [Thomas Binsfeld](https://github.com/ThomasBinsfeld)
 * [Zina Rasoamanana](https://github.com/AnizR)
 * [Yannick Payot](https://github.com/yvaucher)

## License

`odoo-sort-manifest-depends` is distributed under the terms of the
[MIT](https://spdx.org/licenses/MIT.html) license.
