You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+30-14Lines changed: 30 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,19 +14,19 @@ We're so excited you're interested in helping with SuperTokens! We are happy to
14
14
15
15
## Development Setup
16
16
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)
18
18
**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.**
19
19
20
20
### Prerequisites
21
21
22
22
- 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
24
24
25
25
### Project Setup
26
26
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.
28
28
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.
30
30
3. Create a virtual environment for the `supertokens-python` project and activate it.
31
31
4. Install the project dependencies
32
32
`make dev-install`
@@ -35,23 +35,25 @@ You will need to setup the `supertokens-core` in order to run the `supertokens-p
35
35
36
36
## Modifying Code
37
37
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)
39
40
40
41
## Testing
41
42
42
-
1. Navigate to the `supertokens-root` repository
43
+
1. Navigate to the [supertokens-root](https://github.com/supertokens/supertokens-root) repository.
43
44
2. Start the testing environment
44
45
`./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.
49
51
50
52
## Pull Request
51
53
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.
55
57
56
58
## SuperTokens Community
57
59
@@ -65,4 +67,18 @@ SuperTokens is made possible by a passionate team and a strong community of deve
- 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
0 commit comments