Skip to content

Commit ac9e496

Browse files
committed
add documentation for commands.py to CONTRIBUTING.md
1 parent 9717f12 commit ac9e496

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,3 +307,18 @@ You can then run the following command
307307
```bash
308308
python commands.py updateplotlyjsdev --local /path/to/your/plotly.js/
309309
```
310+
311+
## Documentation for `commands.py`
312+
313+
`commands.py` serves as an entry point for utilities to help with plotly.py development.
314+
315+
Usage: `python commands.py <subcommand> <args>`
316+
317+
| Subcommand | Purpose |
318+
|------------|---------|
319+
| `codegen [--noformat]` | Regenerate Python files according to `plot-schema.json`.`--noformat` skips formatter step. |
320+
| `lint` | Lint all Python code in `plotly/`. |
321+
| `format` | Format all Python code in `plotly/`. |
322+
| `updateplotlyjs` | Update `plotly.min.js` and `plot-schema.json` to match the `plotly.js` version specified in `js/package.json`. Then, run codegen to regenerate the Python files. |
323+
| `updateplotlyjsdev [--devrepo REPONAME --devbranch BRANCHNAME] \| [--local PATH]` | Update `plot-schema.json` and `plotly.min.js` to match the version in the provided plotly.js repo name and branch name, OR local path. Then, run codegen to regenerate the Python files. |
324+
| `bumpversion X.Y.Z` | Update the plotly.py version number to X.Y.Z across all files where it needs to be updated. |

0 commit comments

Comments
 (0)