Closed ulises-jeremias closed 11 months ago
@ulises-jeremias has exceeded the limit for the number of files or commits that can be reviewed per hour. Please wait 13 minutes and 11 seconds before requesting another review.
This pull request introduces significant refactoring to the plot
module, enhancing its modularity and flexibility. It introduces specific trace type functions, renames existing functions for clarity, and updates the server-side rendering. The changes also propagate to the examples and machine learning modules, aligning them with the updated plot
module.
File(s) | Summary |
---|---|
plot/show.v |
Renamed plot to plotly , introduced App struct, added port constant, replaced vsl.errors with vweb , and updated show function to use vweb.run . |
plot/plot.v |
Introduced new functions for adding different types of traces, renamed existing functions for clarity, and improved modularity. |
plot/trace.v |
Added TraceType enum, updated XType , YType , ZType to type aliases, introduced new structs for specific trace types, and updated Trace to be a sum type. |
examples/.../main.v |
Updated to use plot.Plot.new() instead of plot.new_plot() , replaced plt.add_trace() with specific trace type calls, and replaced plt.set_layout() with plt.layout() . |
ml/kmeans.v , ml/knn.v , ml/linreg.v |
Updated plot() method to align with the refactored plot module. |
plot/plot_test.v |
Updated test cases to align with the refactored plot module. |
examples/io_h5_dataset/main.v , examples/io_h5_relax/main.v |
Updated import statement from vsl.io.h5 to vsl.inout.h5 . |
🐇 "In the land of code, where the shadows lie, A rabbit hopped, its gaze held high. With every leap, a change was made, In the realm of plots, a new foundation laid. Now scatter, pie, and heatmap thrive, In the garden of traces, they come alive. So let's celebrate this grand revision, A leap forward in our coding mission!" 🎉
CodeRabbit is currently paused and will not perform reviews. To resume CodeRabbit reviews, enter @coderabbitai resume
@coderabbitai pause
@coderabbitai pause
Summary by CodeRabbit
New Features:
App
struct to generate an HTML page with a Plotly graph.port
constant to specify the server port.Improvements:
plot
module toplotly
for clarity.vsl.errors
import withvweb
for better error handling.add_trace
toscatter3d
,add_annotation
toannotation
,set_layout
tolayout
) for consistency and clarity.Refactor:
create_venv
andsolve_mod_path
functions.Trace
to represent different trace types.show
function to usevweb.run
to start the server.These changes enhance the software's intuitiveness and flexibility, making it easier for users to create and customize their data visualizations.