Skip to content

Commit c6e8357

Browse files
authored
Merge pull request #24 from astropy/infrastructure-updates
Updated package infrastructure
2 parents efc0578 + c9bd931 commit c6e8357

File tree

10 files changed

+203
-177
lines changed

10 files changed

+203
-177
lines changed

.gitignore

Lines changed: 51 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,63 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### Python template
3-
# Byte-compiled / optimized / DLL files
4-
__pycache__/
1+
# Compiled files
52
*.py[cod]
6-
*$py.class
7-
8-
# C extensions
3+
*.a
4+
*.o
95
*.so
6+
*.pyd
7+
__pycache__
108

11-
# Distribution / packaging
12-
.Python
13-
env/
14-
build/
15-
develop-eggs/
16-
dist/
17-
downloads/
18-
eggs/
19-
.eggs/
20-
lib/
21-
lib64/
22-
parts/
23-
sdist/
24-
var/
25-
*.egg-info/
26-
.installed.cfg
27-
*.egg
28-
29-
# PyInstaller
30-
# Usually these files are written by a python script from a template
31-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32-
*.manifest
33-
*.spec
34-
35-
# Installer logs
36-
pip-log.txt
37-
pip-delete-this-directory.txt
38-
39-
# Unit test / coverage reports
40-
htmlcov/
41-
.tox/
42-
.coverage
43-
.coverage.*
44-
.cache
45-
nosetests.xml
46-
coverage.xml
47-
*,cover
48-
.hypothesis/
49-
50-
# Translations
51-
*.mo
52-
*.pot
53-
54-
# Django stuff:
55-
*.log
56-
local_settings.py
9+
# Ignore .c files by default to avoid including generated code. If you want to
10+
# add a non-generated .c extension, use `git add -f filename.c`.
11+
*.c
5712

58-
# Flask stuff:
59-
instance/
60-
.webassets-cache
13+
# Other generated files
14+
MANIFEST
6115

62-
# Scrapy stuff:
63-
.scrapy
16+
# Sphinx
17+
_build
18+
_generated
19+
docs/api
20+
docs/generated
6421

65-
# Sphinx documentation
66-
docs/_build/
67-
68-
# PyBuilder
69-
target/
70-
71-
# Jupyter Notebook
72-
.ipynb_checkpoints
73-
74-
# pyenv
75-
.python-version
22+
# Packages/installer info
23+
*.egg
24+
*.egg-info
25+
dist
26+
build
27+
eggs
28+
.eggs
29+
parts
30+
bin
31+
var
32+
sdist
33+
develop-eggs
34+
.installed.cfg
35+
distribute-*.tar.gz
7636

77-
# celery beat schedule file
78-
celerybeat-schedule
37+
# Other
38+
.cache
39+
.tox
40+
.*.swp
41+
.*.swo
42+
*~
43+
.project
44+
.pydevproject
45+
.settings
46+
.coverage
47+
cover
48+
htmlcov
49+
.pytest_cache
7950

80-
# dotenv
51+
# Env
52+
.venv
53+
venv
8154
.env
8255

83-
# virtualenv
84-
.venv/
85-
venv/
86-
ENV/
87-
88-
# Spyder project settings
89-
.spyderproject
56+
# Mac OSX
57+
.DS_Store
9058

91-
# Rope project settings
92-
.ropeproject
93-
94-
# PyCharm project settings
59+
# PyCharm
9560
.idea
61+
62+
*/version.py
63+
pip-wheel-metadata/

.travis.yml

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
# We set the language to c because python isn't supported on the MacOS X nodes
2+
# on Travis. However, the language ends up being irrelevant anyway, since we
3+
# install Python ourselves using conda.
14
language: c
25

6+
os:
7+
- linux
8+
9+
# Use Travis' container-based architecture
310
sudo: false
411

512
notifications:
@@ -10,29 +17,58 @@ notifications:
1017
if: type = cron
1118

1219
env:
13-
global:
14-
- CONDA_DEPENDENCIES="pytest pytest-cov numpy astropy"
15-
- PIP_DEPENDENCIES="codecov"
16-
matrix:
17-
- PYTHON_VERSION=2.7
18-
- PYTHON_VERSION=3.5
19-
- PYTHON_VERSION=3.6
20+
global:
21+
# The following versions are the 'default' for tests, unless
22+
# overidden underneath. They are defined here in order to save having
23+
# to repeat them for all configurations.
24+
- TOXENV='test'
25+
- TOXARGS='-v'
26+
- TOXPOSARGS=''
2027

21-
install:
22-
- git clone git://github.com/astropy/ci-helpers.git
23-
- source ci-helpers/travis/setup_conda.sh
28+
matrix:
29+
include:
2430

25-
# Make sure pytest-arraydiff wasn't installed by conda
26-
- conda remove pytest-arraydiff --force || true
31+
- language: python
32+
python: 3.6
33+
name: Python 3.6 and pytest 4.6 (Linux)
34+
env: TOXENV=py36-test-pytest46
2735

28-
# Need to use develop instead of install to make sure coverage works
29-
- pip install -e .
36+
- os: windows
37+
name: Python 3.6 and pytest 5.0 (Windows)
38+
env: PYTHON_VERSION=3.6
39+
TOXENV=py36-test-pytest50
3040

31-
script:
32-
- python -c 'import pytest_arraydiff.plugin'
33-
- pytest -vv --arraydiff --cov pytest_arraydiff tests
34-
- pytest -vv --cov pytest_arraydiff --cov-append tests
35-
- python setup.py check --restructuredtext
41+
- os: osx
42+
name: Python 3.7 and pytest 5.1 (MacOS X)
43+
env: PYTHON_VERSION=3.7
44+
TOXENV=py37-test-pytest51
45+
46+
- language: python
47+
python: 3.7
48+
name: Python 3.7 and pytest 5.2 (Linux)
49+
env: TOXENV=py37-test-pytest52
50+
51+
- os: windows
52+
name: Python 3.8 and pytest 5.3 (Windows)
53+
env: PYTHON_VERSION=3.8
54+
TOXENV=py38-test-pytest53
3655

37-
after_success:
38-
- codecov
56+
- language: python
57+
python: 3.8
58+
name: Python 3.8 and pytest 6.0 (Linux)
59+
env: TOXENV=py38-test-pytest60
60+
61+
- os: osx
62+
name: Python 3.8 and pytest dev (MacOS X)
63+
env: PYTHON_VERSION=3.8
64+
TOXENV=py38-test-pytestdev
65+
66+
install:
67+
- if [[ $TRAVIS_OS_NAME == osx || $TRAVIS_OS_NAME == windows ]]; then
68+
git clone git://github.com/astropy/ci-helpers.git;
69+
source ci-helpers/travis/setup_python.sh;
70+
fi
71+
72+
script:
73+
- pip install tox
74+
- tox $TOXARGS -- $TOXPOSARGS

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ include LICENSE
22
include README.rst
33
include CHANGES.md
44
include tox.ini
5+
include pyproject.toml
6+
include setup.cfg
7+
include setup.py
58

69
recursive-include tests *.py *.fits *.txt

appveyor.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build-system]
2+
requires = ["setuptools>=30.3.0",
3+
"setuptools_scm",
4+
"wheel"]
5+
build-backend = 'setuptools.build_meta'

pytest_arraydiff/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
__version__ = '0.4.dev0'
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
3+
from .version import version as __version__ # noqa

pytest_arraydiff/plugin.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import shutil
3737
import tempfile
3838
import warnings
39-
from distutils.version import StrictVersion
4039

4140
import six
4241
from six.moves.urllib.request import urlopen
@@ -213,10 +212,7 @@ def __init__(self, config, reference_dir=None, generate_dir=None, default_format
213212

214213
def pytest_runtest_setup(self, item):
215214

216-
if StrictVersion(pytest.__version__) < StrictVersion("3.6"):
217-
compare = item.get_marker('array_compare')
218-
else:
219-
compare = item.get_closest_marker('array_compare')
215+
compare = item.get_closest_marker('array_compare')
220216

221217
if compare is None:
222218
return

setup.cfg

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[metadata]
2+
name = pytest-arraydiff
3+
url = https://github.com/astrofrog/pytest-arraydiff
4+
author = The Astropy Developers
5+
author_email = [email protected]
6+
classifiers =
7+
Development Status :: 4 - Beta
8+
Framework :: Pytest
9+
Intended Audience :: Developers
10+
License :: OSI Approved :: BSD License
11+
Operating System :: OS Independent
12+
Programming Language :: Python
13+
Programming Language :: Python :: 3
14+
Programming Language :: Python :: 3 :: Only
15+
Programming Language :: Python :: 3.6
16+
Programming Language :: Python :: 3.7
17+
Programming Language :: Python :: 3.8
18+
Programming Language :: Python :: Implementation :: CPython
19+
Topic :: Software Development :: Testing
20+
Topic :: Utilities
21+
license = BSD
22+
description = pytest plugin to help with comparing array output from tests
23+
long_description = file: README.rst
24+
25+
[options]
26+
zip_safe = False
27+
packages = find:
28+
python_requires = >=3.6
29+
setup_requires =
30+
setuptools_scm
31+
install_requires =
32+
pytest>=4.6
33+
numpy
34+
astropy
35+
36+
[options.entry_points]
37+
pytest11 =
38+
pytest_arraydiff = pytest_arraydiff.plugin
39+
40+
[tool:pytest]
41+
minversion = 4.6
42+
testpaths = tests
43+
xfail_strict = true
44+
markers =
45+
array_compare : for functions using array comparison
46+
47+
[flake8]
48+
max-line-length = 100

0 commit comments

Comments
 (0)