Skip to content

Commit

Permalink
Merge 6621014 into d1e686a
Browse files Browse the repository at this point in the history
  • Loading branch information
Pegase745 committed Mar 24, 2019
2 parents d1e686a + 6621014 commit 871f3a2
Show file tree
Hide file tree
Showing 47 changed files with 1,630 additions and 1,550 deletions.
4 changes: 0 additions & 4 deletions .bumpversion.cfg

This file was deleted.

111 changes: 88 additions & 23 deletions .gitignore
@@ -1,41 +1,106 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
lib
lib64
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.tox
nosetests.xml
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# Mr Developer
.mr.developer.cfg
.project
.pydevproject
# mypy
.mypy_cache/

# Virtualenv folders
local
include
*.sqlite
*.sqlite
14 changes: 4 additions & 10 deletions .travis.yml
Expand Up @@ -3,19 +3,13 @@ sudo: false
language: python

python:
- "2.7"
- "3.5"
- "pypy"
- "3.6"

install:
- pip install -U pip
- pip install -U setuptools
- pip install .
- pip install faker
- pip install pytest-cov
- make install
- make lint

script:
- py.test --cov=./datatables
script: make test-ci

after_success:
- bash <(curl -s https://codecov.io/bash)
2 changes: 0 additions & 2 deletions MANIFEST.in
@@ -1,6 +1,4 @@
include *.in
include .bumpversion.cfg
include LICENSE
recursive-include tests *.py
prune bin
prune examples
23 changes: 23 additions & 0 deletions Makefile
@@ -0,0 +1,23 @@
.PHONY: all install lint test clean

all: install lint test

install:
pip install -e .[dev]

install-examples:
pip install -e .[examples]

lint:
flake8
isort -rc -c -df **/*.py
yapf -dr datatables/ tests/ examples/

test:
pytest -vx

test-ci:
pytest -qx --cov=datatables

clean:
git clean -dfX
74 changes: 37 additions & 37 deletions README.rst
@@ -1,12 +1,6 @@
=================================================================
`sqlalchemy-datatables <http://sqlalchemy-datatables.rtfd.org/>`_
=================================================================

sqlalchemy-datatables is a library providing an `SQLAlchemy <http://www.sqlalchemy.org/>`_ integration of jQuery `DataTables <http://datatables.net/>`_. It helps you manage server side requests in your application.

It is framework agnostic, tested with `Pyramid <http://www.pylonsproject.org/>`_ and `Flask <http://flask.pocoo.org/>`_ mainly.

It only depends on SQLAlchemy, and is compatible with version **1.10.x** of DataTables.
======================
sqlalchemy-datatables
======================

|Build Status| |PyPi Version| |Coverage|

Expand All @@ -19,21 +13,45 @@ It only depends on SQLAlchemy, and is compatible with version **1.10.x** of Data
.. |Coverage| image:: https://codecov.io/gh/Pegase745/sqlalchemy-datatables/branch/master/graph/badge.svg
:target: https://codecov.io/gh/Pegase745/sqlalchemy-datatables

sqlalchemy-datatables is a framework agnostic library providing an `SQLAlchemy <http://www.sqlalchemy.org/>`_ integration of jQuery `DataTables <http://datatables.net/>`_ >= 1.10, and helping you manage server side requests in your application.

Installation
------------

To install the stable version:
**To install via pip:**

*Python 2*

.. code-block:: bash
$ pip install sqlalchemy-datatables
*Python 3*

.. code-block:: bash
$ pip3 install sqlalchemy-datatables
**To install from source:**

.. code-block:: bash
pip install sqlalchemy-datatables
$ git clone git@github.com:Pegase745/sqlalchemy-datatables.git
$ cd sqlalchemy-datatables
$ pip install .
**To contribute:**

.. code-block:: bash
In a virtualenv
$ git clone git@github.com:Pegase745/sqlalchemy-datatables.git
$ cd sqlalchemy-datatables
$ make all
Usage
-----

**views.py**

.. code-block:: python
@view_config(route_name='data', renderer='json')
Expand Down Expand Up @@ -65,36 +83,18 @@ Usage
# returns what is needed by DataTable
return rowTable.output_result()
Examples
--------

You can find a detailed working example for Pyramid and Flask in the repository, including per column search, and one with the `yadcf <https://github.com/vedmack/yadcf/>`_ plugin.

**Pyramid example:**

.. code-block:: bash
# go to directory
cd sqlalchemy-datatables/examples/pyramid_tut
# install example app
pip install -e .
# initialize the database
initialize_pyramid_tut_db development.ini
# start server
pserve development.ini
# browse to localhost:6543
Documentation
-------------
You can find working examples `in the repository <examples>`_, including an integration with the `yadcf <https://github.com/vedmack/yadcf/>`_ plugin:

The latest documentation is available online on `Read the Docs <http://sqlalchemy-datatables.readthedocs.org/en/latest/>`_.
- `Pyramid example <examples/pyramid_tut/README.rst>`_
- `Flask example <examples/flask_tut/README.rst>`_

Changelog
---------

All notable changes to this project will be documented in `this section <CHANGELOG.rst>`_.
All notable changes to this project will be documented in `this section <https://github.com/Pegase745/sqlalchemy-datatables/releases>`_.

This project adheres to `Semantic Versioning <http://semver.org/>`_ and `Keep A Changelog <http://keepachangelog.com/>`_.

Expand Down
30 changes: 0 additions & 30 deletions bin/release

This file was deleted.

0 comments on commit 871f3a2

Please sign in to comment.