Skip to content

Commit 8fc38fd

Browse files
committed
Merge branch 'release/0.2.0'
2 parents 05524b9 + 8f7ffe4 commit 8fc38fd

6 files changed

Lines changed: 32 additions & 7 deletions

File tree

autoarray/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
from autoarray import plotters as plot
1515
from autoarray import conf
1616

17-
__version__ = "0.1.1"
17+
__version__ = '0.2.0'

release.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ set +e
2121
git commit -m "Incremented version number"
2222
set -e
2323

24-
python setup.py tests sdist bdist_wheel
24+
pytest $p
25+
26+
python setup.py sdist bdist_wheel
2527
twine upload dist/* --skip-existing --username $PYPI_USERNAME --password $PYPI_PASSWORD
2628

2729
# docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD

setup.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
11
from codecs import open
22
from os.path import abspath, dirname, join
3+
from subprocess import call
34

4-
from setuptools import find_packages, setup
5+
from setuptools import find_packages, setup, Command
56

67
from autoarray import __version__
78

9+
10+
class RunTests(Command):
11+
"""Run all tests."""
12+
13+
description = "run tests"
14+
user_options = []
15+
16+
def initialize_options(self):
17+
pass
18+
19+
def finalize_options(self):
20+
pass
21+
22+
def run(self):
23+
"""Run all tests!"""
24+
errno = call(["py.test", "--cov=autolens", "--cov-report=term-missing"])
25+
raise SystemExit(errno)
26+
27+
828
this_dir = abspath(dirname(__file__))
929
with open(join(this_dir, "README.md"), encoding="utf-8") as file:
1030
long_description = file.read()
@@ -40,6 +60,6 @@
4060
keywords="cli",
4161
packages=find_packages(exclude=["docs"]),
4262
install_requires=requirements,
43-
setup_requires=["pytest-runner"],
44-
tests_require=["pytest"],
63+
extras_require={"test": ["coverage", "pytest", "pytest-cov"]},
64+
cmd_class={"test": RunTests}
4565
)

test_autoarray/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import os
2-
31
import pytest
42
from matplotlib import pyplot
53

4+
65
class PlotPatch(object):
76
def __init__(self):
87
self.paths = []
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[[4.0, 4.0], [5.0, 5.0]]
2+
[[6.0, 6.0], [7.0, 7.0], [8.0, 8.0]]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[[1.0, 1.0], [2.0, 2.0]]
2+
[[3.0, 3.0], [4.0, 4.0], [5.0, 6.0]]

0 commit comments

Comments
 (0)