Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plotly support to pyani graphics, or remove the option from the parser #318

Closed
baileythegreen opened this issue Jul 29, 2021 · 4 comments
Labels
documentation documentation is unclear or incomplete interface issues related to how the user tells pyani to do something visualisation issues relating to plot outputs

Comments

@baileythegreen
Copy link
Contributor

Summary:

plotly is listed as one of the three plotting options when running pyani plot -h, but there is no code currently supporting this.

Reproducible Steps:

Assuming an existing database with the default name (.pyani/pyanidb), with at least one run in it:

pyani plot -h
pyani plot outdir 1 --method plotly

If it's not possible to reproduce the issue, please include a description of how you discovered the issue.

Current Output:

Traceback (most recent call last):
  File "/Users/baileyharrington/miniconda3/bin/pyani", line 33, in <module>
    sys.exit(load_entry_point('pyani', 'console_scripts', 'pyani')())
  File "/Users/baileyharrington/Software/pyani/pyani/scripts/pyani_script.py", line 117, in run_main
    returnval = args.func(args)
  File "/Users/baileyharrington/Software/pyani/pyani/scripts/subcommands/subcmd_plot.py", line 94, in subcmd_plot
    write_run_heatmaps(run_id, session, outfmts, args)
  File "/Users/baileyharrington/Software/pyani/pyani/scripts/subcommands/subcmd_plot.py", line 134, in write_run_heatmaps
    write_heatmap(
  File "/Users/baileyharrington/Software/pyani/pyani/scripts/subcommands/subcmd_plot.py", line 202, in write_heatmap
    GMETHODS[args.method](
KeyError: 'plotly'

Expected Output:

Plots.

pyani Version:

0.3.0-alpha

@baileythegreen baileythegreen added documentation documentation is unclear or incomplete interface issues related to how the user tells pyani to do something visualisation issues relating to plot outputs labels Jul 29, 2021
@widdowquinn
Copy link
Owner

We've discussed this at meetings. Adding plotly support is a goal, in part intended for the proposed Flask support, so that we can have interactive, rather than static, graphics in that interface.

@widdowquinn
Copy link
Owner

It's OK for the documentation to be slightly out of sync during development.

@baileythegreen
Copy link
Contributor Author

I don't remember discussion plotly, though I know there is a discussion about Flask. I just noticed that option wasn't implemented when I was adding scatterplot code.

@widdowquinn
Copy link
Owner

I remember discussion of plotly in the context of matplotlib vs seaborn (vs…) and in the context of a candidate Flaskinterface. In any case, the point about synchronisation of code and docs is the important one. Writing docs ahead of implementation (including inline docs) can set a target to code to, just as writing tests ahead of implementation (aka test-driven development) gives a target to code to.

My view is that the appropriate course of action here is to create an issue like #124 for plotly as an output option and include it in the milestones for a release version in the Project section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation is unclear or incomplete interface issues related to how the user tells pyani to do something visualisation issues relating to plot outputs
Projects
None yet
Development

No branches or pull requests

2 participants