Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ufl-taeber committed Nov 7, 2019
2 parents d358519 + fd9593a commit be940dd
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 75 deletions.
26 changes: 14 additions & 12 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Lineman Authors
Authors

The RED-I Project would not be possible without the generous contributions of
our authors and contributors. Lineman is a tool that contributes to RED-I by
ensuring that all your JSON data will be REDCAP compliant.
Cappy is a tool that contributes to RED-I by ensuring that all your JSON data
will be REDCap compliant. The RED-I Project would not be possible without the
generous contributions of our authors and contributors.

David R Nelson and his HCV Target project and the University of Florida
Clinical Translational Science Institute for providing the seed funding
that launched the RED-I Project.
David R. Nelson and his HCV Target project and the University of Florida
Clinical Translational Science Institute provded the seed funding that launched
the RED-I Project.

Patrick F. White (pfwhite9@gmail.com) Inventor
Christopher P. Barnes (senrabc@gmail.com)
Matthew J. McConnell (devmattm@gmail.com)
Michael J. Buchholz (ufbuck72@gmail.com)
Patrick F. White (pfwhite9@gmail.com) Inventor
Christopher P. Barnes (senrabc@gmail.com)
Naomi Bruan (looseymoose@ufl.edu)
Michael J. Buchholz (ufbuck72@gmail.com)
Matthew J. McConnell (devmattm@gmail.com)
Taeber Rapczak (taeber@ufl.edu)


Many thanks to David Nelson, Mike Freid, Joy Peter, Ken Berguist, and
Monika Vainorius of the HCV Target Study Team and all of the HCV Target study
Monika Vainorius of the HCV-Target Study Team and all of the HCV-Target study
sites for being the pilot project for RED-I. You all helped make it great.
31 changes: 19 additions & 12 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# CHANGELOG
Change Log

## [1.2.1] 2018-08-30
### Fixed
* Corrected the version number throughout the documentation and code.
[2.0.0] 2019-11-07

Converted to Python 3.

## [1.2.0] 2017-10-24
### Summary
* This update adds better version control mechanisms to the project.
* Update iterating for python3 (Naomi Braun)
* Update docs and bump to version 2.0.0 (Taeber Rapczak)


[1.2.1] 2018-08-30

Corrected the version number throughout the documentation and code.


[1.2.0] 2017-10-24

Added better version control mechanisms to the project.

### Added
* Add the versions to requirements (Matthew McConnell)
* update license to APACHE2 (Matthew McConnell)


## [1.0.0] 2017-04-26
### Summary
* This is the initial release of cappy, a python module for interfacing with
the Redcap API
[1.0.0] 2017-04-26

Initial release of cappy, a python module for interfacing with the Redcap API.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2017 Patrick F. White and see AUTHORS file
Copyright 2017-2019 University of Florida.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
36 changes: 23 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
# cappy v1.2.1
The Redcap API library that you build yourself.
Cappy
=====

## Ideology ##
The REDCap API library that you build yourself.

A module should do one thing and do it well. Cappy calls the redcap API. It does not rate limit, it does not
tell you how to organize the data you get back, it does not handle errors nor declare any new exception types.
Ideology
--------

## Usage ##
A module should do one thing and do it well. Cappy calls the REDCap API. It
does not rate limit, it does not tell you how to organize the data you get
back, it does not handle errors nor declare any new exception types.

The redcap API requires a token, and an endpoint. Also Cappy uses a version file that specifies the API
calls you want to support. You pass all three of these into the API constructor to get an instance of the
api. This instance has methods corresponding to the definitions in the json file.

Any API call that pushes data takes the data object as the first parameter. This would be calls like `import_record`
and the like. Any iterable thing other than data is passed by a keyword param. More information can be found in the
doc strings of cap.py
Usage
-----

Happy redcapping!
The REDCap API requires a token and an endpoint. Also, Cappy uses a version file
that specifies the API calls you want to support. You pass all three of these
into the API constructor to get an instance of the API. This instance has
methods corresponding to the definitions in the JSON file.

Any API call that pushes data takes the data object as the first parameter.
This would be calls like `import_record` and the like. Any [iterable][] thing
other than data is passed by a keyword parameter. More information can be found
in the docstring of `cap.py`.

Happy REDCapping!

[iterable]: https://docs.python.org/3/glossary.html#term-iterable

23 changes: 0 additions & 23 deletions TODO

This file was deleted.

4 changes: 2 additions & 2 deletions cappy/cap.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def _build_post_body(self, token, data, post_body_template, **kwargs):
# to add by passing 'adhoc_redcap_options' as a kwarg to the function
# any iterable keys passed in this manner need to have their contents
# passed the usual way as a kwarg
for key, val in kwargs.items():
for key, val in list(kwargs.items()):
if key == 'adhoc_redcap_options':
for k, v in val.items():
for k, v in list(val.items()):
# we done want people to make readonly functions write
if not k == 'data':
# if we have an iterable
Expand Down
2 changes: 1 addition & 1 deletion cappy/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#This file contains only the current version number

__version__ = "1.2.1"
__version__ = "2.0.0"
14 changes: 5 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
appdirs==1.4.3
certifi==2017.4.17
certifi==2019.9.11
chardet==3.0.4
idna==2.5
packaging==16.8
pyparsing==2.2.0
PyYAML==3.12
requests==2.18.1
six==1.10.0
urllib3==1.21.1
idna==2.8
PyYAML==5.1.2
requests==2.22.0
urllib3==1.25.6
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
url='http://github.com/pfwhite/cappy',
author='Patrick White',
author_email='pfwhite9@gmail.com',
maintainer='UF CTS-IT',
maintainer_email='ctsit@ctsi.ufl.edu',
license='Apache License 2.0',
packages=['cappy'],
include_package_data=True,
install_requires=[
'requests==2.18.4',
'pyyaml==3.12'],
'requests==2.22.0',
'PyYAML==5.1.2'
],
zip_safe=False)

0 comments on commit be940dd

Please sign in to comment.