Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
documentation, blog, update module list
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Sep 20, 2015
1 parent bd18b2e commit 6819951
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 23 deletions.
2 changes: 1 addition & 1 deletion _doc/sphinxdoc/source/blog/2015/2015-09-19_mako.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.. blogpost::
:title: Warning with Mako
:keywords: Mako, warning, issue
:date: 2015-09-17
:date: 2015-09-19
:categories: install, modules, issue

The installation of `Mako <http://www.makotemplates.org/>`_
Expand Down
13 changes: 13 additions & 0 deletions _doc/sphinxdoc/source/blog/2015/2015-09-20_cvxpy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


.. blogpost::
:title: Install cvxpy on Windows
:keywords: cvxpy, Windows
:date: 2015-09-20
:categories: install, modules, issue

After I installed `CVXcanon <https://github.com/cvxgrp/CVXcanon>`_ (see previous blog),
I went through an issue
``canonInterface`` is not found.
I corrected with the following modification:
`change import instruction to use CVXcanon explicitely <https://github.com/sdpython/cvxpy/commit/11fe2bff21cbafcb694cab1265f111e6f9314ac4>`_.
2 changes: 2 additions & 0 deletions src/pymyinstall/packaged/packaged_config_1_small.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def small_set():
ModuleInstall('markupsafe', 'pip', purpose="parses mardown"),
ModuleInstall(
"pandas", "wheel", purpose="manipulate table as SQL in memory", usage="DATA/ML"),
ModuleInstall(
"pandas-datareader", "pip", purpose="Up to date remote data access for pandas, works for multiple versions of pandas.", usage="DATA/ML"),
ModuleInstall(
"netCDF4", "wheel", mname="netCDF4", purpose="xray uses this module to save and read data (netCDF=Unidata network Common Data Form)"),
ModuleInstall(
Expand Down
12 changes: 7 additions & 5 deletions src/pymyinstall/packaged/packaged_config_3_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def extended_set():
ModuleInstall(
'lockfile', 'pip', purpose="Platform-independent file locking module"),
ModuleInstall('python-daemon', 'pip', mname="daemon",
purpose="Library to implement a well-behaved Unix daemon process (for luigi)"),
purpose="Library to implement a well-behaved Unix daemon process (for luigi)") if not sys.platform.startswith("win") else None,
ModuleInstall('cached_property', 'pip',
purpose="A decorator for caching properties in classes (for luigi)"),
ModuleInstall('luigi', 'pip',
Expand Down Expand Up @@ -156,8 +156,8 @@ def extended_set():
"ecos", "wheel", purpose="ECOS is a numerical software for solving convex second-order cone programs (SOCPs)", usage="OPTIM"),
ModuleInstall(
"CVXcanon", "wheel_xd", purpose="A low-level library to perform the matrix building step in cvxpy, a convex optimization modeling software.", usage="OPTIM"),
ModuleInstall(
"cvxpy", "pip", purpose="linear, quadratic optimization, depends on cvxopt", usage="OPTIM"),
ModuleInstall("cvxpy", "github", "sdpython", usage="OPTIM",
purpose="linear, quadratic optimization, depends on cvxopt"),
# better large list
ModuleInstall(
"blist", "wheel", purpose="a list-like type with better asymptotic performance and similar performance on small lists"),
Expand All @@ -182,7 +182,9 @@ def extended_set():
"Theano", "wheel", mname="theano", purpose="deep learning, GPU", usage="DATA/ML"),
ModuleInstall('pymc', 'wheel',
purpose="Monte Carlo computation", usage="DATA/ML"),
ModuleInstall('pymc', 'wheel', web="https://github.com/pymc-devs/pymc3",
ModuleInstall('pymc', 'wheel', web="https://github.com/pymc-devs/pymc",
purpose="Monte Carlo computation", usage="DATA/ML") if sys.version_info[0] >= 3 else None,
ModuleInstall('pymc3', 'github', "pymc-devs", web="https://github.com/pymc-devs/pymc3",
purpose="Monte Carlo computation (Python 3 only)", usage="DATA/ML") if sys.version_info[0] >= 3 else None,
ModuleInstall('pysterior', 'pip',
purpose="pysterior is a machine learning library for Python which aims to make Bayesian parametric regression and classification models accessible and easy to use. The library allows users to construct supervised learning models using an intuitive interface similar to that used by scikit-learn.", usage="DATA/ML") if sys.version_info[0] >= 3 else None,
Expand Down Expand Up @@ -229,7 +231,7 @@ def extended_set():
"locket", "pip",
purpose="File-based locks for Python for Linux and Windows"),
ModuleInstall(
"dill", "pip", purpose="serialize all of python (almost), Dill extends python's \"pickle\" module for serializing and de-serializing python objects to the majority of the built-in python types."), # for dask
"dill", "pip", purpose="serialize all of python (almost), Dill extends python's pickle module for serializing and de-serializing python objects to the majority of the built-in python types."), # for dask
# parallel computation
ModuleInstall(
"dask", "pip", purpose="parallization of operations with dataframe", usage="DATA/ML"),
Expand Down
13 changes: 7 additions & 6 deletions src/pymyinstall/packaged/packaged_config_4_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,18 +288,19 @@ def ensae_set():
# purpose="Turn your Python and Javascript code into DOT flowcharts"),

# biokit
ModuleInstall("wrapt", "wheel",
purpose="A Python module for decorators, wrappers and monkey patching."),
ModuleInstall("colormap", "pip", usage="VIZ",
purpose="Utilities to ease manipulation of matplotlib colormaps and color codecs (e.g., hex2rgb)"),
ModuleInstall("easydev", "pip",
purpose="Common utilities to ease the development of Python packages"),
ModuleInstall("suds-jurko", "pip", mname="suds",
purpose="Lightweight SOAP client (Jurko's fork)"),
ModuleInstall("wrapt", "wheel",
purpose="A Python module for decorators, wrappers and monkey patching."),
ModuleInstall("bioservices", "pip",
purpose="Access to Biological Web Services from Python"),
ModuleInstall("biokit", "github", "biokit", usage="VIZ",
purpose="Access to Biological Web Services from Python"),
# bugged and still uses ordereddict
# ModuleInstall("bioservices", "pip",
# purpose="Access to Biological Web Services from Python"),
# ModuleInstall("biokit", "github", "biokit", usage="VIZ",
# purpose="Access to Biological Web Services from Python"),


# azure part
Expand Down
3 changes: 2 additions & 1 deletion src/pymyinstall/win_installer/win_setup_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ def last_function(inno_script, folders, verbose=False, fLOG=print):
#########
# checking
#########
distribution_checkings(folders["python"], folders["tools"], fLOG=fLOG)
distribution_checkings(folders["python"], folders[
"tools"], fLOG=fLOG, module_list=module_list)

########
# tutorial
Expand Down
19 changes: 9 additions & 10 deletions src/pymyinstall/win_installer/win_setup_main_checkings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
FileNotFoundError = Exception


def distribution_checkings(python_path, tools_path, fLOG=print, skip_import=False):
def distribution_checkings(python_path, tools_path, fLOG=print, skip_import=False, module_list=None):
"""
checks a distribution was properly executed
@param python_path path for python
@param tools_path path for tools
@param fLOG logging function
@param skip_import skip the validation of every installed module (for unit test purposes)
@param module_list module list to check
The function raises @see cl WinInstallDistributionError if an issue is detected.
Expand Down Expand Up @@ -66,7 +67,7 @@ def distribution_checkings(python_path, tools_path, fLOG=print, skip_import=Fals
################################
if not skip_import:
res = import_every_module(
python_path, None, only_installed=True, fLOG=fLOG)
python_path, module_list, only_installed=True, fLOG=fLOG)
mes = []
for r in res:
if not r[0]:
Expand Down Expand Up @@ -114,11 +115,13 @@ def tomod(m):

def noLOG(*l, **p):
pass

def is_errored_line(line):
if ".py" in line:
if "UserWarning:" in line:
return False
if "FutureWarning:" in line:
return False
return True
return False

Expand All @@ -132,12 +135,7 @@ def analyze_error_success(mod, err):
if "kivy" in mod.name.lower():
if "error" not in err.lower():
return True

if mod.name in {"simplepam", "ordereddict"
}:
# these modules should not be used
return False


if err is not None:
lines = err.split("\n")
for line in lines:
Expand Down Expand Up @@ -181,7 +179,8 @@ def analyze_error_success(mod, err):
fLOG("{0}/{1}: success".format(i, len(module_list)), m)
else:
fLOG("{0}/{1}: failed ".format(i, len(module_list)), m)
err = [ (" - ERR: " if is_errored_line(line) else " - OK: ") + line for line in err.split("\n") ]
err = [(" - ERR: " if is_errored_line(line)
else " - OK: ") + line for line in err.split("\n")]
err = "\n".join(err)
res.append((suc, m, out, err))
return res

0 comments on commit 6819951

Please sign in to comment.