guilgautier / DPPy

Python toolbox for sampling Determinantal Point Processes
https://dppy.readthedocs.io
MIT License
219 stars 52 forks source link

Cleanup comments in plot tests #47

Closed guillep closed 4 years ago

guillep commented 4 years ago

It seems there is some dead code commented, maybe it can be removed? (if needed it can always be recovered from git history)

# https://stackoverflow.com/questions/1854/python-what-os-am-i-running-on
if _platform.startswith('linux'):
    # linux
    pass
elif _platform == "darwin":
    # MAC OS X
    # https://markhneedham.com/blog/2018/05/04/python-runtime-error-osx-matplotlib-not-installed-as-framework-mac/
    # import matplotlib
    # matplotlib.use('TkAgg')
    pass
guillep commented 4 years ago

Same happens in https://github.com/guilgautier/DPPy/blob/master/dppy/beta_ensembles.py

guillep commented 4 years ago

and https://github.com/guilgautier/DPPy/blob/master/dppy/exotic_dpps.py

guillep commented 4 years ago

And a completely commented out function in https://github.com/guilgautier/DPPy/blob/master/dppy/exotic_dpps_core.py

guillep commented 4 years ago

And in https://github.com/guilgautier/DPPy/blob/master/dppy/finite_dpps.py

guillep commented 4 years ago

And in https://github.com/guilgautier/DPPy/blob/master/dppy/multivariate_jacobi_ope.py

guillep commented 4 years ago

And another fully commented out function in https://github.com/guilgautier/DPPy/blob/master/dppy/random_matrices.py

guillep commented 4 years ago

I imagine fully commented out functions are some that are not yet working? maybe we can move them to a separate branch as experimental branches.

guilgautier commented 4 years ago

It seems there is some dead code commented, maybe it can be removed? (if needed it can always be recovered from git history)

# https://stackoverflow.com/questions/1854/python-what-os-am-i-running-on
if _platform.startswith('linux'):
    # linux
    pass
elif _platform == "darwin":
    # MAC OS X
    # https://markhneedham.com/blog/2018/05/04/python-runtime-error-osx-matplotlib-not-installed-as-framework-mac/
    # import matplotlib
    # matplotlib.use('TkAgg')
    pass

Initially, I was also lauching Travis builds on MacOS and had hard time making sure things work see #6. Then, I set the backend to 'TkAgg', but sometimes figures were not displayed inline in Jupyter Notebooks Finally, I don't test on MacOS with Travis any more because

We can remove these lines, they make no sense

I imagine fully commented out functions are some that are not yet working? maybe we can move them to a separate branch as experimental branches.

They do work but are not used anymore, we can remove them.