semvec/pypi-packages huggingface dataset:
run-all-the-tests 0.1.21
Make sure both 'python -m pytest' and 'pytest' run your tests.
License: MIT
Requires Python: >=3.6,<4.0
Keywords: testing,import,sys.path,packaging,dependency,pyproject.toml

Run a series of test invocation making sure each test case works with both 'pytest' and
 'python -m pytest' over all working directories between the project root and the directory
  containing the test script.

```
├─ src
│
│<-- # run selected __main__'s from this working directory
│
│  └─ __init__.py
│  └─ foo.py
│  ├─ bar
│  │   └─ __init__.py
│  │   └─ bar.py
│  │
│  │<-- # run selected __main__'s from this working directory
│  │
│  └─ run_foo_main.py
│  └─ run_bar_main.py
│
│<-- # run selected test cases from this working directory
│
├─ tests
│  │
│  │<-- # run selected test cases from this working directory
│  │
│  └─ test_foo.py
│  └─ bar
│        │<-- # run selected bar test cases from this working directory
│        │
│        └─ test_bar.py
└─ setup.py
```

Your `run_all_my_tests.py`:
```
from run_all_the_tests import TestCasePath, TestCase, Group, TestType

if __name__ == '__main__': 
    project_path: PurePath = Path(__file__).absolute().parent.parent


    def gen_test_case_path(test_case: str) -> TestCasePath:
        return TestCasePath(project_path, PurePath(test_case))


    all_test_cases: Tuple[TestCase, ...] = (
        TestCase.gen_test_case(gen_test_case_path('tests/test_foo.py')),
        TestCase.gen_test_case(gen_test_case_path('tests/bar/test_bar.py')),
    )

    run_all_tests(all_test_cases)
```

Each set of tests are run in parallel within `Group.ONE`. Designate
tests to run within non-conflicting groups of parallel runs by assigning
all test cases that can run without conflict to the same `Group`.

```
    all_test_cases: Tuple[TestCase, ...] = (
        TestCase.gen_test_case(gen_test_case_path('tests/test_foo.py')),
        TestCase.gen_test_case(gen_test_case_path('tests/bar/test_bar.py'), Group.TWO),
    )
```

`TestCase.gen_test_case()` also supports the following agrs:
```
    pytest_filter: str = None
    :param pytest_filter: pytest -k string
 
    test_types: Tuple[TestType, ...] = TestType.all_test_types()
    :param test_types: for exceptional situations, limit a TestCase to run for limited set of TestType's
```
findcrashedcodedeveloper 0.1.0
Find the developer responsible for crashed code from stack trace
License: MIT

# Find The Developer

findcrashedcodedeveloper is python package which return the information about the developer who is responsible for code crash.

- It uses Github v4 graphql APIs for fetching the blame history of a file.
- It uses Sentry APIs to fetch stack trace of crash

## Installation

You can install it from [PyPI](https://pypi.org/project/findcrashedcodedeveloper/):

    pip install findcrashedcodedeveloper

The package is supported on Python 2.7, as well as Python 3.+.

## How to use

The findcrashedcodedeveloper has a command line application to demo some common functionality of this package. To see list of supported commands type `python -m findcrashedcodedeveloper -h`


Get latest issues from Sentry project:

    $ findcrashedcodedeveloper sentryissues -s <sentry_api_token> -p <sentry_user_name>/<sentry_project_name>

    $ findcrashedcodedeveloper sentryissues -s abcdefgh123 -p karambir252/testproject

    Issues:
    1964662080 : ZeroDivisionError: integer division or modulo by zero
    1864652080 : TypeError: Cannot convert undefined or null to object
    1754652310 : IndexError: index -1 is out of bounds for axis 0 with size 0

To get developer responsible for crashed code pass issue id:

    $ findcrashedcodedeveloper finddeveloper -s <sentry_api_token> --issue-id 1964662080 -g <github_api_token> -r <repo_owner_username>/<repo>/<branch>

    $ findcrashedcodedeveloper finddeveloper -s abcde1234 --issue-id 1964662080 -g abcde1234 -r karambir252/crashassigner/master

    Stack Trace:
    file: /home/karambir/myproject/project/crashassigner/src/tmp.py
    10:    c = b/a
    file: /home/karambir/myproject/project/crashassigner/src/tmp.py
    14:    main()

    Developer:
    Name: karambir252
    UserName: karambir252
    Email: <email>@gmail.com

You can also get developer of a line of code:

    $ findcrashedcodedeveloper codedeveloper -g <github_api_token> -r karambir252/findcrashedcodedeveloper/master --filepath README.md --line-number 30

    Code:
    17 : lib/
    18 : lib64/
    19 : parts/
    20*: sdist/
    21 : var/
    22 : wheels/
    23 : *.egg-info/

    Developer:
    Name: karambir252
    UserName: karambir252
    Email: <email>@gmail.com