diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea98b91..38b1d6e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,12 +1,46 @@ # CONTRIBUTING -Welcome to dash-canvas! +Welcome to dash-canvas! Contributions, bug reports, comments about the +package are very welcome. The project is hosted on +https://github.com/plotly/dash-canvas. -## Structure of the code +This project was initially generated by the +[dash-component-boilerplate](https://github.com/plotly/dash-component-boilerplate), +which contains the minimal set of code required to create your own custom +Dash component. -React component DashCanvas: `src/lib/components/DashCanvas.react.js` +## Structure of the code: -Build Javascript component: `npm run build:all` at the root (see https://dash.plot.ly/react-for-python-developers for more details). +- the source code of the ``dash_canvas.DashCanvas`` canvas reactive + object is the JavaScript React class in +``src/lib/components/DashCanvas.react.js``. If you are not familiar with +React and JavaScript, [this +tutorial](https://dash.plot.ly/react-for-python-developers) is a good +primer. In order to build the Javascript component: execute at the root +of the package -Utility Python functions: `dash_canvas/utils` +``` +npm run build:all +``` +- the ``dash_canvas/utils`` submodule contains utility functions in order + to use annotations retrieved from the DashCanvas object for further +image processing. + +- for examples of applications using dash-canvas, see the https://github.com/plotly/canvas-portal. These examples show in particular how to write callbacks using the DashCanvas object properties. + +## Testing + +For testing the DashCanvas objects using Selenium + +``` +pytest tests --webdriver Chrome +``` + +(or using another webdriver). + +For testing the Python package and utility functions + +``` +pytest dash_canvas +```