Skip to content

Conversation

sayalaruano
Copy link
Collaborator

@sayalaruano sayalaruano commented Sep 11, 2025

Summary

Create a factory function to abstract the steps required to build plotly plots in the engine functions. In this way, we avoid writing redundant code in every plot file.

List of changes proposed in this PR (pull-request)

  • Created vuecore/plots/plot_buildery.py function
  • Added vuecore/engines/plotly/__init__.py to register functions and limit wat is imported with *
  • Refactored vuecore/engines/plotly/engines/plotly/bar.py, vuecore/engines/plotly/box, vuecore/engines/plotly/line, and vuecore/engines/plotly/scatter engine functions
  • Refactored vuecore/engines/plotly/theming.py script by adding helper functions for common tasks

@sayalaruano sayalaruano requested a review from enryH September 11, 2025 07:41
@sayalaruano sayalaruano changed the title Factory function for building plotly plot functions ✨Factory function for building plotly plot functions Sep 11, 2025
}

# Apply preprocessing if provided
if preprocess:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can add a if preprocess is callable?

@enryH
Copy link
Collaborator

enryH commented Sep 11, 2025

  • create_scatter_plot is still as before. I would still opt for listing all the parameters manually and passing it on as a config:)

Copy link
Collaborator

@enryH enryH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise it looks good

@sayalaruano
Copy link
Collaborator Author

Hey @enryH! Thanks for the suggestions. Regarding the kwargs in the user-facing functions, I already made the changes to show all kwargs in #31

@sayalaruano sayalaruano merged commit 725453d into main Sep 12, 2025
7 checks passed
@sayalaruano sayalaruano deleted the fact_func_buildplots branch September 12, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants