brian-j-smith / Mamba.jl

Markov chain Monte Carlo (MCMC) for Bayesian analysis in julia
Other
253 stars 52 forks source link

Remove dependency on Gadfly (or replace with Plots.jl?) #135

Closed ianfiske closed 6 years ago

ianfiske commented 6 years ago

With the current changes in the Julia data ecosystem migrating to DataFrames 11+, some packages have not kept up -- notably Gadfly. Until it's easy to manage multiple package sets (a la Python's virtualenv), this creates problems for users.

I wanted to try out Mamba, but it cannot be installed because it requires Gadfly, which requires DataFrames < 0.11.0:

julia> Pkg.add("Mamba")
ERROR: Unsatisfiable requirements detected for package DataFrames:
├─version range [0.0.0-,∞) set by an explicit requirement
├─version range [0.11.5,∞) required by package EMPP, whose only allowed version is 0.0.0-:
│ └─version 0.0.0- set by fixed requirement (package is checked out, dirty or pinned)
├─version range [0.0.0,∞) required by package CSV, whose allowed version range is [0.0.0-,∞):
│ └─version range [0.0.0-,∞) set by an explicit requirement
├─version range [0.0.0,∞) required by package DataFramesMeta, whose allowed version range is [0.0.0-,∞):
│ └─version range [0.0.0-,∞) set by an explicit requirement
└─version range [0.4.2,0.11.0) required by package Gadfly, whose allowed version range is [0.3.11,∞):
  └─version range [0.3.11,∞) required by package Mamba, whose allowed version range is [0.0.0-,∞):
    └─version range [0.0.0-,∞) set by an explicit requirement
The intersection of the requirements is empty.

Many Julia users are relying more on Plots.jl for plotting these days instead of Gadfly -- are there any plans to make Gadfly optional or replace it with Plots.jl?

Thanks! Ian

bdeonovic commented 6 years ago

I agree that making a Plots recipe (and removing dependency on any plotting module) should be the way to move forward. It's on the ever growing to-do list :)

gino244 commented 6 years ago

If you just want MCMC without plotting in Mamba, you can clone my forked Mamba. I have removed Gadfly dependency. You should plot by yourself though. Pkg.clone("https://github.com/gino244/Mamba.jl.git") You have to remove the original Mamba first, then do the command above.

This is my temporary remediation until the original upgraded with Plots.jl, I hope.

brian-j-smith commented 6 years ago

BTW, based on the discussion at https://github.com/GiovineItalia/Gadfly.jl/pull/1090, there appears to be recent work being done to migrate Gadfly to DataFrames 11.

ianfiske commented 6 years ago

Thank you all for the suggestions. I'll use @gino244 's fork as an immediate solution, but look forward to a more plotting-system-agnostic version in the future.

@gino244, maybe you can submit a PR to get your version into master? Or I suppose we'd want to add the stripped-out functionality back to your fork via Plots.jl first?

@brian-j-smith Glad to see there's progress on the Gladfly front -- that would make for another workable short-term solution for users.

bjarthur commented 6 years ago

Gadfly is fixed now. please checkout it's master branch (and Compose's too) and let me know if all is fixed. then i'll tag a release. sorry for the delay!

brian-j-smith commented 6 years ago

Thanks for the news and work on Gadfly. I can confirm that checking out the master branches of Gadfly and Compose releases DataFrames to version 11+ and appears to be function correctly with Mamba.

itsdfish commented 5 years ago

Hi-

I was wondering if this might be worth reopening. It would be nice to have the ability to use Plots instead of Gadfly. MCMCChain.jl uses a chain object based on Mamba's, which already has methods for plots in Plots.jl as well as diagnostics.