reflex/CONTRIBUTING.md
2023-01-18 14:24:07 -08:00

89 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Welcome to Pynecone contributing guide! 🥳
## Getting started
To navigate our codebase with confidence, see [Pynecone Docs](https://pynecone.io/docs/getting-started/introduction) :confetti_ball:.
### Discussions
- Have a question? Want to discuss a feature? [Start a discussion](https://github.com/pynecone-io/pynecone/discussions)
We welome and discussions and questions. We want to make sure that Pynecone is the best it can be, and we can't do that without your help.
### Issues
* #### Create a new issue
If you spot a problem with anything in Pynecone feel free to create an issue. Even if you are not sure if its a problem with the framework or your own code, create an issue and we will do our best to answer or resolve it.
* #### Solve an issue
Scan through our [existing issues](https://github.com/pynecone-io/pynecone/issues) to find one that interests you. You can narrow down the search using `labels` as filters. As a general rule, we dont assign issues to anyone. If you find an issue to work on, you are welcome to open a PR with a fix. Any large issue changing the compiler of Pynecone should brought to the Pynecone maintainers for approval
Thank you for supporting Pynecone!🎊
## 💻 How to Run a Local Build of Pynecone
Here is a quick guide to how the run Pynecone repo locally so you can start contributing to the project.
First clone Pynecone:
``` bash
git clone https://github.com/pynecone-io/pynecone.git
```
Navigate into the repo:
``` bash
cd pynecone
```
Install poetry and add it to your path (see [Poetry Docs](https://python-poetry.org/docs/#installation) for more info).
Install your local Pynecone build:
``` bash
poetry install
```
Now create an examples folder so you can test the local Python build in this repository:
``` bash
mkdir examples
cd examples
```
Create a project in this folder can be named anything but for the sake of the directions we'll use `example`:
``` bash
mkdir example
cd example
```
Now Init/Run
``` bash
poetry run pc init
poetry run pc run
```
All the changes you make to the repository will be reflected in your running app.
* We have the examples folder in the .gitignore, so your changes in pynecone/examples won't be reflected in your commit.
## ✅ Making a PR
Once you solve a current issue or improvement to Pynecone, you can make a pr, and we will review the changes.
Before submitting, a pull request, ensure the following steps are taken and test passing.
In your `pynecone` directory run make sure all the unit tests are still passing using the following command.
``` bash
poetry run pytest tests
```
Next make sure all the following tests pass. This ensures that every new change has proper documentation and type checking.
``` bash
poetry run pyright pynecone tests
poetry run pydocstyle pynecone tests
find pynecone tests -name "*.py" -not -path pynecone/pc.py | xargs poetry run darglint
```
Finally run `black` to format your code.
``` bash
poetry run black pynecone
```
That's it you can now submit your pr. Thanks for contributing to Pynecone!