Skip to content

Commit

Permalink
Merge pull request #26 from alex3kov/master
Browse files Browse the repository at this point in the history
Doc clarification and style cleanups
  • Loading branch information
piranha authored Oct 9, 2018
2 parents fbdb5c0 + 36c3006 commit 406c218
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
/nomad.egg-info/
/dist/
/docs/_build/
/docs/.doctrees/
MANIFEST
/_py3/
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
3 changes: 1 addition & 2 deletions docs/urls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 5 additions & 2 deletions nomad/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -45,6 +47,7 @@ def inner(*args, **kwargs):
return func(repo=repo, *args, **kwargs)
return inner


app = Dispatcher(globaloptions=GLOBAL, middleware=getconfig)


Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions nomad/engine/sqla.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from nomad.engine import BaseEngine, DBError


class SAEngine(BaseEngine):
def connect(self):
return create_engine(self.url)
Expand Down
29 changes: 16 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python

import sys, os, re
import sys
import os
import re
from setuptools import setup, find_packages


Expand All @@ -19,22 +21,23 @@
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'))
return val


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 = '[email protected]',
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='[email protected]',
url='http://github.com/piranha/nomad/',
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
Expand All @@ -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)

Expand Down

0 comments on commit 406c218

Please sign in to comment.