From 91aeddfed0dbb7540c2dcda263bea31174c415af Mon Sep 17 00:00:00 2001 From: Nikolay Novik Date: Fri, 17 Mar 2023 18:54:13 -0400 Subject: [PATCH] Update README and Makefile. --- .gitignore | 4 ++++ Makefile | 10 +++++++--- README.rst | 28 +++++++++++++--------------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 42d0f1a..3cbf15c 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,7 @@ sqlite.db # virtual envs venv*/ virtualenv*/ +cscope.files +cscope.out +sqlite_*.db +_version.py diff --git a/Makefile b/Makefile index f3b47e1..0fcd62c 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ FILES := aioodbc tests examples setup.py checkrst: python setup.py check --restructuredtext -lint: checkrst - flake8 aioodbc tests examples setup.py +lint: checkrst checkbuild + flake8 $(FILES) test: flake py.test -s $(FLAGS) ./tests/ @@ -42,7 +42,7 @@ black: black -l 79 $(FILES) fmt: - isort ${FILES} + isort $(FILES) black -l 79 ${FILES} checkfmt: @@ -57,4 +57,8 @@ run_examples: ci: cov run_examples +checkbuild: + python setup.py sdist bdist_wheel + twine check dist/* + .PHONY: all flake test vtest cov clean doc diff --git a/README.rst b/README.rst index d221332..39a9e8d 100644 --- a/README.rst +++ b/README.rst @@ -15,10 +15,9 @@ aioodbc **aioodbc** is a Python 3.7+ module that makes it possible to access ODBC_ databases with asyncio_. It relies on the awesome pyodbc_ library and preserves the same look and -feel. *aioodbc* was written using `async/await` syntax (PEP492_) and thus is not compatible -with Python versions older than 3.5. Internally *aioodbc* employs threads to avoid -blocking the event loop, threads_ are not that as bad as you think!. Other -drivers like motor_ use the same approach. +feel. Internally *aioodbc* employs threads to avoid blocking the event loop, +threads_ are not that as bad as you think!. Other drivers like motor_ use the +same approach. **aioodbc** is fully compatible and tested with uvloop_. Take a look at the test suite, all tests are executed with both the default event loop and uvloop_. @@ -123,28 +122,27 @@ You can install it using your package manager, for example:: $ sudo apt-get install unixodbc $ sudo apt-get install unixodbc-dev -then:: +Then:: pip install aioodbc Run tests --------- +To run tests locally without docker, install `unixodbc` and `sqlite` driver:: -For testing purposes you need to install docker_ and the development -requirements:: - - $ pip install -r requirements-dev.txt - + $ sudo apt-get install unixodbc + $ sudo apt-get install libsqliteodbc -Then just execute:: +Create virtualenv and install package with requirements:: - $ make test + $ pip install -r requirements-dev.txt -The test will automatically pull images and build containers with -the required databases. +Run tests, lints etc:: -*NOTE:* Running tests requires Python 3.6 or higher. + $ make fmt + $ make lint + $ make test Other SQL Drivers