suiteas


Namesuiteas JSON
Version 0.3.2 PyPI version JSON
download
home_pageNone
SummaryAn opinionated testing suite organizer for pytest
upload_time2024-04-24 22:19:09
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords pytest test testing test suite suite sync synchronize pre-commit boilerplate skeleton
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SuiteAs

<!-- badges: start -->
[![License](https://img.shields.io/github/license/nathanjmcdougall/suiteas)](https://github.com/nathanjmcdougall/suiteas/blob/main/LICENSE.txt)
[![PyPI version](https://badge.fury.io/py/suiteas.svg)](https://badge.fury.io/py/suiteas)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
[![Linting: Ruff](https://img.shields.io/badge/linting-ruff-yellowgreen)](https://github.com/charliermarsh/ruff)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/nathanjmcdougall/suiteas/main.svg)](https://results.pre-commit.ci/latest/github/nathanjmcdougall/suiteas/main)
[![codecov](https://codecov.io/gh/nathanjmcdougall/suiteas/branch/develop/graph/badge.svg?token=OUHWT2NL8O)](https://codecov.io/gh/nathanjmcdougall/suiteas)
[![Downloads](https://static.pepy.tech/badge/suiteas)](https://pepy.tech/project/suiteas)
<!-- badges: end -->

An opinionated testing suite organizer and linter for pytest.

SuiteAs will automatically generate a skeletonized unit test suite based on the
structure of your project. Then, going forward, it will enforce matching names and folder structure between your testing suite and your project using linter rules.

For now, only linting is supported; automatic test suite generation will be added later.

> _Sweet As_
>
> INFORMAL • NEW ZEALAND
>
> _very satisfactory; excellent._

The recommended way to use SuiteAs is using the [`pre-commit`](https://pre-commit.com/) framework. Add the following to your `.pre-commit-config.yaml` file:

```yaml
- repo: https://github.com/nathanjmcdougall/suiteas
    rev: v0.3.1
    hooks:
      - id: suiteas
```

You can also install and run SuiteAs as a standalone package:

```bash
pip install suiteas
python -m suiteas .
```

SuiteAs will try to automatically determine your project directory structure and
configuration, but you can manually configure SuiteAs in a `pyproject.toml` file.

For example, if your project looks like this:

<!-- created with tree.nathanfriend.io -->
```text
.
└── myrepo/
    ├── src/
    │   ├── mypkg/
    │   └── otherpkg/
    ├── tests/
    │   ├── unit/
    │   │   ├── mypkg/
    │   │   └── otherpkg/
    │   └── endtoend/
    └── pyproject.toml
```

Then you would add this section to `pyproject.toml`:

```TOML
[tool.suiteas]
pkg_names = ["mypkg", "otherpkg"]
src_rel_path = "src"
tests_rel_path = "tests"
unittest_dir_name = "unit"
ignore = ["SUI002"]
```

The final line will globally disable the linting of the SUI002 rule.

## Rules

SuiteAs will enforce the following rules:

| Rule | Description |
| ---- | ----------- |
| SUI001 | Function or class is missing a corresponding test function |
| SUI002 | Pytest test class is empty |
| SUI003 | Pytest file does not import the function being tested |

## Developer Information

### Package Management

This project uses [`rye`](https://rye-up.com/) to manage dependencies, virtual environments, and the python installation. Run `rye sync` from the project root to install the development environment.

### Hooks with `pre-commit`

This project uses [`pre-commit`](https://pre-commit.com/) to manage hooks. After installing the development environment, run `pre-commit install`.

### Signed Commits

This project requires signed commits. Please see [this guide from the VS Code project](https://github.com/microsoft/vscode/wiki/Commit-Signing) for instructions on how to configure this.

### Diagramming

This project uses [`D2Lang`](https://d2lang.com/) to develop and maintain design diagrams.

### Changelog

This project uses [`towncrier`](https://github.com/twisted/towncrier) to manage the changelog. Each PR should have at least one associated GitHub issue. Before the PR is merged, a changelog entry  should be created for any issues which are resolved by the PR. The changelog entry files are created in the `doc/changelog_entries` directory, with the filename following the convention `<github id>.<type>.rst` where `<github id>` is the GitHub issue ID number, and `<type>` is one of the types documented in the `pyproject.toml` file in the `[tool.towncrier.type]` sections.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "suiteas",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "pytest, test, testing, test suite, suite, sync, synchronize, pre-commit, boilerplate, skeleton",
    "author": null,
    "author_email": "Nathan McDougall <nathan.j.mcdougall@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/56/0c/737cb8d950f336ec33e44bb7e6487d5818c4feb7aadd82eda147bd1d00ea/suiteas-0.3.2.tar.gz",
    "platform": null,
    "description": "# SuiteAs\n\n<!-- badges: start -->\n[![License](https://img.shields.io/github/license/nathanjmcdougall/suiteas)](https://github.com/nathanjmcdougall/suiteas/blob/main/LICENSE.txt)\n[![PyPI version](https://badge.fury.io/py/suiteas.svg)](https://badge.fury.io/py/suiteas)\n[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)\n[![Linting: Ruff](https://img.shields.io/badge/linting-ruff-yellowgreen)](https://github.com/charliermarsh/ruff)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/nathanjmcdougall/suiteas/main.svg)](https://results.pre-commit.ci/latest/github/nathanjmcdougall/suiteas/main)\n[![codecov](https://codecov.io/gh/nathanjmcdougall/suiteas/branch/develop/graph/badge.svg?token=OUHWT2NL8O)](https://codecov.io/gh/nathanjmcdougall/suiteas)\n[![Downloads](https://static.pepy.tech/badge/suiteas)](https://pepy.tech/project/suiteas)\n<!-- badges: end -->\n\nAn opinionated testing suite organizer and linter for pytest.\n\nSuiteAs will automatically generate a skeletonized unit test suite based on the\nstructure of your project. Then, going forward, it will enforce matching names and folder structure between your testing suite and your project using linter rules.\n\nFor now, only linting is supported; automatic test suite generation will be added later.\n\n> _Sweet As_\n>\n> INFORMAL \u2022 NEW ZEALAND\n>\n> _very satisfactory; excellent._\n\nThe recommended way to use SuiteAs is using the [`pre-commit`](https://pre-commit.com/) framework. Add the following to your `.pre-commit-config.yaml` file:\n\n```yaml\n- repo: https://github.com/nathanjmcdougall/suiteas\n    rev: v0.3.1\n    hooks:\n      - id: suiteas\n```\n\nYou can also install and run SuiteAs as a standalone package:\n\n```bash\npip install suiteas\npython -m suiteas .\n```\n\nSuiteAs will try to automatically determine your project directory structure and\nconfiguration, but you can manually configure SuiteAs in a `pyproject.toml` file.\n\nFor example, if your project looks like this:\n\n<!-- created with tree.nathanfriend.io -->\n```text\n.\n\u2514\u2500\u2500 myrepo/\n    \u251c\u2500\u2500 src/\n    \u2502   \u251c\u2500\u2500 mypkg/\n    \u2502   \u2514\u2500\u2500 otherpkg/\n    \u251c\u2500\u2500 tests/\n    \u2502   \u251c\u2500\u2500 unit/\n    \u2502   \u2502   \u251c\u2500\u2500 mypkg/\n    \u2502   \u2502   \u2514\u2500\u2500 otherpkg/\n    \u2502   \u2514\u2500\u2500 endtoend/\n    \u2514\u2500\u2500 pyproject.toml\n```\n\nThen you would add this section to `pyproject.toml`:\n\n```TOML\n[tool.suiteas]\npkg_names = [\"mypkg\", \"otherpkg\"]\nsrc_rel_path = \"src\"\ntests_rel_path = \"tests\"\nunittest_dir_name = \"unit\"\nignore = [\"SUI002\"]\n```\n\nThe final line will globally disable the linting of the SUI002 rule.\n\n## Rules\n\nSuiteAs will enforce the following rules:\n\n| Rule | Description |\n| ---- | ----------- |\n| SUI001 | Function or class is missing a corresponding test function |\n| SUI002 | Pytest test class is empty |\n| SUI003 | Pytest file does not import the function being tested |\n\n## Developer Information\n\n### Package Management\n\nThis project uses [`rye`](https://rye-up.com/) to manage dependencies, virtual environments, and the python installation. Run `rye sync` from the project root to install the development environment.\n\n### Hooks with `pre-commit`\n\nThis project uses [`pre-commit`](https://pre-commit.com/) to manage hooks. After installing the development environment, run `pre-commit install`.\n\n### Signed Commits\n\nThis project requires signed commits. Please see [this guide from the VS Code project](https://github.com/microsoft/vscode/wiki/Commit-Signing) for instructions on how to configure this.\n\n### Diagramming\n\nThis project uses [`D2Lang`](https://d2lang.com/) to develop and maintain design diagrams.\n\n### Changelog\n\nThis project uses [`towncrier`](https://github.com/twisted/towncrier) to manage the changelog. Each PR should have at least one associated GitHub issue. Before the PR is merged, a changelog entry  should be created for any issues which are resolved by the PR. The changelog entry files are created in the `doc/changelog_entries` directory, with the filename following the convention `<github id>.<type>.rst` where `<github id>` is the GitHub issue ID number, and `<type>` is one of the types documented in the `pyproject.toml` file in the `[tool.towncrier.type]` sections.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An opinionated testing suite organizer for pytest",
    "version": "0.3.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/nathanjmcdougall/suiteas/issues",
        "Source Code": "https://github.com/nathanjmcdougall/suiteas"
    },
    "split_keywords": [
        "pytest",
        " test",
        " testing",
        " test suite",
        " suite",
        " sync",
        " synchronize",
        " pre-commit",
        " boilerplate",
        " skeleton"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebbdc0287e26a2ee9192cb3825d79e21cdef6bf3e74e35d4c8598d9abde378dc",
                "md5": "9d44a28149f1372896d9fb2f70a73184",
                "sha256": "d73391978984a47f6528d68e9914b2728544c9242ea7c6908e41a2e03d36170d"
            },
            "downloads": -1,
            "filename": "suiteas-0.3.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9d44a28149f1372896d9fb2f70a73184",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.10",
            "size": 17470,
            "upload_time": "2024-04-24T22:19:08",
            "upload_time_iso_8601": "2024-04-24T22:19:08.076709Z",
            "url": "https://files.pythonhosted.org/packages/eb/bd/c0287e26a2ee9192cb3825d79e21cdef6bf3e74e35d4c8598d9abde378dc/suiteas-0.3.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "560c737cb8d950f336ec33e44bb7e6487d5818c4feb7aadd82eda147bd1d00ea",
                "md5": "1e7930ed5b80d9bdc30337ccb028fa7e",
                "sha256": "7bd0451139ff3babfc4ce17bc2eb8335bdf9fc3395da4eaabb0dfbd7ce82bb72"
            },
            "downloads": -1,
            "filename": "suiteas-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1e7930ed5b80d9bdc30337ccb028fa7e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 32936,
            "upload_time": "2024-04-24T22:19:09",
            "upload_time_iso_8601": "2024-04-24T22:19:09.647930Z",
            "url": "https://files.pythonhosted.org/packages/56/0c/737cb8d950f336ec33e44bb7e6487d5818c4feb7aadd82eda147bd1d00ea/suiteas-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-24 22:19:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nathanjmcdougall",
    "github_project": "suiteas",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "suiteas"
}
        
Elapsed time: 3.48917s