semvec/pypi-packages huggingface dataset:
pytest-sql-bigquery 0.0.3
Yet another SQL-testing framework for BigQuery provided by pytest plugin 
License: MIT
Requires Python: >=3.7,<4.0
Keywords: sql,bigquery,pytest


# Pytest plugin for Bigquery SQL

pytest-sql-bigquery is pytest-plugin which provides a sql-unitest-framework for BigQuery.
This plugin adopts an end-to-end approch that runnning SQL test on SQL engines.

## Yet anthoer approch to tst SQL code

See following SQL codes:

```sql
with dataset as (
    select 1
    union all select 2
)
, __check_sample as (
    select 'test' as label, count(1) as actual, 2 as expected from dataset 
)

select * from dataset
```

This code is minimal example including test case.
`__check_sample` is a test case which makes sure the `dataset` view has just 2 record.


Our idea is very simple: "Verify SQL code by SQL-self."

This plugin generate SQL test codes from SQL and executed them on SQL-engine such as BigQuery.

The advantages of this approch are 

- SQL codes owns specification itself
- Provide portability of logic and its test codes. 
- Free to hard-mocking database system


# Get Started

## Requirements

- Python >= 3.7
- sqlparse
- google-cloud-bigquery (For BigQuery integration)

- BigQuery (Google Cloud Project)

## Install

```
pip install pytest-bigquery-sql
```

Then, set up `confidist.py` for pytest settings.

```python
import pytest

from pytest_sql_bigquery.integrations.pytest import SQLReaderForChecking

class ChainPytestFile(pytest.File):

    def __init__(self, path, parent, chains, **kwargs):
        super().__init__(path, parent, **kwargs)
        self.chains = chains

    def collect(self):
        for interpreter in self.chains:
            yield from interpreter.collect()

def pytest_collect_file(parent, path):
    if path.ext == ".sql":
        return ChainPytestFile(
            path, parent,
            [
                SQLReaderForChecking(path, parent),
            ])
```

Run test for `examples/sql` directory

```
pytest run -vv examples/sql 
```
task-planner 1.2.3
A task planner for the terminal.
License: MIT

# Task

## Overview

*Task* is a task planning tool for the command line.

## Installation

```bash
python -m pip install task-planner
```

## Command reference

```
usage: python -m task [] [order] [add] [priority] [do] [done]

View all tasks:
python -m task
python -m task order <task|priority|status>

Add a task:
python -m task add "<name>"
python -m task add "<name>" priority <priority>

Set the priority of an existing task:
python -m task priority <priority> for <task id>

Set a task to doing:
python -m task do <task id>

Delete a task:
python -m task done <task id>
```

## License

Copyright (c) 2019, Yannick Kirschen, All rights reserved.
Licensed under the [MIT License](https://github.com/yannickkirschen/task/blob/master/LICENSE).
Happy forking :)