Metadata-Version: 2.1
Name: mewbot_dev_tools
Version: 0.0.18.dev1
Summary: Mewbot Developers Tools (https://github.com/mewbotorg)
Home-page: https://github.com/mewler/mewbot
Author: Alex Cameron
Author-email: mewbot@quicksilver.london
License: Copyright (c) <year> <owner> All rights reserved.
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Bug Tracker, https://github.com/mewler/mewbot/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: setuptools>=68.0.0
Requires-Dist: reuse~=2.1
Requires-Dist: pydeps~=1.12.1
Requires-Dist: myst-parser~=2.0.0
Requires-Dist: sphinx~=7.2.2
Requires-Dist: m2r2~=0.3.3.post2
Requires-Dist: black>=23.1.0
Requires-Dist: flake8>=6.0.0
Requires-Dist: pylint>=2.16.0
Requires-Dist: pytest-github-actions-annotate-failures>=0.1.7
Requires-Dist: pydocstyle>=6.3.0
Requires-Dist: isort>=5.12.0
Requires-Dist: ruff>=0.0.292
Requires-Dist: bandit~=1.7.5
Requires-Dist: mypy>=0.991
Requires-Dist: types-PyYAML~=6.0
Requires-Dist: clint>=0.5.1
Requires-Dist: pytest>=7.1.1
Requires-Dist: pytest-asyncio>=0.23.0
Requires-Dist: pytest-cov>=3.0.0
Requires-Dist: pytest-xdist>=2.5.0

<!--
SPDX-FileCopyrightText: 2023 Mewbot Developers <mewbot@quicksilver.london>

SPDX-License-Identifier: BSD-2-Clause
-->

# mewbot-dev-tools

Tools to aid with mewbot development.

## Purpose

While developing mewbot we built a number of tools to assist with development.
This mostly consist of tool chains for
 - running the linters
 - building dev venvs (still forthcoming)
 - building the docs (still forthcoming)
 - gather and run the tests

The aim of these tools is that, if you run them on a code base, you should
end up with something which conforms to mewbot's guidelines.

## Usage

The dev tools uses path based auto-discovery to locate the relevant code.
Python modules will be discovered in `./src` and `./plugins/*/src`.
Test cases will be discovered in `./tests` and `./plugins/*/tests`.

If your project is in that `src-dir` layout, you can install the dev tools
and then run any of the toolchains.

```sh
pip install mewbot-dev-tools

mewbot-install-deps  # Install dependencies from discovered requirements.txt

mewbot-preflight # Run all of the toolchains below

mewbot-lint  # Code style and type linting, using black/flake/ruff/mypy/pylint
mewbot-reuse # Licensing information check, using reuse
mewbot-test  # Run discovered test suites, using pytest
mewbot-security-analysis  # Discover potential security bugs using badnit

mewbot-annotate  # Convert output data into GitHub annotations
```

We also recommend that you setup `mewbot-prefilght` as a
[pre-commit or pre-push hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks).

## Future Work

- Ability to opt-out for some linters in pyproject.toml
- Work to discover locations based on pyproject.toml

