Feature request: remove need for intermediate pl calls when chaining renderers

Aberta
#54 2 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Pouca atividade
Stack de tecnologia
python

Direção de pesquisa

Comece inspecionando o accessor pl e os métodos render_*, especialmente como eles retornam atualmente SpatialData e oferecem suporte a chamadas encadeadas. Compare o exemplo existente sdata.pl.render_images().pl.render_shapes().pl.show() com o comportamento de encadeamento proposto e determine como as operações pl e pp devem interagir. Considera-se concluído quando houver um design de API definido e o encadeamento de renderers funcionar sem chamadas pl intermediárias.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement priority: low
Description of feature

Thanks for the super nice work, @timtreis and @sagar87 ! I think it would be nice if we didn't have to add intermediate calls to pl when chaining renderers. That is, I think it would be nice if instead of this:

sdata.pl.render_images().pl.render_shapes().pl.show()

We could do this:

sdata.pl.render_images().render_shapes().show()

This perhaps could be possible if the render_*() methods returned the plot accessor instead of the SpatialData object. I suppose this means that one couldn't do a pp operation after a pl operation, but maybe that suggests the pl and pp operations should be on the same level of the hierarchy or one should do their preprocessing first, then their plotting. I'm not sure what's best here, but it might be good to experiment with this once all of the p0 functionality is finished.

Linguagem predominante
Python
Estrelas
86
Forks
21
Merge médio
14h 50min
PRs com merge (30d)
3

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de scverse/spatialdata-plot

Todas as issues de scverse/spatialdata-plot

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.