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

Commit 85329af

Browse files
committed
Merge branch 'release/0.14.3'
2 parents c23bb03 + 8fc7e40 commit 85329af

12 files changed

+303
-80
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ redi.pstats
5757
callgraph.svg
5858
mprofile_*
5959
private/
60+
.ropeproject/

.travis.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
2+
# http://docs.travis-ci.com/user/migrating-from-legacy/
3+
sudo: false
14
language: python
25
python:
36
- "2.7"
47
before_install:
5-
sudo apt-get install -y python-setuptools libxml2 libxslt1-dev python-dev
8+
echo 'apt-get install -y libxml2 libxslt1-dev'
69
install:
710
- pip install requests
811
- pip install lxml

CHANGELOG

+20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
2015-05-14 v0.14.2
2+
* Summary: Now RED-I can fetch more files initially and run pre-processors in a specific order.
3+
4+
* Runs the dictionary of preprocessors in order sorted by their keys (module names). This is necessary when using multiple preprocessors that have ordered rules. Unsorted dictionaries have unpredictable ordering. (Nicholas Rejack)
5+
* make clean: remove `.eggs` folder (Andrei Sura)
6+
* Fixes #168 - add option to display version number (Andrei Sura)
7+
* Moving logic for creating dictionary of files to download to __init__ method. Improved logging. (Nicholas Rejack)
8+
* Updating TestGetEMRData.py to match new variable names in GetEmrData.py. (Nicholas Rejack)
9+
* Updated GetEmrData.py to rename download_file variable to download_list and download_file function to download_files. (Nicholas Rejack)
10+
* Fixing TestGetEMRData.py now that a new variable has been added to the EmrFileAccessDetails. (Nicholas Rejack)
11+
* UpdatingGetEmrData.py with new functionality. Now, in settings.ini a dictionary of files to be downloaded can be specified for emr_data_file. (Nicholas Rejack)
12+
* Changing variables in EmrFileAccessDetails for readability. (Nicholas Rejack)
13+
* Update README.md (Christopher P. Barnes)
14+
* Update README.md (Christopher P. Barnes)
15+
* use travis in container (Andrei Sura)
16+
* Add makefile tasks related to pypi (Andrei Sura)
17+
* added RedHat/Fedora installation documentation. (Nicholas Rejack)
18+
* bumping version number on docs/conf.py (Nicholas Rejack)
19+
* repaired some broken text in about.rst in documentation. (Nicholas Rejack)
20+
121
2015-05-14 v0.14.2
222
* Summary: Preprocessing has been improved to use the rewritten raw CSV file after processing it. This relocates some of the XML processing from GetEMRData.
323

Makefile

+31-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ help:
1616
@echo "\t coverage - run code coverage analysis"
1717
@echo "\t lint - check code for sytax error"
1818
@echo "\t clean - remove generated files"
19-
@echo "\t pypi - upload files to https://pypi.python.org/pypi/redi"
19+
@echo "\t pypi_config - prepare the configuation for uploading the PyPi package"
20+
@echo "\t pypi_register - register the package"
21+
@echo "\t pypi_upload - upload the package https://pypi.python.org/pypi/redi"
2022
@echo "\t show_pips - show python packages installed globally"
2123
@echo "\t venv_help - show commands for installing 'redi' package in the 'venv' virtual environment"
2224
@echo "\t venv_show_pips - show python packages installed in the 'venv' virtual environment"
@@ -37,17 +39,41 @@ lint:
3739

3840
clean:
3941
find . -type f -name "*.pyc" -print | xargs rm -f
40-
@rm -rf out dist build *.egg-info *.egg
42+
@rm -rf out dist build *.egg-info .eggs
4143
@rm -rf nosetests.xml cover .coverage coverage.xml
4244
@rm -f pylint.out unittest_pysftp_rsa_key unittest_pysftp_rsa_key.pub destination_file source_file
4345
@rm -f formData.xml rawData.xml translationalData.xml rawDataWithFormName.xml rawDataWithFormCompletedField.xml
4446
@rm -f rawDataWithDatumAndUnitsFieldNames.xml rawDataSorted.xml rawDataWithAllUpdates.xml rawDataWithFormImported.xml rawDataWithFormStatus.xml
4547
@rm -f all_form_events.xml person_form_event_tree.xml person_form_event_tree_with_data.xml
4648
@rm -f vagrant/redi.db config-example/report.xml redi.pstats mprofile_*.dat
4749

48-
pypi:
49-
#https://pythonhosted.org/Distutils2/distutils/packageindex.html
50-
python setup.py sdist register upload -r pypi
50+
pypi_config:
51+
@test -f ~/.pypirc || echo "Please create the ~/.pypirc file first. Here is a template: \n"
52+
@test -f ~/.pypirc || (cat pypirc && exit 1)
53+
54+
pypi_register: pypi_config
55+
python setup.py register -r mdat
56+
57+
pypi_upload: pypi_config
58+
@# use secure submission: https://packaging.python.org/en/latest/distributing.html
59+
which twine || pip install twine
60+
#python setup.py sdist register upload -r redi
61+
python setup.py sdist --formats=zip
62+
twine upload dist/* -r mdat
63+
@echo "Done. To test please execute:"
64+
@echo "virtualenv venv && . venv/bin/activate && pip install redi && redi -h"
65+
66+
67+
pypi_internal:
68+
@# Test deployment on a local PyPi server
69+
@# mkdir ~/packages && cd ~/packages
70+
@# htpasswd -sc .htaccess tester
71+
virtualenv venv && . venv/bin/activate
72+
which pypi-server || pip install pypiserver
73+
pypi-server -p 8080 -P .htaccess ~/packages &
74+
python setup.py sdist register -r internal
75+
python setup.py sdist upload -r internal
76+
pip install --extra-index-url http://localhost:8080/simple/ redi
5177

5278
show_pips:
5379
find /Library/Python/2.7/site-packages/ -maxdepth 2 -name __init__.py | cut -d '/' -f 6

docs/about.rst

+137-24
Original file line numberDiff line numberDiff line change
@@ -106,43 +106,156 @@ Installing RED-I on Windows
106106

107107
* Open a command prompt by clicking on the Start menu, and typing "cmd" in the Run box.
108108
* Install 64-bit Python 2.7.9 by running the following command in the command prompt:
109-
<pre>
110-
msiexec /i https://www.python.org/ftp/python/2.7.9/python-2.7.9.amd64.msi
111-
</pre>
109+
110+
.. raw:: html
111+
112+
<pre>
113+
msiexec /i https://www.python.org/ftp/python/2.7.9/python-2.7.9.amd64.msi
114+
</pre>
115+
112116
* Next you need to be insure the command interpreter will be able to find the Python modules. Set
113117
the paths to the modules by running the following commands in the command prompt:
114-
<pre>
115-
setx path "%path%;c:\python27"
116-
setx path "%path%;c:\python27\lib\site-packages"
117-
setx path "%path%;c:\python27\scripts”
118-
</pre>
118+
119+
.. raw:: html
120+
121+
<pre>
122+
setx path "%path%;c:\python27"
123+
setx path "%path%;c:\python27\lib\site-packages"
124+
setx path "%path%;c:\python27\scripts”
125+
</pre>
126+
119127
* Make a new directory for the RED-I files by running the following command in the command prompt:
120-
<pre>
121-
mkdir c:\redi
122-
</pre>
128+
129+
.. raw:: html
130+
131+
<pre>
132+
mkdir c:\redi
133+
</pre>
134+
123135
* Download the RED-I source code from: [https://github.com/ctsit/redi/archive/0.14.1.zip]
124136
* Copy the contents of the RED-I zip file from c:\Users\%username%\Downloads\redi-0.14.1\redi-0.14.1 to c:\redi
125137
* Download the easy_install setup file from: https://bootstrap.pypa.io/ez_setup.py
126138
* Run the easy_install setup file with the following command in the command prompt:
127-
<pre>
128-
python c:\Users\%username%\Downloads\ez_setup.py
129-
</pre>
139+
140+
.. raw:: html
141+
142+
<pre>
143+
python c:\Users\%username%\Downloads\ez_setup.py
144+
</pre>
145+
130146
Note: you may need to modify the path to the ez_setup.py file if it is downloaded to a different location.
131147

132148
* Next, make a binary install of RED-I by running the following commands in the command prompt:
133-
<pre>
134-
cd c:\redi
135-
python c:\redi\setup.py bdist_egg
136-
</pre>
149+
150+
.. raw:: html
151+
152+
<pre>
153+
cd c:\redi
154+
python c:\redi\setup.py bdist_egg
155+
</pre>
156+
137157
* You will need to manually install the pycrypto dependency. To avoid having to compile it with VCForPython you can
138158
download a pre-compiled binary and install it with the following command:
139-
<pre>
140-
c:\python27\scripts\easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win-amd64-py2.7.exe
141-
</pre>
159+
160+
.. raw:: html
161+
162+
<pre>
163+
c:\python27\scripts\easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win-amd64-py2.7.exe
164+
</pre>
165+
142166
* Finally, install your binary of RED-I with the following command:
143-
<pre>
144-
c:\python27\scripts\easy_install.exe c:\redi\dist\redi-0.14.1-py2.7.egg
145-
</pre>
167+
168+
.. raw:: html
169+
170+
<pre>
171+
c:\python27\scripts\easy_install.exe c:\redi\dist\redi-0.14.1-py2.7.egg
172+
</pre>
173+
174+
Installing RED-I on Red Hat and Fedora
175+
----------------------------
176+
Download and install setuptools. Setuptools will aid you in installing the redi package.
177+
178+
.. raw:: html
179+
180+
<pre>
181+
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" && sudo python get-pip.py
182+
</pre>
183+
184+
Note that you must have gcc (the Gnu Compiler Collection) to build RED-I. Check that you have gcc installed:
185+
186+
.. raw:: html
187+
188+
<pre>
189+
gcc --version
190+
</pre>
191+
192+
If gcc is not installed, install it:
193+
194+
.. raw:: html
195+
196+
<pre>
197+
sudo yum install gcc
198+
</pre>
199+
200+
Install the development libxslt, libxml2, and python-devel libraries. These allow you to build the redi source.
201+
202+
.. raw:: html
203+
204+
<pre>
205+
sudo yum install libxslt-devel libxml2-devel python-devel
206+
</pre>
207+
208+
Install redi using pip.
209+
210+
.. raw:: html
211+
212+
<pre>
213+
sudo pip install redi
214+
</pre>
215+
216+
RED-I is now be installed.
217+
218+
If you get an error message while compiling pycrypto, you will need to install pycrypto separately:
219+
220+
.. raw:: html
221+
222+
<pre>
223+
sudo yum install python-crypto
224+
</pre>
225+
226+
* To use the example config, documentation, and other associated RED-I files, you will need to get files from the GitHub repository. You have two options:
227+
228+
1. Clone the repo by using Git.
229+
230+
.. raw:: html
231+
232+
<pre>
233+
yum install git
234+
</pre>
235+
236+
Set up your install of Git to use the key on your GitHub account. Instructions are at: https://help.github.com/articles/generating-ssh-keys/
237+
238+
Now, clone the redi git repo:
239+
240+
.. raw:: html
241+
242+
<pre>
243+
clone [email protected]:ctsit/redi.git
244+
</pre>
245+
246+
You now have a directory called redi with the source, docs, example configuration and other RED-I files.
247+
248+
2. Download the zip file
249+
250+
.. raw:: html
251+
252+
<pre>
253+
wget https://github.com/ctsit/redi/archive/master.zip
254+
sudo yum install unzip
255+
unzip master.zip
256+
</pre>
257+
258+
* You now have a directory called redi-master with the source, docs, example configuration and other RED-I files.
146259

147260
How to Test RED-I with a Sample Project
148261
---------------------------------------

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
# built documents.
6262
#
6363
# The short X.Y version.
64-
version = '0.11.3'
64+
version = '0.14.2'
6565
# The full version, including alpha/beta/rc tags.
66-
release = '0.11.3'
66+
release = '0.14.2'
6767

6868
# The language for content autogenerated by Sphinx. Refer to documentation
6969
# for a list of supported languages.

docs/redi_usage.rst

+15-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ Optional command-line arguments:
1010
--------------------------------
1111

1212
- -h, --help: show the help message
13+
14+
- -v, --verbose: increase verbosity of output
15+
16+
::
17+
18+
$ redi -v
19+
20+
- -V, --version: Show version number
21+
22+
::
23+
24+
$ redi -V
25+
26+
1327
- -c: Specify the path to the configuration folder.
1428

1529
::
@@ -24,7 +38,7 @@ Optional command-line arguments:
2438

2539
::
2640

27-
$ redi -k
41+
$ redi -k
2842

2943
When this parameter is provided, the output files are stored in
3044
**/out/out\_<timestamp>**.
@@ -113,9 +127,6 @@ Optional command-line arguments:
113127
directory. Using this switch, one can run multiple instances of redi
114128
simultaneously.
115129

116-
- -v, --verbose: increase verbosity of output
117-
118-
$ redi --verbose
119130

120131
- --skip-blanks: skip blank events when sending event data to RedCAP
121132

pypirc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[distutils]
2+
3+
index-servers =
4+
mdat
5+
6+
[mdat]
7+
repository: https://pypi.python.org/pypi
8+
username: mdat
9+
password: ***

0 commit comments

Comments
 (0)