diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6524a3fd7cb85e8093c49e99c381fdbc7c0230c9..e64f62795fca9a100537ce49245805bd1aa23309 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,22 +15,46 @@ cache: - .cache/pip stages: +- static analysis - test before_script: - pip install -e .[dev] +flake8: + image: python:3.6 + tags: passoft + stage: static analysis + script: + - flake8 --ignore=E722,E712,E501 data2passcal + - flake8 --ignore=E722,E712,E501 tests -python2: +python2.7: image: python:2.7 - tags: - - passoft + tags: passoft stage: test script: tox -e py27 -python3: +python3.5: + image: python:3.5 + tags: passoft + stage: test + script: tox -e py35 + +python3.6: image: python:3.6 - tags: - - passoft + tags: passoft stage: test script: tox -e py36 + +python3.7: + image: python:3.7 + tags: passoft + stage: test + script: tox -e py37 + +python3.8: + image: python:3.8 + tags: passoft + stage: test + script: tox -e py38 diff --git a/HISTORY.rst b/HISTORY.rst index 5c319c5fcb7d091c5ddb103d6dc878b81376f73b..1f0b042fe016998fce530e592d885d09d2a5ddcc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -40,3 +40,9 @@ History - run "conda install ./data2passcal-2020.114-py*_0.tar.bz2" (choose appropriate python version for your platform) - run "conda update data2passcal" + +2020.119 (2020-04-28) +------------------ +* Created conda packages for "data2passcal" that can run on Python3.[5,7,8] +* Tested data2passcal against Python3.[5,7,8] using tox +* Updated .gitlab-ci.yml to run a linter and unit tests for Python2 and Python3.[5,6,7,8] in GitLab CI pipeline diff --git a/conda.recipe/bld.bat b/conda.recipe/bld.bat deleted file mode 100644 index b9cd616ce4d9273557e30ece062955645916aeb2..0000000000000000000000000000000000000000 --- a/conda.recipe/bld.bat +++ /dev/null @@ -1,2 +0,0 @@ -"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt -if errorlevel 1 exit 1 diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh deleted file mode 100644 index a6609066d90c9754bd83da5f77a7c017e19608d7..0000000000000000000000000000000000000000 --- a/conda.recipe/build.sh +++ /dev/null @@ -1 +0,0 @@ -$PYTHON setup.py install --single-version-externally-managed --record=record.txt diff --git a/conda.recipe/conda_build_config.yaml b/conda.recipe/conda_build_config.yaml index b0e3e7797a0e50b86ac0203fdbd89c201eb3a12a..e1f365adb0f3f454a3958bd00907f34862452d6e 100644 --- a/conda.recipe/conda_build_config.yaml +++ b/conda.recipe/conda_build_config.yaml @@ -1,4 +1,6 @@ python: - - 2.7 + - 3.5 - 3.6 + - 3.7 + - 3.8 target_platform: osx-64 diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 43ddd10b0e25696c53e8499b5bb58314b1bf26bf..def80430edaaad6637afc32cf517bc1b99b0e6e7 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,12 +1,13 @@ package: name: data2passcal - version: 2020.114 + version: 2020.119 source: path: ../ build: number: 0 + script: python setup.py install --single-version-externally-managed --record=record.txt entry_points: - data2passcal = data2passcal.data2passcal:main diff --git a/data2passcal/__init__.py b/data2passcal/__init__.py index 3a08473ed7ec7352ef5ec141b7749c18bb91002b..fdf64fa1bbddd3c7a070eb155b0a5f81839cc2b1 100644 --- a/data2passcal/__init__.py +++ b/data2passcal/__init__.py @@ -4,4 +4,4 @@ __author__ = """IRIS PASSCAL""" __email__ = 'software-support@passcal.nmt.edu' -__version__ = '2020.114' +__version__ = '2020.119' diff --git a/data2passcal/data2passcal.py b/data2passcal/data2passcal.py index 554aad9f9186fc289640daa9f3a374739e8768b8..e9cb081a391fc7fb7731521fb8949c58fdaa7225 100644 --- a/data2passcal/data2passcal.py +++ b/data2passcal/data2passcal.py @@ -18,7 +18,7 @@ import struct import sys from time import sleep, time -VERSION = '2020.114' +VERSION = '2020.119' # Cache the ftplib.FTP class so it will be available to test_FTP(FTP) when calling isinstance assert diff --git a/setup.cfg b/setup.cfg index 379997ac164d680ab7b7db737261a1d12e2e1456..8f2587600687ded696bd8abc86bc7cfbcd9897aa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2020.114 +current_version = 2020.119 commit = True tag = True diff --git a/setup.py b/setup.py index 40dc85e039b2f3de2a3840f96862de35314d2833..d04d19d6d99b97b44644fccc6f2c55d640c6ee57 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,10 @@ setup( 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Natural Language :: English', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ], description="Prepare SEED data for shipment to PASSCAL.", entry_points={ @@ -33,15 +36,8 @@ setup( setup_requires=[], extras_require={ 'dev': [ - 'pip', - 'bumpversion', - 'wheel', - 'watchdog', 'flake8', 'tox', - 'coverage', - 'Sphinx', - 'twine', "mock;python_version<'3.3'" ] }, @@ -52,6 +48,6 @@ setup( name='data2passcal', packages=find_packages(include=['data2passcal']), url='https://git.passcal.nmt.edu/passoft/data2passcal', - version='2020.114', + version='2020.119', zip_safe=False, ) diff --git a/tests/test_data2passcal.py b/tests/test_data2passcal.py index 488878408c69d8af205c6078e4c48dbb111b9f4a..98ed5c291603e451fd20188fb5eb74efb81a5aee 100644 --- a/tests/test_data2passcal.py +++ b/tests/test_data2passcal.py @@ -10,22 +10,20 @@ import os import unittest from data2passcal.data2passcal import get_FTP, ismseed, scan_dir, send2passcal +from data2passcal.data2passcal import FTP_CONNECT_ATTEMPTS, FTP_SEND_ATTEMPTS try: from unittest.mock import patch except ImportError: from mock import patch -VERSION = '2020.114' +VERSION = '2020.119' FTP_HOST = 'qc.passcal.nmt.edu' FTP_USER = 'ftp' FTP_PASSWORD = 'data2passcal' FTP_DIR = 'AUTO/MSEED' FTP_TIMEOUT = 120 -FTP_RECONNECT_WAIT = 60 -FTP_CONNECT_ATTEMPTS = 60 * 60 * 24 * 7 / FTP_RECONNECT_WAIT -FTP_SEND_ATTEMPTS = 3 MOCK_TEST = True diff --git a/tox.ini b/tox.ini index d1ee218c28cea282e06e2caa6de96076edaf5e98..c56ce3f0eb6b4958deaac7559306ac5ea8512171 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,13 @@ [tox] -envlist = py27, py36, flake8 +envlist = py27, py35, py36, py37, py38, flake8 [travis] python = 2.7: py27 + 3.5: py35 3.6: py36 + 3.7: py37 + 3.8: py38 [testenv:flake8] basepython = python @@ -17,5 +20,5 @@ changedir = tests deps = mock commands = python -m unittest test_data2passcal -[testenv:py36] +[testenv] commands = python -m unittest