semvec/pypi-packages huggingface dataset:
doc-cov 0.4.0
doc-cov is a tool for measuring docstring coverage of Python project
License: MIT
Requires Python: >=3.6

# doc-cov 

doc-cov is a tool for measuring docstring coverage of Python project.

- Python versions >= 3.6 


## Quick start

1. Install doc-cov from pip.
2. Use `doccov PROJECT_PATH`

```
$ doccov tests/sample_project
function     3 /   5 60.00%
```

## Options
### Target object
doc-cov can measure docstring coverage of functions, classes and modules.

#### functions (default, `-f`) 

```
$ doccov tests/sample_project -f
function     3 /   5 60.00%

```

#### classes `-c`

```
$ doccov tests/sample_project -c
class        2 /   2 100.00%

```

#### modules `-m`

```
$ doccov tests/sample_project -m
module       3 /   7 42.86%

```

### Output 

#### str (default, `--output str`)

```
$ doccov tests/sample_project -fmc --output str
class        2 /   2 100.00%
module       3 /   7 42.86%
function     3 /   5 60.00%
```

#### csv `--output csv`

```
$ doccov tests/sample_project -fmc --output csv
coverage,class,2,2,100.00%
coverage,module,3,7,42.86%
coverage,function,3,5,60.00%
```

### Target 
#### Print coverage of whole (default)

```
$ doccov tests/sample_project
function     3 /   5 60.00%

```  
#### Print all coverage of modules `--all`

```
$ doccov tests/sample_project --all
=============================
module_fulldoc
-----------------------------
function     1 /   1 100.00%
=============================
package_A
-----------------------------
function     0 /   0 -
=============================
package_A.module_fulldoc
-----------------------------
function     1 /   1 100.00%
=============================
package_B
-----------------------------
function     0 /   0 -
=============================
package_B.module_shortdoc
-----------------------------
function     1 /   1 100.00%
=============================
package_B.package_B_1
-----------------------------
function     0 /   0 -
=============================
package_B.package_B_1.module_nodoc
-----------------------------
function     0 /   2 0.00%
=============================
coverage
-----------------------------
function     3 /   5 60.00%
```

## Report to pull request

Add comment to *github* pull request.

```
$ doccov <project> -fmc --output csv > doccov.csv
$ GITHUB_TOKEN=XXXXX doccov-report doccov.csv
```

**CircleCi**  
Add pull request comment using circle-ci environment.

**Other**  
Required following environment
- PROJECT_USERNAME
- PROJECT_REPONAME
- PR_NUMBER
decaptcher 0.0.3
Universal interface to multiple anti-captcha services
License: MIT
Keywords: captcha anti-captcha antigate rucaptcha 2captcha

## Installation

Use command:

```shell
pip install -e git://github.com/lorien/decaptcher#egg=decaptcher
```

## Usage

### Twocaptcha Backend Example

Service website is https://2captcha.com?from=3019071

```python
from decaptcher import Service

solver = Service('twocaptcha', api_key='2captcha.com API HERE')
print(solver.process_file('captcha.png'))
# or
with open('captcha.png') as inp:
    print(solver.process(inp.read()))
# or
with open('captcha.png') as inp:
    print(solver.process(inp))
# You can pass extra parameters (described in 2captcha documentation)
# using task_options arguments:
print(solver.process_file('captcha.png', task_options={
    'regsense': 1,
    'min_len': 4,
}))

```

### Solving custom captcha type using 2captcha.com

Decaptcher library supports any custom captcha supported by 2captcha.com service.
Just use `task_options` argument to pass all required parameters. 
For example, to solve text captcha do:
```python
from decaptcher import Service

solver = Service('twocaptcha', api_key='2captcha.com API HERE')
print(solver.process(task_options={
    'lang': 'en',
    'textcaptcha': 'Name of first day of week',
}))
```

### Getting captcha ID along the solution

To get catpcha ID pass `verbose=True` to `process` method:

```python
solver = Service('twocaptcha', api_key='2captcha.com API HERE')
print(solver.process_file('captcha.png', verbose=True))
````

You get result like:
```python
{"task_id": "captcha ID", "result": "captcha text"}
```


### Rucaptcha Backend Example

Service website is https://rucaptcha.com?from=3019071

```python
from decaptcher import Service

solver = Service('rucaptcha', api_key='RUCAPTCHA_KEY')
print(solver.process_file('captcha.png'))
```


### Antigate Backend Example

Service website is http://getcaptchasolution.com/ijykrofoxz

```python
from decaptcher import Service

solver = Service('antigate', api_key='ANTIGATE_KEY')
print(solver.process_file('captcha.png'))
```


### Browser Backend Example

Browser backend just displays captcha in default browser and wait you enter solution in console.

```python
from decaptcher import Service

solver = Service('browser')
print(solver.process_file('captcha.png'))
```