JuliaNeuroscience / NeuroPlots.jl

🧠📈
MIT License
5 stars 0 forks source link

plot topography #2

Closed likanzhan closed 2 years ago

Tokazama commented 2 years ago

Looks like a good place to start. We should update the project.toml file if we add dependencies

Tokazama commented 2 years ago

Thanks for this, @likanzhan. You're awesome!

@palday, since you have experience with plotting packages, what's your advice on testing here?

palday commented 2 years ago

@likanzhan and @Tokazama

The "best" way is to use something like Percy that does visual testing, so that you know if your plots change. But that takes a bit of effort and potentially a paid account, and I haven't done for my plotting packages yet, so I can't help do it quickly.

The next best way is a combination of two things:

  1. writing out the plots (e.g. with CairoMakie.save) to some temp dir during the normal tests stage just to make sure the code runs and doesn't error. You have to write the figure out to file because a lot doesn't happen until the figure is actually drawn.
  2. Having good docs where a few sample plots are displayed, so that you can also do quick visual checks on new plots to see if they look like you expect (and to see if some figures fail to render).

The combination of these two things are generally enough to get an impression about the state of the package and detect e.g. if a Makie version bump breaks anything.

Tokazama commented 2 years ago

That's super helpful. Thank you.

I'm going to go ahead and merge this so we can incrementally build on this.

jrevels commented 2 years ago

The "best" way is to use something like Percy that does visual testing, so that you know if your plots change. But that takes a bit of effort and potentially a paid account, and I haven't done for my plotting packages yet, so I can't help do it quickly.

(cc @SimonDanisch who has been interested in developing an OSS/Julia-developer-friendly alternative to Percy for Makie + Julia ecosystem :) good to know there are use cases here)