Skip to content

Commit f52086e

Browse files
committed
renamed application_logic to business_logic
1 parent e39a6ca commit f52086e

16 files changed

+27
-27
lines changed

CONTRIBUTING.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Ready to contribute? Here's how to set up `python-business-logic` for local deve
7777
5. When you're done making changes, check that your changes pass flake8 and the
7878
tests, including testing other Python versions with tox::
7979

80-
$ flake8 application_logic tests
80+
$ flake8 business_logic tests
8181
$ python setup.py test
8282
$ tox
8383

@@ -109,4 +109,4 @@ Tips
109109

110110
To run a subset of tests::
111111

112-
$ python -m unittest tests.test_application_logic
112+
$ python -m unittest tests.test_business_logic

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ include CONTRIBUTING.rst
33
include HISTORY.rst
44
include LICENSE
55
include README.rst
6-
recursive-include application_logic *.html *.png *.gif *js *.css *jpg *jpeg *svg *py
6+
recursive-include business_logic *.html *.png *.gif *js *.css *jpg *jpeg *svg *py

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ clean-pyc: ## remove Python file artifacts
2828
find . -name '*~' -exec rm -f {} +
2929

3030
lint: ## check style with flake8
31-
flake8 application_logic tests
31+
flake8 business_logic tests
3232

3333
test: ## run tests quickly with the default Python
3434
python runtests.py tests
@@ -37,15 +37,15 @@ test-all: ## run tests on every Python version with tox
3737
tox
3838

3939
coverage: ## check code coverage quickly with the default Python
40-
coverage run --source application_logic runtests.py tests
40+
coverage run --source business_logic runtests.py tests
4141
coverage report -m
4242
coverage html
4343
xdg-open htmlcov/index.html
4444

4545
docs: ## generate Sphinx HTML documentation, including API docs
4646
rm -f docs/python-business-logic.rst
4747
rm -f docs/modules.rst
48-
sphinx-apidoc -o docs/ application_logic
48+
sphinx-apidoc -o docs/ business_logic
4949
$(MAKE) -C docs clean
5050
$(MAKE) -C docs html
5151
$(BROWSER) docs/_build/html/index.html
File renamed without changes.

application_logic/core.py renamed to business_logic/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import functools
22

3-
from application_logic.exceptions import ServiceException
3+
from business_logic.exceptions import ServiceException
44

55

66
def validated_by(validation_func):

application_logic/errors.py renamed to business_logic/errors.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
from application_logic import exceptions
1+
from business_logic import exceptions
22
from six import with_metaclass
33

44

55
class ServicesErrorsMetaclass(type):
66
"""
77
Metaclass automatically creating errors registry and setting error code to attribute name.
8-
You should subclass this and set all possible application logic exceptions.
8+
You should subclass this and set all possible business logic exceptions.
99
"""
1010
def __init__(cls, name, bases, dict):
1111
super(ServicesErrorsMetaclass, cls).__init__(name, bases, dict)
File renamed without changes.

application_logic/tests.py renamed to business_logic/tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ def __exit__(self, exc_type, exc_val, exc_tb):
1313
return True
1414

1515

16-
class ApplicationLogicTestMixin(object):
16+
class BusinessLogicTestMixin(object):
1717

1818
shouldRaiseException = shouldRaiseException

docs/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
parent = os.path.dirname(cwd)
2323
sys.path.append(parent)
2424

25-
import application_logic
25+
import business_logic
2626

2727
# -- General configuration -----------------------------------------------------
2828

@@ -54,9 +54,9 @@
5454
# built documents.
5555
#
5656
# The short X.Y version.
57-
version = application_logic.__version__
57+
version = business_logic.__version__
5858
# The full version, including alpha/beta/rc tags.
59-
release = application_logic.__version__
59+
release = business_logic.__version__
6060

6161
# The language for content autogenerated by Sphinx. Refer to documentation
6262
# for a list of supported languages.

setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ tag = True
55

66
[bumpversion:file:setup.py]
77

8-
[bumpversion:file:application_logic/__init__.py]
8+
[bumpversion:file:business_logic/__init__.py]
99

1010
[wheel]
1111
universal = 1
1212

1313
[flake8]
1414
ignore = D203
1515
exclude =
16-
application_logic/migrations,
16+
business_logic/migrations,
1717
.git,
1818
.tox,
1919
docs/conf.py,

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
def get_version(*file_paths):
14-
"""Retrieves the version from application_logic/__init__.py"""
14+
"""Retrieves the version from business_logic/__init__.py"""
1515
filename = os.path.join(os.path.dirname(__file__), *file_paths)
1616
version_file = open(filename).read()
1717
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
@@ -21,7 +21,7 @@ def get_version(*file_paths):
2121
raise RuntimeError('Unable to find version string.')
2222

2323

24-
version = get_version("application_logic", "__init__.py")
24+
version = get_version("business_logic", "__init__.py")
2525

2626

2727
if sys.argv[-1] == 'publish':
@@ -53,7 +53,7 @@ def get_version(*file_paths):
5353
author_email='[email protected]',
5454
url='https://github.com/Valian/python-business-logic',
5555
packages=[
56-
'application_logic',
56+
'business_logic',
5757
],
5858
include_package_data=True,
5959
install_requires=[],

tests/services.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from application_logic.core import validator, validated_by
1+
from business_logic.core import validator, validated_by
22

33

44
@validator

tests/test_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import mock
1212
from unittest import TestCase
1313

14-
from application_logic import core, exceptions
14+
from business_logic import core, exceptions
1515

1616

1717
class TestPermissionResult(TestCase):

tests/test_errors.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
from unittest import TestCase
33

4-
from application_logic import errors, exceptions
5-
from application_logic.tests import ApplicationLogicTestMixin
4+
from business_logic import errors, exceptions
5+
from business_logic.tests import BusinessLogicTestMixin
66

77

88
class TestErrors(errors.ServicesErrors):
@@ -14,7 +14,7 @@ class TestErrors(errors.ServicesErrors):
1414
"This action is permitted just because :)")
1515

1616

17-
class TestErrorsAPI(ApplicationLogicTestMixin, TestCase):
17+
class TestErrorsAPI(BusinessLogicTestMixin, TestCase):
1818

1919
def test_service_errors_magically_receives_error_codes(self):
2020
self.assertEqual(TestErrors.generic_error.error_code, 'generic_error')

tests/test_utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from unittest import TestCase
22

3-
from application_logic.tests import ApplicationLogicTestMixin
3+
from business_logic.tests import BusinessLogicTestMixin
44

55

6-
class TestUtilsTest(ApplicationLogicTestMixin, TestCase):
6+
class TestUtilsTest(BusinessLogicTestMixin, TestCase):
77

88
def test_not_raising_exceptions_fails(self):
99
try:

tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ envlist =
44

55
[testenv]
66
setenv =
7-
PYTHONPATH = {toxinidir}:{toxinidir}/application_logic
8-
commands = coverage run --source application_logic -m unittest discover
7+
PYTHONPATH = {toxinidir}:{toxinidir}/business_logic
8+
commands = coverage run --source business_logic -m unittest discover
99
deps =
1010
-r{toxinidir}/requirements_test.txt
1111
basepython =

0 commit comments

Comments
 (0)