Skip to content

Commit

Permalink
Update README and Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
jettify committed Mar 17, 2023
1 parent 486173b commit 91aeddf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ sqlite.db
# virtual envs
venv*/
virtualenv*/
cscope.files
cscope.out
sqlite_*.db
_version.py
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -42,7 +42,7 @@ black:
black -l 79 $(FILES)

fmt:
isort ${FILES}
isort $(FILES)
black -l 79 ${FILES}

checkfmt:
Expand All @@ -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
28 changes: 13 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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_.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 91aeddf

Please sign in to comment.