Skip to content

Commit

Permalink
Merge branch 'release/4.18.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed Oct 6, 2019
2 parents 62066fe + ea93b5f commit 1eb6deb
Show file tree
Hide file tree
Showing 123 changed files with 32 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
branch = True
source =
mt940
tests
mt940_tests

omit =
*/mock/*
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cache:
# command to install dependencies, e.g. pip install -r requirements.txt
install:
- mkdir -p $PIP_WHEEL_DIR
- pip wheel -r tests/requirements.txt
- pip wheel -r mt940_tests/requirements.txt
- pip install -e .
- pip install tox coveralls

Expand Down
12 changes: 7 additions & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ Ready to contribute? Here's how to set up `mt940` for local development.

5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::

$ flake8 mt940 tests
$ flake8 mt940 mt940_tests
$ py.test
$ tox

To get flake8 and tox, just pip install them into your virtualenv using the requirements file.
$ pip install -r tests/requirements.txt
$ pip install -r mt940_tests/requirements.txt

6. Commit your changes and push your branch to GitHub with `git-flow-avh`_::

Expand All @@ -111,16 +111,18 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.7, 3.3, and for PyPy. Check
3. The pull request should work for Python 2.7, 3.4+, and for PyPy. Check
https://travis-ci.org/WoLpH/mt940/pull_requests
and make sure that the tests pass for all supported Python versions.
and make sure that the tests pass for all supported Python versions. To
test locally you can use `tox` which will run on all installed Python
versions.

Tips
----

To run a subset of tests::

$ py.test tests/some_test.py
$ py.test mt940_tests/some_test.py

.. _git-flow-avh: https://github.com/petervanderdoes/gitflow

2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ include CHANGES
include LICENSE
include README.rst
include requirements.txt
recursive-include tests *.py *.sta *.yml LICENSE
recursive-include mt940_tests *.py *.sta *.yml LICENSE
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ help:
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "lint - check style with flake8"
@echo "test - run tests quickly with the default Python"
@echo "testall - run tests on every Python version with tox"
@echo "test - run mt940_tests quickly with the default Python"
@echo "testall - run mt940_tests on every Python version with tox"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "release - package and upload a release"
Expand All @@ -24,7 +24,7 @@ clean-pyc:
find . -name '*~' -exec rm -f {} +

lint:
flake8 mt940 tests
flake8 mt940 mt940_tests

test:
py.test
Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Basic parsing:
import mt940
import pprint
transactions = mt940.parse('tests/jejik/abnamro.sta')
transactions = mt940.parse('mt940_tests/jejik/abnamro.sta')
print 'Transactions:'
print transactions
Expand All @@ -99,7 +99,7 @@ Set opening / closing balance information on each transaction:
],
))
with open('tests/jejik/abnamro.sta') as f:
with open('mt940_tests/jejik/abnamro.sta') as f:
data = f.read()
transactions.parse(data)
Expand All @@ -116,7 +116,7 @@ Simple json encoding:
import mt940
transactions = mt940.parse('tests/jejik/abnamro.sta')
transactions = mt940.parse('mt940_tests/jejik/abnamro.sta')
print(json.dumps(transactions, indent=4, cls=mt940.JSONEncoder))
Expand All @@ -135,7 +135,7 @@ To run the tests:

.. code-block:: shell
pip install -r tests/requirements.txt
pip install -r mt940_tests/requirements.txt
py.test
Or to run the tests on all available Python versions:
Expand Down
2 changes: 1 addition & 1 deletion mt940/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
statistics and manipulation.
'''.strip().split())
__email__ = 'wolph@wol.ph'
__version__ = '4.17.0'
__version__ = '4.18.0'
__license__ = 'BSD'
__copyright__ = 'Copyright 2015 Rick van Hattem (wolph)'
__url__ = 'https://github.com/WoLpH/mt940'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/test_parse.py → mt940_tests/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@


@pytest.mark.parametrize('filename,encoding', [
# ('tests/jejik/ing.sta', 'utf-8'),
# ('tests/self-provided/raphaelm.sta', 'utf-8'),
('tests/betterplace/with_binary_character.sta', 'utf-8'),
('mt940_tests/jejik/ing.sta', 'utf-8'),
('mt940_tests/self-provided/raphaelm.sta', 'utf-8'),
('mt940_tests/betterplace/with_binary_character.sta', 'utf-8'),
])
def test_non_ascii_parse(filename, encoding):
# Read as binary
Expand Down
14 changes: 7 additions & 7 deletions tests/test_processors.py → mt940_tests/test_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

@pytest.fixture
def sta_data():
with open('tests/jejik/abnamro.sta') as fh:
with open('mt940_tests/jejik/abnamro.sta') as fh:
return fh.read()


@pytest.fixture
def february_30_data():
with open('tests/self-provided/february_30.sta') as fh:
with open('mt940_tests/self-provided/february_30.sta') as fh:
return fh.read()


Expand All @@ -25,17 +25,17 @@ def test_date_fixup_pre_processor(february_30_data):


def test_parse_data():
with open('tests/jejik/abnamro.sta') as fh:
with open('mt940_tests/jejik/abnamro.sta') as fh:
mt940.parse(fh.read())


def test_parse_fh():
with open('tests/jejik/abnamro.sta') as fh:
with open('mt940_tests/jejik/abnamro.sta') as fh:
mt940.parse(fh)


def test_parse_filename():
mt940.parse('tests/jejik/abnamro.sta')
mt940.parse('mt940_tests/jejik/abnamro.sta')


def test_pre_processor(sta_data):
Expand Down Expand Up @@ -66,7 +66,7 @@ def test_post_processor(sta_data):

@pytest.fixture
def mBank_mt942_data():
with open('tests/mBank/mt942.sta') as fh:
with open('mt940_tests/mBank/mt942.sta') as fh:
return fh.read()


Expand All @@ -87,7 +87,7 @@ def test_mBank_processors(mBank_mt942_data):

@pytest.fixture
def mBank_with_newline_in_tnr():
with open('tests/mBank/with_newline_in_tnr.sta') as fh:
with open('mt940_tests/mBank/with_newline_in_tnr.sta') as fh:
return fh.read()


Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_tags.py → mt940_tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@pytest.fixture
def long_statement_number():
with open('tests/self-provided/long_statement_number.sta') as fh:
with open('mt940_tests/self-provided/long_statement_number.sta') as fh:
return fh.read()


Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[pytest]
python_files =
mt940/*.py
tests/*.py
mt940_tests/*.py

addopts =
--cov mt940
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ basepython =
py36: python3.6
pypy: pypy

deps = -r{toxinidir}/tests/requirements.txt
deps = -r{toxinidir}/mt940_tests/requirements.txt
# commands = python setup.py pytest {posargs}
commands = py.test {posargs}

[testenv:flake8]
basepython = python2.7
commands = flake8 --ignore=W391 mt940 tests {posargs}
commands = flake8 --ignore=W391 mt940 mt940_tests {posargs}
deps = flake8

[testenv:docs]
Expand Down

0 comments on commit 1eb6deb

Please sign in to comment.