diff --git a/.gitignore b/.gitignore index 71be40a..d60317c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ /nomad.egg-info/ /dist/ /docs/_build/ +/docs/.doctrees/ MANIFEST /_py3/ diff --git a/docs/conf.py b/docs/conf.py index 17ae30a..0b1c611 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +import setup as appsetup import sys sys.path.insert(0, '..') -import setup as appsetup extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc'] source_suffix = '.rst' diff --git a/docs/urls.rst b/docs/urls.rst index 7f76752..c6c4cd6 100644 --- a/docs/urls.rst +++ b/docs/urls.rst @@ -14,8 +14,7 @@ SQLAlchemy library. URL can be specified in few different ways: - - ``url`` - just a string, path like ``sqlite:///test.db`` or - ``mysql://user:pass@host/db`` + - ``url`` - just a string, path like ``sqlite:///test.db`` (*relative* path) or ``sqlite:////path/to/test.db`` or ``mysql://user:pass@host/db``. Note how you end up with **4** slashes when using absolute path. - ``url-python`` - taking variable from Python module, has two approaches to fetching python module: diff --git a/nomad/__init__.py b/nomad/__init__.py index 836031b..92808e4 100755 --- a/nomad/__init__.py +++ b/nomad/__init__.py @@ -1,7 +1,9 @@ #!/usr/bin/env python from __future__ import print_function -import os, os.path as op, sys +import os +import os.path as op +import sys from datetime import date from opster import Dispatcher @@ -45,6 +47,7 @@ def inner(*args, **kwargs): return func(repo=repo, *args, **kwargs) return inner + app = Dispatcher(globaloptions=GLOBAL, middleware=getconfig) @@ -116,7 +119,7 @@ def create(name, def apply(all=('a', False, 'apply all available migrations'), init=('', False, 'init if not initialized yet'), env=('e', [], 'list of additional environment variables'), - fake=('', False, 'record migration as applied, but do not do anything'), + fake=('', False, 'record migration as applied, but do nothing'), *names, **opts): '''Apply migration and all of it dependencies diff --git a/nomad/engine/sqla.py b/nomad/engine/sqla.py index 639bedb..358afe5 100644 --- a/nomad/engine/sqla.py +++ b/nomad/engine/sqla.py @@ -2,6 +2,7 @@ from nomad.engine import BaseEngine, DBError + class SAEngine(BaseEngine): def connect(self): return create_engine(self.url) diff --git a/setup.py b/setup.py index df40c59..d221a83 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,8 @@ #!/usr/bin/env python -import sys, os, re +import sys +import os +import re from setuptools import setup, find_packages @@ -19,6 +21,7 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() + def find_version(): val, = re.findall(r"__version__ = '([^']+)'", read('nomad/__init__.py')) @@ -26,15 +29,15 @@ def find_version(): config = dict( - name = 'nomad', - description = 'simple sql migration tool to save you from becoming mad', - long_description = read('README.rst'), - license = 'ISC', - version = find_version(), - author = 'Alexander Solovyov', - author_email = 'alexander@solovyov.net', - url = 'http://github.com/piranha/nomad/', - classifiers = [ + name='nomad', + description='simple sql migration tool to save you from becoming mad', + long_description=read('README.rst'), + license='ISC', + version=find_version(), + author='Alexander Solovyov', + author_email='alexander@solovyov.net', + url='http://github.com/piranha/nomad/', + classifiers=[ 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', @@ -45,9 +48,9 @@ def find_version(): 'Topic :: Database' ], - install_requires = DEPS, - packages = find_packages(), - entry_points = {'console_scripts': ['nomad=nomad:app.dispatch']}, + install_requires=DEPS, + packages=find_packages(), + entry_points={'console_scripts': ['nomad=nomad:app.dispatch']}, platforms='any', **extra)