Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Commit 11e2f21

Browse files
committed
Merge branch 'release/0.15.0'
2 parents 4206e2a + b5e96a5 commit 11e2f21

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

CHANGELOG

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2016-02-12 v0.15.0
2+
3+
* Summary: Improved handling of network issues while sending to REDCap.
4+
5+
* Adding exception handling for NewConnectionError in redi/utils/redcapClient.py (Nicholas Rejack)
6+
* Adding parenthesis to REDCAP_RECORDS_PROGRAM in vagrant/Makefile (Nicholas Rejack)
7+
18
2015-12-03 v0.14.4
29
* Summary: RED-I now has built-in log rotation.
310

redi/redi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"""
5555

5656
__author__ = "University of Florida CTS-IT Team"
57-
__version__ = "0.14.4"
57+
__version__ = "0.15.0"
5858
__email__ = "[email protected]"
5959
__status__ = "Development"
6060

redi/utils/redcapClient.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from redcap import Project, RedcapError
2121
from requests import RequestException
2222
from requests.packages.urllib3.exceptions import MaxRetryError
23+
from requests.packages.urllib3.exceptions import NewConnectionError
2324

2425
# Configure module's logger
2526
logger = logging.getLogger(__name__)
@@ -110,10 +111,13 @@ def send_data_to_redcap(self, data, max_retry_count, overwrite=False,
110111
try:
111112
# The following line simulates github issue #108:
112113
# raise MaxRetryError('', 'localhost:8998', None)
114+
# The following line simulates
115+
#raise NewConnectionError('localhost:8998', 443)
113116
response = self.project.import_records(data,
114117
overwrite=overwrite_value)
115118
return response
116-
except MaxRetryError as e:
119+
except (MaxRetryError, NewConnectionError) as e:
120+
logger.error("Exception encountered: ", exc_info = True)
117121
logger.debug(e.message + ", Attempt no.: " + str(retry_count))
118122
if (retry_count == max_retry_count):
119123
message = "Exiting since network connection timed out after"\

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
setup(
2020
name='redi',
21-
version='0.14.4',
21+
version='0.15.0',
2222
author='https://www.ctsi.ufl.edu/research/study-development/informatics-consulting/',
2323
author_email='[email protected]',
2424
packages=find_packages(exclude=['test']),
@@ -27,7 +27,7 @@
2727
'redi': ['utils/*.xsl', 'utils/*.xsd']
2828
},
2929
url='https://github.com/ctsit/redi',
30-
download_url = 'https://github.com/ctsit/redi/releases/tag/0.14.1',
30+
download_url = 'https://github.com/ctsit/redi/releases/tag/0.15.0',
3131
keywords = ['EMR', 'EHR', 'REDCap', 'Clinical Data'],
3232
license='BSD 3-Clause',
3333
description='REDCap Electronic Data Importer',

vagrant/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ifneq ("$(wildcard $(MAKE_CONFIG_FILE))", "")
2222
REDCAP_VM_URI := $(subst api/,,$(REDCAP_API_URI))
2323
REDCAP_VM_TOKEN := $(shell cat ${CONFIG_FILE} | sed -e 's/ //g' | grep -v '^\#' | grep 'token=' | cut -d '=' -f2)
2424
REDCAP_RECORDS_PROGRAM:=redcap_records
25-
REDCAP_RECORDS_CMD:=$REDCAP_RECORDS_PROGRAM --token=$(REDCAP_VM_TOKEN) --url=$(REDCAP_API_URI)
25+
REDCAP_RECORDS_CMD:=$(REDCAP_RECORDS_PROGRAM) --token=$(REDCAP_VM_TOKEN) --url=$(REDCAP_API_URI)
2626
REDCAP_PROJECT_ID := $(shell cat ${MAKE_CONFIG_FILE} | sed -e 's/ //g' | grep -v '^\#' | grep 'redcap_project_id=' | cut -d '=' -f2)
2727
REDCAP_PROJECT_FORMS := $(shell cat ${MAKE_CONFIG_FILE} | sed -e 's/ //g' | grep -v '^\#' | grep 'redcap_project_forms=' | cut -d '=' -f2)
2828
REDCAP_PROJECT_ENROLLMENT_FORM := $(shell cat ${MAKE_CONFIG_FILE} | sed -e 's/ //g' | grep -v '^\#' | grep 'redcap_project_enrollment_form=' | cut -d '=' -f2)
@@ -102,7 +102,7 @@ check_config:
102102
@test -f $(REDCAP_CODE_ZIP_FILE) || (echo 'Please obtain the redcap software zip file "$(REDCAP_CODE_ZIP_FILE)"' && exit 1)
103103
@test -d $(REDCAP_CODE_PLUGIN_FOLDER) || (echo 'WARNING: did not find a REDCap plugins folder "$(REDCAP_CODE_PLUGIN_FOLDER)"')
104104
@test -f $(ENROLLMENT_CSV_FILE) || (echo 'Config error: missing file "$(ENROLLMENT_CSV_FILE)"' && exit 1)
105-
@which $REDCAP_RECORDS_PROGRAM || (echo 'Config error: missing redcap_records command. Run "pip install redcap_cli" to install' && exit 1)
105+
@which $(REDCAP_RECORDS_PROGRAM) || (echo 'Config error: missing redcap_records command. Run "pip install redcap_cli" to install' && exit 1)
106106

107107
show_config: check_config
108108
@echo "$(MAKE_CONFIG_FILE) indicates that extra parameters should be read from : $(CONFIG_FILE)"

0 commit comments

Comments
 (0)