Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor mainline to dipppy #5

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
mainline
Dipp.py
========

Power, precision, pronouns

Simple yet powerful python dependency injection.

Tested with Python 2.7, 3.4, 3.5.
Expand All @@ -11,13 +13,18 @@ Tested with Python 2.7, 3.4, 3.5.
- API Docs: http://mainline.readthedocs.org/en/latest/mainline.html
- PyPi: https://pypi.python.org/pypi/mainline

Note
----
This project was previously called mainline. While we transition to the new name, some links (including the ones above) may still reference the old Mainline name.

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

Old versions may still be installed using the 'mainline' name.

.. code:: sh

pip install mainline
pip install dipp.py



Expand Down
9 changes: 9 additions & 0 deletions dipppy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from dipppy._version import __version__

from dipppy.exceptions import DiError, UnresolvableError, UnprovidableError

from dipppy.di import Di
from dipppy.catalog import Catalog
from dipppy.provider import Provider, provider_factory
from dipppy.scope import NoneScope, GlobalScope, ProcessScope, ThreadScope, \
ProxyScope, NamespacedProxyScope
File renamed without changes.
4 changes: 2 additions & 2 deletions mainline/catalog.py → dipppy/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import six
import abc

from mainline.utils import ProxyMutableMapping
from mainline.provider import IProvider
from dipppy.utils import ProxyMutableMapping
from dipppy.provider import IProvider

_sentinel = object()
_provider_mapping_factory = dict
Expand Down
10 changes: 5 additions & 5 deletions mainline/di.py → dipppy/di.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import functools

from mainline.catalog import ICatalog, Catalog
from mainline.exceptions import UnresolvableError
from mainline.injection import ClassPropertyInjector, AutoSpecInjector, SpecInjector
from mainline.scope import ScopeRegistry, NoneScope, GlobalScope
from mainline.provider import Provider, provider_factory
from dipppy.catalog import ICatalog, Catalog
from dipppy.exceptions import UnresolvableError
from dipppy.injection import ClassPropertyInjector, AutoSpecInjector, SpecInjector
from dipppy.scope import ScopeRegistry, NoneScope, GlobalScope
from dipppy.provider import Provider, provider_factory

_sentinel = object()

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions mainline/injection.py → dipppy/injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import six
import wrapt

from mainline.exceptions import DiError
from mainline.utils import OBJECT_INIT, classproperty
from dipppy.exceptions import DiError
from dipppy.utils import OBJECT_INIT, classproperty


class Injector(object):
Expand Down
4 changes: 2 additions & 2 deletions mainline/provider.py → dipppy/provider.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import functools

from mainline.exceptions import UnprovidableError
from mainline.scope import ScopeRegistry, NoneScope
from dipppy.exceptions import UnprovidableError
from dipppy.scope import ScopeRegistry, NoneScope
_sentinel = object()


Expand Down
2 changes: 1 addition & 1 deletion mainline/scope.py → dipppy/scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import threading
import collections

from mainline.utils import ProxyMutableMapping
from dipppy.utils import ProxyMutableMapping


class IScope(ProxyMutableMapping):
Expand Down
File renamed without changes.
9 changes: 0 additions & 9 deletions mainline/__init__.py

This file was deleted.

8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
import sys

__version__ = 'unknown' # This is ovewritten by the execfile below
exec (open('mainline/_version.py').read())
exec (open('dipppy/_version.py').read())

def parse_requirements(filename):
ret = [line.strip() for line in open(filename).read().splitlines()]
ret = [x for x in ret if x and not x[0] in ['#', '-']]
return ret

conf = dict(
name='mainline',
name='dipp.py',
description='Simple yet powerful python dependency injection for py2/py3k',
url='http://github.com/vertical-knowledge/mainline',
url='http://github.com/vertical-knowledge/dipppy',
author='Vertical Knowledge',
author_email='ops@vertical-knowledge.com',
license='GPL',
keywords=['dependency', 'injection', 'ioc'],
classifiers=[],

version=__version__,
packages=['mainline'],
packages=['dipp.py'],

install_requires=parse_requirements('requirements/install.txt'),
tests_require=parse_requirements('requirements/test.txt'),
Expand Down