11# Contributing
22
3- Thank you for contributing to plotly.py! We are actively looking for
3+ Thank you for your interest in contributing to plotly.py! We are actively looking for
44diverse contributors, with diverse background and skills.
55
6- This guide start by a general description of the different ways to contribute
6+ This guide starts with a general description of the different ways to contribute
77to plotly.py, then we explain some technical aspects of preparing your
88contribution.
99
@@ -17,26 +17,34 @@ but the general idea is to be nice.
1717There are many ways to contribute to plotly.py. It helps to understand first
1818the structure of the code and of the repository.
1919
20- - the ` codegen ` (package in ` packages/python/plotly/codegen ` ): all the code
21- inside ` plotly.graph_objects ` is generated from the plotly javascript API
22- (the "schema"). The ` codegen ` package is where the code generation is done.
23- Most of the codegen code concerns the generation of docstrings. Traces and
20+ - [ the ` plotly.graph_objects ` module] ( https://plotly.com/python/graph-objects/ ) (usually imported as ` go ` )
21+ is [ generated from the Plotly.js schema] ( https://plotly.com/python/figure-structure/ ) ,
22+ so changes to be made in this package need to be
23+ [ contributed to Plotly.js] ( https://github.com/plotly/plotly.js ) or to the ` codegen ` system
24+ in ` packages/python/plotly/codegen ` . Most of the codegen code concerns the generation of docstrings from
25+ the schema JSON in Plotly.js. Traces and
2426 Layout classes have a direct correspondence with their Javascript
25- counterpart. Additional methods are defined for the ` Figure ` object, such as
27+ counterpart. Additional helper methods are defined there for the ` Figure ` object, such as
2628 ` update_layout ` , ` add_trace ` , etc.
2729
28- - the ` plotly.express ` package (usually imported as ` px ` ) is a high-level
29- functional API. Its code is in ` packages/python/plotly/express ` . Most
30- functions of ` plotly.express ` call the internal ` _make_figure ` function
30+ - [ the ` plotly.express ` module] ( https://plotly.com/python/plotly-express/ ) (usually imported as ` px ` ) is a high-level
31+ functional API that uses ` graph_objects ` under the hood. Its code is in ` packages/python/plotly/express ` .
32+ Plotly Express functions
33+ are designed to be highly consistent with each other, and to do * as little computation
34+ in Python as possible* , generally concerning themselves with formatting data and creating
35+ figures out of ` plotly.graph_objects ` instances. Most
36+ functions of ` plotly.express ` call the same internal ` _make_figure ` function
3137 in ` _core.py ` . More generally, the internals of ` px ` consist of general
3238 functions taking care of building the figure (defining subplots, traces
3339 or frames, for example), with special cases for different traces handled
3440 within these functions. There is also subsequent code reuse for ` px `
3541 docstrings, in particular for documenting parameters.
3642
37- - the ` plotly.figure_factory ` module provides Python "recipes" for building
38- advanced visualizations, such as Gantt charts, annotated heatmaps, etc.
39- Figure factories are one of the easiest entry points into plotly.py, since
43+ - [ the ` plotly.figure_factory ` module] ( https://plotly.com/python/figure-factories/ ) (usually imported as ` ff ` )
44+ provides Python "recipes" for building
45+ advanced visualizations with involved computation done in Python, such as
46+ Hexbin maps, ternary contour plots, etc.
47+ Figure factories are one of the easiest entry points into contributing to plotly.py, since
4048 they consist of Python-only code, with standalone, well-separated functions.
4149 However, please note that some of the figure factories become less relevant
4250 as we are introducing more features into ` plotly.express ` . Some issues in the
0 commit comments