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
# Install the SuperDuper project in editable mode, along with the necessary developer tools.
49
+
pip install -e '.[test]'
52
50
```
53
51
54
-
(Optional) build the docker development environment:
55
-
52
+
Install the required plugins for your development environment.
56
53
```shell
57
-
make build_sandbox
54
+
# The mongodb plugin is required for the tests (nosql)
55
+
pip install -e 'plugins/mongodb[test]'
56
+
# The ibis and sqlalchemy plugins are required for the tests (sql)
57
+
pip install -e 'plugins/ibis[test]'
58
+
pip install -e 'plugins/sqlalchemy[test]'
58
59
```
59
60
61
+
You can install any additional plugins needed for your development environment.
62
+
60
63
## Branch workflow
61
64
62
65
We follow something called a "fork and pull request" workflow for collaborating on our project. See [here](https://gist.github.com/Chaser324/ce0505fbed06b947d962) for a great overview on what some of these mysterious terms mean!
@@ -74,30 +77,128 @@ make unit_testing
74
77
75
78
### Extension integration tests
76
79
77
-
These tests that package integrations, such as `sklearn` or `openai`
78
-
work properly.
80
+
We use specific use cases to test the entire system.
79
81
80
82
```shell
81
-
make ext_testing
83
+
make usecase_testing
82
84
```
83
85
84
-
### Databackend integration tests
86
+
### Plugin tests
85
87
86
-
These tests check that data-backend integrations such as MongoDB or SQLite
87
-
work as expected.
88
+
We maintain a set of plugins that are tested independently.. If you change the plugin code, you can run the tests for that plugin.
88
89
89
90
```shell
90
-
make databackend_testing
91
+
export PYTHONPATH=./
92
+
# Install the plugin you want to test
93
+
pip install -e 'plugins/<PLUGIN_NAME>[test]'
94
+
# Run the tests
95
+
pytest plugins/<PLUGIN_NAME>/plugin_test
91
96
```
92
97
93
-
### Smoke tests of cluster mode
94
98
95
-
These tests check that cluster mode works as expected (`ray`, `vector-search`, `cdc`, `rest`):
99
+
## Lint and type-check the code
96
100
97
-
```shell
98
-
make smoke_testing
101
+
We use `black` for code formatting, `run` for linting, and `mypy` for type-checking.
102
+
103
+
You can run the following commands to check the code:
104
+
105
+
```
106
+
make lint-and-type-check
107
+
```
108
+
109
+
If you want to format the code, you can run the following command:
110
+
```
111
+
make fix-and-check
112
+
```
113
+
114
+
## Contributing to new plugins and templates
115
+
116
+
The `superduper` project is designed to be extensible and customizable. You can create new plugins and templates to extend the functionality of the project.
117
+
118
+
### Create a new plugin
119
+
120
+
Plugins are Python packages that extend the functionality of the SuperDuper project.
121
+
More details about the plugins can be found in the documentation:
Then a new markdown file `<Your superduper project path>/templates/<TEMPLATE_NAME>/build.md`.
196
+
197
+
You can copy the file to the `superduper-docs/content/templates` directory and change the file name to `<TEMPLATE_NAME>.md`.
198
+
199
+
200
+
201
+
101
202
## Create an issue
102
203
103
204
If you have an unsolvable problem or find a bug with the code, we
@@ -113,10 +214,37 @@ Creating a useful issue, is itself a useful skill. Think about following these p
113
214
- To flag the issue to the team, escalate this in the Slack channels
114
215
- Tag relevant people who have worked on that issue, or know the feature
115
216
217
+
## CI workflow
218
+
219
+
We have two ci workflows that run on the pull requests:
220
+
221
+
- Code Testing: Unittests, Extension Integration Tests. The code testing is run on every pull request.
222
+
- Plugin Testing: Plugin tests. The plugin testing only runs on the pull requests that change the plugin code.
223
+
224
+
Additionally, we have a plugin release workflow that runs on the main branch. The plugin release workflow will release the plugins to the PyPI.
225
+
226
+
### Code Testing
227
+
228
+
1. Lint and type-check
229
+
2. Unit Testing, will run the unittests with mongodb and sqlite
230
+
3. Usecase Testing, will run the usecases with mongodb and sqlite
231
+
232
+
### Plugin Testing
233
+
234
+
The plugin use matrix testing to test the plugins which are changed in the pull request.
235
+
236
+
1. Lint and type-check
237
+
2. Run `plugins/<PLUGIN_NAME>/plugin_test`
238
+
3. Run the base testing(Optional): If the config file `plugins/<PLUGIN_NAME>/plugin_test/config.yaml` exists, the unittests and usecases will be run with the plugin.
239
+
240
+
### Release plugins on PyPI
241
+
242
+
The workflow detects commit messages like `[PLUGINS] Bump Version [plugin_1 | plugin_2]` and releases the corresponding plugins to PyPI.
If you have any problems please contact a maintainer or community volunteer. The GitHub issues or the Slack channel are a great place to start. We look forward to seeing you there! :purple_heart:
0 commit comments