Dash AG Grid welcomes community contributions!
If you have identified a bug or have an idea for a new feature, it's best to start with a GitHub issue. First look at existing issues at https://github.com/plotly/dash-ag-grid/issues to make sure this is not a duplicate. Then create a new issue. Bug reports should be accompanied by a small example app that someone else can copy and run to reproduce the problem.
If you have questions, please ask on the Dash Community Forum. rather than using GitHub issues.
Make sure you have Dash installed with dev and testing extras:
pip install dash[dev,testing]
Build the component (from the root of this repo):
npm i
npm run build
Now install the component in development mode:
$ pip install -e .
In development mode, Python uses the files in this directory when you import the package. So you can write a testing app in another folder, and whenever you change some code and rebuild the component here it will update in your testing app.
Update the package version in package.json
and CHANGELOG.md
and ensure the changelog lists all the important updates. Then reinstall (so package-lock.json
gets the new version) and rebuild:
npm i
npm run build
Commit this - either via a PR or directly to the main branch. Then you can create source and wheel distributions in the generated dist/
folder, after emptying out any previous builds:
rm -rf dist build
python setup.py sdist bdist_wheel
See PyPA for more information. At this point you can test the build. The best way is to make a virtual env in another directory, install the wheel you just built, and run one of the demo apps, something like:
cd ../my_test
python -m venv venv
. venv/bin/activate
pip install -e ".[dev, docs]"
And run the tests:
pytest
Create a new distribution with:
npm run dist
It doesn't need to be tested extensively, just enough to know that the table loads with no errors and you've built the right version of the code. If the app looks good, use twine
to upload these to PyPI:
# back in the dash-ag-grid directory
twine upload dist/*
Now you can go back to the test directory, install from PyPI, ensure you get the expected version, and test again:
pip uninstall dash-ag-grid
pip install dash-ag-grid
python demo_stock_portfolio.py
We also publish the JavaScript build to NPM, so unpkg
has the bundles if users set serve_locally=False
. First make a test of the NPM package, verify that its contents are reasonable:
npm pack
Then publish:
npm publish
Now create a git tag:
git tag -a 'v31.0,1' -m 'v31.0.1'
git push --tags
And create a new GitHub release linked to this tag, titled the same as the tag name (v31.0.1
etc), with the exact changelog entry for this release as the description, and attach the built packages (both files in the dist/
folder) to the release.
Lastly, announce the release in Slack, in both the #dash-product
and #community-ag-grid
channels. You're done!