Skip to content

Commit

Permalink
Merge branch 'hotfix-1.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
castillohair committed Jun 13, 2017
2 parents 31dc74c + 5f55f7c commit 2f8827a
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
2 changes: 1 addition & 1 deletion FlowCal/__init__.py
Expand Up @@ -6,7 +6,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
__version__ = '1.1.3'
__version__ = '1.1.4'

import io
import excel_ui
Expand Down
31 changes: 24 additions & 7 deletions FlowCal/excel_ui.py
Expand Up @@ -72,6 +72,8 @@
import collections
import os
import os.path
import packaging
import packaging.version
import platform
import re
import subprocess
Expand Down Expand Up @@ -169,14 +171,28 @@ def write_workbook(filename, table_list, column_width=None):
# Modify default header format
# Pandas' default header format is bold text with thin borders. Here we
# use bold text only, without borders.
# The format module is in pd.core.format in pandas<=0.18.0,
# pd.formats.format in pandas>=0.18.1.
# The header style structure is in pd.core.format in pandas<=0.18.0,
# pd.formats.format in 0.18.1<=pandas<0.20, and pd.io.formats.excel in
# pandas>=0.20.
# Also, wrap in a try-except block in case style structure is not found.
format_module_found = False
try:
format_module = pd.core.format
# Get format module
if packaging.version.parse(pd.__version__) \
<= packaging.version.parse('0.18'):
format_module = pd.core.format
elif packaging.version.parse(pd.__version__) \
< packaging.version.parse('0.20'):
format_module = pd.formats.format
else:
import pandas.io.formats.excel as format_module
# Save previous style, replace, and indicate that previous style should
# be restored at the end
old_header_style = format_module.header_style
format_module.header_style = {"font": {"bold": True}}
format_module_found = True
except AttributeError as e:
format_module = pd.formats.format
old_header_style = format_module.header_style
format_module.header_style = {"font": {"bold": True}}
pass

# Generate output writer object
writer = pd.ExcelWriter(filename, engine='xlsxwriter')
Expand Down Expand Up @@ -208,7 +224,8 @@ def write_workbook(filename, table_list, column_width=None):
writer.save()

# Restore previous header format
format_module.header_style = old_header_style
if format_module_found:
format_module.header_style = old_header_style

def process_beads_table(beads_table,
instruments_table,
Expand Down
4 changes: 4 additions & 0 deletions doc/getting_started/install_anaconda.rst
Expand Up @@ -5,8 +5,12 @@ To install Anaconda and ``FlowCal``, do the following:

1. Navigate to https://www.continuum.io/downloads. If you are using Windows, click on “Windows 64-bit Graphical Installer” or “Windows 32-bit Graphical Installer” under the “Python 2.7” column, depending on whether your computer is 32-bit or 64-bit. The 64-bit version is strongly recommended. Similarly, if you are using OS X, click on “Mac OS X 64-bit Graphical Installer” under the “Python 2.7” column. This will download the installer.

.. note:: Make sure to download the installer for Python 2.7 and not 3.x. ``FlowCal`` is not currently compatible with Python 3.

2. Double click the installer (.exe in Windows, .pkg in OS X) and follow the instructions on screen.

.. note:: **Windows**: During installation, on the "Advanced Installation Options" screen, make sure to check both "Add Anaconda to my PATH environment variable" and "Register Anaconda as my default Python 2.7". Recent versions of Anaconda suggest to keep the first option unchecked. However, this option is necessary for the installation script on step 4 to work.

3. Download ``FlowCal`` from `here <https://github.com/taborlab/FlowCal/archive/master.zip>`_. A file called ``FlowCal-master.zip`` will be downloaded. Unzip this file.

4. Inside the unzipped folder, double click on ``Install FlowCal (Windows).bat`` or ``Install FlowCal (OSX)`` if you are using Windows or OS X, respectively. This will open a terminal window and install ``FlowCal``. The installation procedure may take a few minutes. When installation is finished, the terminal will show the message “Press Enter to finish...”. If the installation was successful, your terminal should look like the figure below. Press Enter to close the terminal window.
Expand Down
1 change: 1 addition & 0 deletions doc/getting_started/install_python.rst
Expand Up @@ -14,6 +14,7 @@ Alternatively, download ``FlowCal`` from `here <https://github.com/taborlab/Flow
* ``matplotlib`` (>=1.3.1)
* ``palettable`` (>=2.1.1)
* ``scikit-learn`` (>=0.16.0)
* ``packaging`` (>=16.8)
* ``pandas`` (>=0.16.1)
* ``xlrd`` (>=0.9.2)
* ``XlsxWriter`` (>=0.5.2)
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Expand Up @@ -3,6 +3,7 @@ scipy>=0.14.0
matplotlib>=1.3.1
palettable>=2.1.1
scikit-learn>=0.16.0
packaging>=16.8
pandas>=0.16.1
xlrd>=0.9.2
XlsxWriter>=0.5.2
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -88,6 +88,7 @@ def find_version(file_path):
'matplotlib>=1.3.1',
'palettable>=2.1.1',
'scikit-learn>=0.16.0',
'packaging>=16.8',
'pandas>=0.16.1',
'xlrd>=0.9.2',
'XlsxWriter>=0.5.2'],
Expand Down

0 comments on commit 2f8827a

Please sign in to comment.