Skip to content

Commit 99781d2

Browse files
authored
Merge pull request #12 from zbrookle/installation
Installation
2 parents 547fa0d + cc97275 commit 99781d2

11 files changed

Lines changed: 2544 additions & 12 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dataframe_sql/_version.py export-subst

LICENSE.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2011-2020, Open source contributors.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
* Neither the name of the copyright holder nor the names of its
16+
contributors may be used to endorse or promote products derived from
17+
this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include versioneer.py
2+
include dataframe_sql/_version.py

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,32 @@
22

33
![CI](https://github.com/zbrookle/dataframe_sql/workflows/CI/badge.svg)
44

5-
## Execution plan
5+
## Installation
6+
7+
```bash
8+
pip install dataframe_sql
9+
```
10+
11+
## Usage
12+
13+
In this simple example, a DataFrame is read in from a csv and then using the query
14+
function you can produce a new DataFrame from the sql query.
15+
16+
```python
17+
from pandas import read_csv
18+
from dataframe_sql import register_temp_table, query
619

20+
my_table = read_csv("some_file.csv")
21+
22+
register_temp_table(my_table)
23+
24+
query(""""select * from my_table""")
25+
```
26+
27+
The package currently only supports pandas but there are plans to support dask and
28+
rapids in the future.
29+
30+
## Execution plan
731

832
### Values of certain "random" variables
933
In certain places it was necessary to create functionality that pandas doesn't support

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
132132
# Check for the following code in testing: `unittest.mock`, `mock.Mock()` or `mock.patch`
133133
MSG='Check that unittest.mock is not used (pytest builtin monkeypatch fixture should be used instead)' ; echo $MSG
134134
invgrep -r -E --include '*.py' '(unittest(\.| import )mock|mock\.Mock\(\)|mock\.patch)' dataframe_sql/tests/
135-
echo $?
136135
RET=$(($RET + $?)) ; echo $MSG "DONE"
137136

138137
MSG='Check for extra blank lines after the class definition' ; echo $MSG

dataframe_sql/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# flake8: noqa
22
from dataframe_sql.sql_select_query import query, register_temp_table, remove_temp_table
3+
4+
from ._version import get_versions
5+
6+
__version__ = get_versions()["version"]
7+
del get_versions

0 commit comments

Comments
 (0)