Skip to content
Snippets Groups Projects
Commit eec67688 authored by Maeva Pourpoint's avatar Maeva Pourpoint
Browse files

Updated and tested data2passcal to work with Python 2 and 3

parent 2ba86aec
No related branches found
No related tags found
1 merge request!3Python 2/3 compatibility
Pipeline #682 passed with stage
in 1 minute and 3 seconds
This commit is part of merge request !3. Comments created here will be created in the context of that merge request.
......@@ -100,7 +100,7 @@ Tips
----
To run a subset of tests::
$ python -m unittest tests.test_data2passcal
$ python -m pytest tests/test_data2passcal.py
Deploying
---------
......
......@@ -25,3 +25,18 @@ History
* Updated list of platform specific dependencies to be installed when installing data2passcal (see setup.py)
* Installed and tested data2passcal against Python2.7 and Python3.6 using tox
* Formatted Python code to conform to the PEP8 style guide (exception: E722, E712, E501)
2020.114 (2020-04-23)
------------------
* Created conda packages for "data2passcal" that can run on Python2.7 and Python3.6
=> To create package:
- clone the "data2passcal" repo
- "cd" in "data2passcal" directory
- run "conda-build ."
=> To install locally with dependencies:
- run "conda install -c ${CONDA_PREFIX}/conda-bld/ data2passcal"
=> To install on user's computer from tarball with all dependencies:
- download tarball and "cd" to directory where tarball was downloaded
- run "conda install ./data2passcal-2020.114-py*_0.tar.bz2"
(choose appropriate python version for your platform)
- run "conda update data2passcal"
......@@ -5,7 +5,5 @@ include LICENSE
include README.rst
recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
recursive-include docs *.rst conf.py Makefile make.bat
"%PYTHON%" data2passcal\config.py
move config.ini data2passcal
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt
if errorlevel 1 exit 1
$PYTHON data2passcal/config.py
mv config.ini data2passcal
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
python:
- 2.7
- 3.6
target_platform: osx-64
package:
name: data2passcal
version: 2014.125
version: 2020.114
source:
path: ..
path: ../
build:
# If the installation is complex, or different between Unix and Windows, use
# separate bld.bat and build.sh files instead of this key. Add the line
# "skip: True # [py<35]" (for example) to limit to Python 3.5 and newer, or
# "skip: True # [not win]" to limit to Windows.
script: python setup.py install --single-version-externally-managed --record=record.txt
number: 0
entry_points:
- data2passcal = data2passcal.data2passcal:main
requirements:
build:
host:
- python
- setuptools
- configparser # [py<32]
run:
- python
- configparser # [py<32]
test:
requires:
- mock # [py<33]
- pytest
source_files:
- data2passcal/config.ini
- tests
commands:
- python -c "import data2passcal.data2passcal; print(data2passcal.__version__)"
- pytest
about:
home: https://git.passcal.nmt.edu/passoft/data2passcal
summary: Prepare SEED data for shipment to PASSCAL.
license: GPLv3
license_file: LICENSE
summary: Send MSEED files ready for archival at the DMC to PASSCAL's QC system
......@@ -4,4 +4,4 @@
__author__ = """IRIS PASSCAL"""
__email__ = 'software-support@passcal.nmt.edu'
__version__ = '2020.107'
__version__ = '2020.114'
......@@ -19,7 +19,7 @@ import struct
import sys
from time import sleep, time
VERSION = '2020.107'
VERSION = '2020.114'
# Cache the ftplib.FTP class so it will be available to test_FTP(FTP) when calling isinstance assert
......@@ -27,7 +27,7 @@ FTPCache = ftplib.FTP
# Parse configuration file
config = configparser.ConfigParser()
print(config.read('data2passcal/config.ini'))
config.read(os.path.dirname(os.path.realpath(__file__)) + '/config.ini')
# TEST related
......
[bumpversion]
current_version = 2020.107
current_version = 2020.114
commit = True
tag = True
......
......@@ -51,11 +51,11 @@ setup(
license="GNU General Public License v3",
long_description=readme + '\n\n' + history,
include_package_data=True,
package_data={'data2passcal': ['config.ini']},
keywords='data2passcal',
name='data2passcal',
packages=find_packages(include=['data2passcal']),
test_suite='tests',
url='https://git.passcal.nmt.edu/passoft/data2passcal',
version='2020.107',
version='2020.114',
zip_safe=False,
)
......@@ -12,7 +12,7 @@ import unittest
from data2passcal.data2passcal import get_FTP, ismseed, scan_dir, send2passcal
VERSION = '2020.107'
VERSION = '2020.114'
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment