Skip to content

Commit 476447d

Browse files
Merge pull request #192 from supertokens/docs/contributing-guide
docs: Update CONTRIBUTING.md and mention in CHANGELOG
2 parents 330257f + 9402a76 commit 476447d

File tree

2 files changed

+35
-14
lines changed

2 files changed

+35
-14
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [unreleased]
88

9+
### Documentation
10+
11+
- Add more details in the `CONTRIBUTING.md` to make it beginner friendly.
12+
13+
914
## [0.9.1] - 2022-06-27
1015
### Features:
1116

CONTRIBUTING.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ We're so excited you're interested in helping with SuperTokens! We are happy to
1414

1515
## Development Setup
1616

17-
You will need to setup the `supertokens-core` in order to run the `supertokens-python` tests, you can setup `supertokens-core` by following this [guide](https://github.com/supertokens/supertokens-core/blob/master/CONTRIBUTING.md#development-setup)
17+
You will need to setup the [supertokens-core](https://github.com/supertokens/supertokens-core) in order to run the `supertokens-python` tests, you can setup `supertokens-core` by following this [guide](https://github.com/supertokens/supertokens-core/blob/master/CONTRIBUTING.md#development-setup)
1818
**Note: If you are not contributing to the `supertokens-core` you can skip steps 1 & 4 under Project Setup of the `supertokens-core` contributing guide.**
1919

2020
### Prerequisites
2121

2222
- Python (version 3.7 or above)
23-
- IDE: [PyCharm](https://www.jetbrains.com/pycharm/download)(recommended) or equivalent IDE
23+
- IDE: [PyCharm](https://www.jetbrains.com/pycharm/download)(recommended) OR [VS Code](https://code.visualstudio.com/) OR equivalent IDE
2424

2525
### Project Setup
2626

27-
1. Fork the [supertokens-python](https://github.com/supertokens/supertokens-python) repository
27+
1. Fork the [supertokens-python](https://github.com/supertokens/supertokens-python) repository.
2828
2. Clone the forked repository in the parent directory of the previously setup `supertokens-root`.
29-
`supertokens-python` and `supertokens-root` should exist side by side within the same parent directory
29+
`supertokens-python` and `supertokens-root` should exist side by side within the same parent directory.
3030
3. Create a virtual environment for the `supertokens-python` project and activate it.
3131
4. Install the project dependencies
3232
`make dev-install`
@@ -35,23 +35,25 @@ You will need to setup the `supertokens-core` in order to run the `supertokens-p
3535

3636
## Modifying Code
3737

38-
1. Open the `supertokens-python` project in your IDE and you can start modifying the code
38+
- Open the `supertokens-python` project in your IDE and you can start modifying the code.
39+
- Use `make check-lint` and `make format` to find lint/formatting errors before committing. (They will run anyways)
3940

4041
## Testing
4142

42-
1. Navigate to the `supertokens-root` repository
43+
1. Navigate to the [supertokens-root](https://github.com/supertokens/supertokens-root) repository.
4344
2. Start the testing environment
4445
`./startTestEnv --wait`
45-
and ensure the test environment is up and running
46-
3. Open a new terminal and navigate to the `supertokens-python` respositry
47-
4. Run all tests, while ensuring the test environment is running on a different terminal
48-
`make test`
46+
and ensure the test environment is up and running.
47+
3. Open a new terminal and navigate to the `supertokens-python` respositry.
48+
4. Use `export SUPERTOKENS_PATH=path/to/supertokens-root` (**MANDATORY**)
49+
4. To run all tests, while ensuring the test environment is running on a different terminal, use `make test`.
50+
5. To run individual tests, use `pytest ./tests/path/to/test/file.py -k test_function_name` OR use your IDE's in-built UI for running python tests. You may read [VSCode Python Testing](https://code.visualstudio.com/docs/python/testing) and [PyCharm Testing](https://www.jetbrains.com/help/pycharm/testing-your-first-python-application.html#debug-test) for more info.
4951

5052
## Pull Request
5153

52-
1. Before submitting a pull request make sure all tests have passed
53-
2. Reference the relevant issue or pull request and give a clear description of changes/features added when submitting a pull request
54-
3. Make sure the PR title follows [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) specification
54+
1. Before submitting a pull request make sure all tests have passed.
55+
2. Reference the relevant issue or pull request and give a clear description of changes/features added when submitting a pull request.
56+
3. Make sure the PR title follows [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
5557

5658
## SuperTokens Community
5759

@@ -65,4 +67,18 @@ SuperTokens is made possible by a passionate team and a strong community of deve
6567
Additional resources you might find useful:
6668

6769
- [SuperTokens Docs](https://supertokens.io/docs/community/getting-started/installation)
68-
- [Blog Posts](https://supertokens.io/blog/)
70+
- [Blog Posts](https://supertokens.io/blog/)
71+
72+
## Implementing RecipeInterfaces
73+
74+
- Make sure all CRUD operations are available via the `(a)?syncio` modules of that recipe.
75+
- Make sure the corresponding `RecipeImplementation` takes type imports from the `interfaces.py` file of that recipe. This is so that if a user wants to copy / paste that code into their project, they can do so via the normal import statement.
76+
77+
## Implementing APIInterfaces
78+
- Make sure the corresonding `APIImplementation` takes type imports from the `interfaces.py` file of that recipe. This is so that if a user wants to copy / paste that code into their project, they can do so via the normal import statement.
79+
80+
## Generating docs
81+
This will generate the API docs in a folder called docs
82+
```
83+
make build-docs
84+
```

0 commit comments

Comments
 (0)