semvec/pypi-packages huggingface dataset:
CppUMockify 0.0.6
Generate CppUMock implementations
Keywords: cpputest cppumock pycparser

# CppUMockify

Cloned from [Marco M/Mockify](https://bitbucket.org/marco_m/mockify)

[![Build Status](https://travis-ci.org/spoorcc/CppUMockify.svg?branch=master)](https://travis-ci.org/spoorcc/CppUMockify)
[![PyPI version](https://badge.fury.io/py/CppUMockify.svg)](https://badge.fury.io/py/CppUMockify)
![PyPI - License](https://img.shields.io/pypi/l/CppUMockify.svg)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/CppUMockify.svg)

Generate complete boilerplate code for [CppUTest][] C/C++ mocks.

When writing mocks, the majority of the code is just boring boilerplate. For
example, to mock

    int zoo_cat(int a)

one has to write:

    1    int zoo_cat(int a) {
    2        mock().actualCall("zoo_cat")
    3            .withParameter("a", a);
    4        if mock().hasReturnValue() {
    5            return mock().intReturnValue();
    6        }
    7        return something(a);
    8    }

where *everything* but line 7 is boilerplate. Multiply this for the tens of
mocks needed also for the smallest unit test and the task quickly becomes
boring and error-prone.

CppUMockify is written in Python and thanks to the excellent [pycparser][] parses
the C code of the function prototype to mock and generates all the needed
boilerplate :-)

## Development status

Already usable with basic functionalities. Most important missing parts:

- support for basic typedefs (eg `size_t`) both as function type and as function
argument
- support for output parameters (eg `void foo(int* bar)`)

## Installation

    pip install CppUMockify

## Usage

CppUMockify is designed to be used with any editor or IDE, or just from the shell.

Assuming that function `zoo_cat()` is declared in header file `zoo.h`, calling:

    cppumockify.py zoo "int zoo_cat(int a);"

will generate mock file `zoo_mock.cpp`, containing the mock boilerplate for
function `zoo_cat()`.

Subsequent calls to cppumockify matching on the header file will append the new
mock boilerplate to `zoo_mock.cpp`. For example

    cppumockify.py zoo "int zoo_dog(int b);"

will append the boilerplate mock for `zoo_dog()`.

## Suggested workflow

Bring a source file under unit test. Once the compilation is succesful, you
will start to have linker errors for all the functions you need to mock.

Copy the first unfound symbol from the linker, search for it (using your IDE,
cscope, ctags, ...), go to the corresponding header file. Copy and paste the
function declaration and pass it to cppumockify.

The above steps can be automated within your editor or IDE. For CLion, you can
use it as an "external tool" and pass it automatically the name of the header
file and the copy and paste of the function declaration.

Add the generated mock file to the build. Open the generated mock file, check
and complete the mock boilerplate.

Rinse and repeat :-)


[CppUTest]: https://cpputest.github.io
[pycparser]: https://github.com/eliben/pycparser
sanic-openapi3 0.0.2
OpenAPI v3 support for Sanic

# Sanic OpenAPI v3

[![Build Status](https://travis-ci.org/zloyuser/sanic-openapi3.svg?branch=master)](https://travis-ci.org/zloyuser/sanic-openapi3)
[![PyPI](https://img.shields.io/pypi/v/sanic-openapi3.svg)](https://pypi.python.org/pypi/sanic-openapi3/)
[![PyPI](https://img.shields.io/pypi/pyversions/sanic-openapi3.svg)](https://pypi.python.org/pypi/sanic-openapi3/)

Give your Sanic API an OpenAPI v3 specification.
Based on original [Sanic OpenAPI](https://github.com/channelcat/sanic-openapi) extension.

## Installation

```shell
pip install sanic-openapi3
```

## Usage

### Import blueprint and use simple decorators to document routes:

```python
from sanic_openapi3 import openapi, openapi_blueprint

@app.get("/user/<user_id:int>")
@openapi.summary("Fetches a user by ID")
@openapi.response(200, { "user": { "name": str, "id": int } })
async def get_user(request, user_id):
    ...

@app.post("/user")
@openapi.summary("Creates a user")
@openapi.body({"user": { "name": str }})
async def create_user(request):
    ...

app.blueprint(openapi_blueprint)
```

You'll now have a specification at the URL `/openapi.json`.
Your routes will be automatically categorized by their blueprints.

### Model your input/output

```python
class Car:
    make = str
    model = str
    year = int

class Garage:
    spaces = int
    cars = [Car]

@app.get("/garage")
@openapi.summary("Gets the whole garage")
@openapi.response(200, Garage)
async def get_garage(request):
    return json({
        "spaces": 2,
        "cars": [{"make": "Nissan", "model": "370Z"}]
    })

```

### Get more descriptive

```python
class Car:
    make = doc.String("Who made the car")
    model = doc.String("Type of car.  This will vary by make")
    year = doc.Integer("4-digit year of the car", required=False)

class Garage:
    spaces = doc.Integer("How many cars can fit in the garage")
    cars = doc.List(Car, description="All cars in the garage")
```

### Configure all the things

```python
app.config.OPENAPI_VERSION = '1.0.0'
app.config.OPENAPI_TITLE = 'Car API'
app.config.OPENAPI_DESCRIPTION = 'Car API'
app.config.OPENAPI_TERMS_OF_SERVICE = 'https://example.com/terms'
app.config.OPENAPI_CONTACT_EMAIL = 'mail@example.com'
app.config.OPENAPI_CONTACT_NAME = 'mail@example.com'
```
bdtdecimaltowordsconverter 1.0.0
bdtdecimaltowordsconverter is created for converting decimal to word in both bangla and english in BDT format

## [BDT Decimal to Words Converter](https://pypi.org/project/bdtdecimaltowordconverter/)

## Prerequisites

* python 3x
* pip3

## Installation

**BEFORE YOU INSTALL:** please ensure the [prerequisites](#prerequisites)
```bash
pip install bdtdecimaltowordsconverter
```

## Usage

### import DecimalToWords from bdtdecimaltowordsconverter

```bash
from bdtdecimaltowordsconverter.bdtdecimaltowordsconverter import DecimalToWords

```

### make object of bdtdecimaltowordsconverter

```bash
decimal_to_words = DecimalToWords()
```
### call the convertAmount() function with your value
```bash
decimal_to_words.convertAmount(8.89, False, False, 'bng')
```

### parameters
##### (numericValue, is_ignorable_taka_if_zero, is_ignorable_paisa_if_zero, language)

* 1. number value that need to be converted. can be used interger or decimal
* 2. If you don't want to get zero value of taka, for an example you need to convert 0.23 and you want to skip/ignore zero in the return value then pass True otherwise False. If you pass False ( decimal_to_word.convertAmount(0.23, False, False, 'eng') ) then result will be 'zero taka and twenty three paisa only' and if you pass True ( decimal_to_word.convertAmount(0.23, True, False, 'eng') ) then result will be 'twenty three paisa only'
* 3. same as taka here is the value of paisa.
* 4. output language available languages
	'bng' for bangla and 'eng' for english

### [Javascript Version](http://jsfiddle.net/mahfuzcmt/vxmta5ua/1/)

### [Number Converter](https://github.com/mahfuzcmt/numberconverter)

## Contact with [Author](https://www.fb.com/mahfuzcmt)
numberconverter 1.0.0
numberconverter is created for converting english number to bangla number or reverse


## [BDT Decimal to Word Converter](https://pypi.org/project/engtobngnum/)

## Prerequisites

* python 3x
* pip3

## Installation

**BEFORE YOU INSTALL:** please ensure the [prerequisites](#prerequisites)
```bash
pip install numberconverter
```

## Usage

### import NumberConverter from numberconverter

```bash
from numberconverter.NumberConverter import Converter

```

### make object of engtobngnum

```bash
converter = Converter()
```
### call the converter() function with your value
```bash
converter.convert_bng_to_eng('০২/০৬/২০১৮')
or
converter.convert_eng_to_bng(8.89)
```


## Contact with [Author](https://www.fb.com/mahfuzcmt)