|
| 1 | +# Contributing |
| 2 | + |
| 3 | +!!! note |
| 4 | + |
| 5 | + The [Code of Conduct](https://github.com/reactive-python/reactpy/blob/main/CODE_OF_CONDUCT.md) |
| 6 | + applies in all community spaces. If you are not familiar with our Code of Conduct policy, |
| 7 | + take a minute to read it before making your first contribution. |
| 8 | + |
| 9 | +The ReactPy team welcomes contributions and contributors of all kinds - whether they |
| 10 | +come as code changes, participation in the discussions, opening issues and pointing out |
| 11 | +bugs, or simply sharing your work with your colleagues and friends. We’re excited to see |
| 12 | +how you can help move this project and community forward! |
| 13 | + |
| 14 | +## Everyone Can Contribute! |
| 15 | + |
| 16 | +Trust us, there’s so many ways to support the project. We’re always looking for people who can: |
| 17 | + |
| 18 | +- Improve our documentation |
| 19 | +- Teach and tell others about ReactPy |
| 20 | +- Share ideas for new features |
| 21 | +- Report bugs |
| 22 | +- Participate in general discussions |
| 23 | + |
| 24 | +Still aren’t sure what you have to offer? Just [ask us](https://github.com/reactive-python/reactpy-router/discussions) and we’ll help you make your first contribution. |
| 25 | + |
| 26 | +## Development Environment |
| 27 | + |
| 28 | +For a developer installation from source be sure to install |
| 29 | +[NPM](https://www.npmjs.com/) before running: |
| 30 | + |
| 31 | +```bash |
| 32 | +git clone https://github.com/reactive-python/reactpy-router |
| 33 | +cd reactpy-router |
| 34 | +pip install -e . -r requirements.txt |
| 35 | +``` |
| 36 | + |
| 37 | +This will install an ediable version of `reactpy-router` as well as tools you'll need |
| 38 | +to work with this project. |
| 39 | + |
| 40 | +Of particular note is [`nox`](https://nox.thea.codes/en/stable/), which is used to |
| 41 | +automate testing and other development tasks. |
| 42 | + |
| 43 | +## Running the Tests |
| 44 | + |
| 45 | +```bash |
| 46 | +nox -s test |
| 47 | +``` |
| 48 | + |
| 49 | +You can run the tests with a headed browser. |
| 50 | + |
| 51 | +```bash |
| 52 | +nox -s test -- --headed |
| 53 | +``` |
| 54 | + |
| 55 | +## Releasing This Package |
| 56 | + |
| 57 | +To release a new version of reactpy-router on PyPI: |
| 58 | + |
| 59 | +1. Install [`twine`](https://twine.readthedocs.io/en/latest/) with `pip install twine` |
| 60 | +2. Update the `version = "x.y.z"` variable in `reactpy-router/__init__.py` |
| 61 | +3. `git` add the changes to `__init__.py` and create a `git tag -a x.y.z -m 'comment'` |
| 62 | +4. Build the Python package with `python setup.py sdist bdist_wheel` |
| 63 | +5. Check the build artifacts `twine check --strict dist/*` |
| 64 | +6. Upload the build artifacts to [PyPI](https://pypi.org/) `twine upload dist/*` |
| 65 | + |
| 66 | +To release a new version of `reactpy-router` on [NPM](https://www.npmjs.com/): |
| 67 | + |
| 68 | +1. Update `js/package.json` with new npm package version |
| 69 | +2. Clean out prior builds `git clean -fdx` |
| 70 | +3. Install and publish `npm install && npm publish` |
0 commit comments