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

Commit

Permalink
Merge branch 'release/0.14.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
nrejac committed Nov 25, 2015
2 parents c23bb03 + 8fc7e40 commit 85329af
Show file tree
Hide file tree
Showing 12 changed files with 303 additions and 80 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ redi.pstats
callgraph.svg
mprofile_*
private/
.ropeproject/
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

# http://docs.travis-ci.com/user/migrating-from-legacy/
sudo: false
language: python
python:
- "2.7"
before_install:
sudo apt-get install -y python-setuptools libxml2 libxslt1-dev python-dev
echo 'apt-get install -y libxml2 libxslt1-dev'
install:
- pip install requests
- pip install lxml
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2015-05-14 v0.14.2
* Summary: Now RED-I can fetch more files initially and run pre-processors in a specific order.

* 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)
* make clean: remove `.eggs` folder (Andrei Sura)
* Fixes #168 - add option to display version number (Andrei Sura)
* Moving logic for creating dictionary of files to download to __init__ method. Improved logging. (Nicholas Rejack)
* Updating TestGetEMRData.py to match new variable names in GetEmrData.py. (Nicholas Rejack)
* Updated GetEmrData.py to rename download_file variable to download_list and download_file function to download_files. (Nicholas Rejack)
* Fixing TestGetEMRData.py now that a new variable has been added to the EmrFileAccessDetails. (Nicholas Rejack)
* 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)
* Changing variables in EmrFileAccessDetails for readability. (Nicholas Rejack)
* Update README.md (Christopher P. Barnes)
* Update README.md (Christopher P. Barnes)
* use travis in container (Andrei Sura)
* Add makefile tasks related to pypi (Andrei Sura)
* added RedHat/Fedora installation documentation. (Nicholas Rejack)
* bumping version number on docs/conf.py (Nicholas Rejack)
* repaired some broken text in about.rst in documentation. (Nicholas Rejack)

2015-05-14 v0.14.2
* Summary: Preprocessing has been improved to use the rewritten raw CSV file after processing it. This relocates some of the XML processing from GetEMRData.

Expand Down
36 changes: 31 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ help:
@echo "\t coverage - run code coverage analysis"
@echo "\t lint - check code for sytax error"
@echo "\t clean - remove generated files"
@echo "\t pypi - upload files to https://pypi.python.org/pypi/redi"
@echo "\t pypi_config - prepare the configuation for uploading the PyPi package"
@echo "\t pypi_register - register the package"
@echo "\t pypi_upload - upload the package https://pypi.python.org/pypi/redi"
@echo "\t show_pips - show python packages installed globally"
@echo "\t venv_help - show commands for installing 'redi' package in the 'venv' virtual environment"
@echo "\t venv_show_pips - show python packages installed in the 'venv' virtual environment"
Expand All @@ -37,17 +39,41 @@ lint:

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

pypi:
#https://pythonhosted.org/Distutils2/distutils/packageindex.html
python setup.py sdist register upload -r pypi
pypi_config:
@test -f ~/.pypirc || echo "Please create the ~/.pypirc file first. Here is a template: \n"
@test -f ~/.pypirc || (cat pypirc && exit 1)

pypi_register: pypi_config
python setup.py register -r mdat

pypi_upload: pypi_config
@# use secure submission: https://packaging.python.org/en/latest/distributing.html
which twine || pip install twine
#python setup.py sdist register upload -r redi
python setup.py sdist --formats=zip
twine upload dist/* -r mdat
@echo "Done. To test please execute:"
@echo "virtualenv venv && . venv/bin/activate && pip install redi && redi -h"


pypi_internal:
@# Test deployment on a local PyPi server
@# mkdir ~/packages && cd ~/packages
@# htpasswd -sc .htaccess tester
virtualenv venv && . venv/bin/activate
which pypi-server || pip install pypiserver
pypi-server -p 8080 -P .htaccess ~/packages &
python setup.py sdist register -r internal
python setup.py sdist upload -r internal
pip install --extra-index-url http://localhost:8080/simple/ redi

show_pips:
find /Library/Python/2.7/site-packages/ -maxdepth 2 -name __init__.py | cut -d '/' -f 6
Expand Down
161 changes: 137 additions & 24 deletions docs/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,43 +106,156 @@ Installing RED-I on Windows

* Open a command prompt by clicking on the Start menu, and typing "cmd" in the Run box.
* Install 64-bit Python 2.7.9 by running the following command in the command prompt:
<pre>
msiexec /i https://www.python.org/ftp/python/2.7.9/python-2.7.9.amd64.msi
</pre>

.. raw:: html

<pre>
msiexec /i https://www.python.org/ftp/python/2.7.9/python-2.7.9.amd64.msi
</pre>

* Next you need to be insure the command interpreter will be able to find the Python modules. Set
the paths to the modules by running the following commands in the command prompt:
<pre>
setx path "%path%;c:\python27"
setx path "%path%;c:\python27\lib\site-packages"
setx path "%path%;c:\python27\scripts”
</pre>

.. raw:: html

<pre>
setx path "%path%;c:\python27"
setx path "%path%;c:\python27\lib\site-packages"
setx path "%path%;c:\python27\scripts”
</pre>

* Make a new directory for the RED-I files by running the following command in the command prompt:
<pre>
mkdir c:\redi
</pre>

.. raw:: html

<pre>
mkdir c:\redi
</pre>

* Download the RED-I source code from: [https://github.com/ctsit/redi/archive/0.14.1.zip]
* 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
* Download the easy_install setup file from: https://bootstrap.pypa.io/ez_setup.py
* Run the easy_install setup file with the following command in the command prompt:
<pre>
python c:\Users\%username%\Downloads\ez_setup.py
</pre>

.. raw:: html

<pre>
python c:\Users\%username%\Downloads\ez_setup.py
</pre>

Note: you may need to modify the path to the ez_setup.py file if it is downloaded to a different location.

* Next, make a binary install of RED-I by running the following commands in the command prompt:
<pre>
cd c:\redi
python c:\redi\setup.py bdist_egg
</pre>

.. raw:: html

<pre>
cd c:\redi
python c:\redi\setup.py bdist_egg
</pre>

* You will need to manually install the pycrypto dependency. To avoid having to compile it with VCForPython you can
download a pre-compiled binary and install it with the following command:
<pre>
c:\python27\scripts\easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win-amd64-py2.7.exe
</pre>

.. raw:: html

<pre>
c:\python27\scripts\easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win-amd64-py2.7.exe
</pre>

* Finally, install your binary of RED-I with the following command:
<pre>
c:\python27\scripts\easy_install.exe c:\redi\dist\redi-0.14.1-py2.7.egg
</pre>

.. raw:: html

<pre>
c:\python27\scripts\easy_install.exe c:\redi\dist\redi-0.14.1-py2.7.egg
</pre>

Installing RED-I on Red Hat and Fedora
----------------------------
Download and install setuptools. Setuptools will aid you in installing the redi package.

.. raw:: html

<pre>
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" && sudo python get-pip.py
</pre>

Note that you must have gcc (the Gnu Compiler Collection) to build RED-I. Check that you have gcc installed:

.. raw:: html

<pre>
gcc --version
</pre>

If gcc is not installed, install it:

.. raw:: html

<pre>
sudo yum install gcc
</pre>

Install the development libxslt, libxml2, and python-devel libraries. These allow you to build the redi source.

.. raw:: html

<pre>
sudo yum install libxslt-devel libxml2-devel python-devel
</pre>

Install redi using pip.

.. raw:: html

<pre>
sudo pip install redi
</pre>

RED-I is now be installed.

If you get an error message while compiling pycrypto, you will need to install pycrypto separately:

.. raw:: html

<pre>
sudo yum install python-crypto
</pre>

* 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:

1. Clone the repo by using Git.

.. raw:: html

<pre>
yum install git
</pre>

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/

Now, clone the redi git repo:

.. raw:: html

<pre>
clone [email protected]:ctsit/redi.git
</pre>

You now have a directory called redi with the source, docs, example configuration and other RED-I files.

2. Download the zip file

.. raw:: html

<pre>
wget https://github.com/ctsit/redi/archive/master.zip
sudo yum install unzip
unzip master.zip
</pre>

* You now have a directory called redi-master with the source, docs, example configuration and other RED-I files.

How to Test RED-I with a Sample Project
---------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
# built documents.
#
# The short X.Y version.
version = '0.11.3'
version = '0.14.2'
# The full version, including alpha/beta/rc tags.
release = '0.11.3'
release = '0.14.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
19 changes: 15 additions & 4 deletions docs/redi_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ Optional command-line arguments:
--------------------------------

- -h, --help: show the help message

- -v, --verbose: increase verbosity of output

::

$ redi -v

- -V, --version: Show version number

::

$ redi -V


- -c: Specify the path to the configuration folder.

::
Expand All @@ -24,7 +38,7 @@ Optional command-line arguments:

::

$ redi -k
$ redi -k

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

- -v, --verbose: increase verbosity of output

$ redi --verbose

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

Expand Down
9 changes: 9 additions & 0 deletions pypirc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[distutils]

index-servers =
mdat

[mdat]
repository: https://pypi.python.org/pypi
username: mdat
password: ***
Loading

0 comments on commit 85329af

Please sign in to comment.