Skip to content

Commit 4ae51b4

Browse files
committed
Update docs
1 parent 96a2893 commit 4ae51b4

File tree

2 files changed

+76
-23
lines changed

2 files changed

+76
-23
lines changed

CONTRIBUTING.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,46 @@
11
# SingleStore Python SDK Contributing Guide
22

33
Fork this repo and commit your changes to the forked repo.
4-
From there make a Pull Request with your submission keeping the following in mind:
4+
From there make a Pull Request with your submission keeping the
5+
following in mind:
56

67
## Pre-commit checks on the clone of this repo
78

8-
The CI pipeline in this repo runs a bunch of validation checks and code reformatting with pre-commit checks. If you don't install those checks in your clone of the repo, the code will likely not pass. To install the pre-commit tool in your clone run the following from your clone directory. This will force the checks before you can push.
9+
The CI pipeline in this repo runs a bunch of validation checks and code
10+
reformatting with pre-commit checks. If you don't install those checks
11+
in your clone of the repo, the code will likely not pass. To install
12+
the pre-commit tool in your clone run the following from your clone
13+
directory. This will force the checks before you can push.
914

10-
```bash
11-
pip3 install pre-commit==3.7.1
15+
```
16+
pip install pre-commit==3.7.1
1217
pre-commit install
1318
```
1419

15-
The checks run automatically when you attempt to commit, but you can run them manually as well with the following:
16-
```bash
20+
The checks run automatically when you attempt to commit, but you can run
21+
them manually as well with the following:
22+
```
1723
pre-commit run --all-files
1824
```
25+
26+
## Running tests
27+
28+
To create a test environment, do the following:
29+
```
30+
pip install -r requirements.txt
31+
pip install -r test-requirements.txt
32+
```
33+
34+
If you have Docker installed, you can run the tests as follows. Note that
35+
you should run the tests using both standard protocol and Data API (HTTP):
36+
```
37+
pytest -v singlestoredb/tests
38+
USE_DATA_API=1 -v singlestoredb/tests
39+
```
40+
41+
If you need to run against a specific server version, you can specify
42+
the URL of that server:
43+
```
44+
SINGLESTOREDB_URL=user:[email protected]:3306 pytest -v singlestoredb/tests
45+
SINGLESTOREDB_URL=http://user:[email protected]:8090 pytest -v singlestoredb/tests
46+
```

RELEASE.md

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,49 @@
11
# Release process
22

3-
1. Bump the version number in `setup.cfg` and `singlestoredb/__init__.py` using
4-
semantic versioning rules: minor bump for new features, patch bump for
5-
bug fixes.
3+
## Bump the package version and build documentation
64

7-
2. Add release notes to `docs/src/whatsnew.rst`.
5+
Bump the version number in `setup.cfg` and `singlestoredb/__init__.py` using
6+
semantic versioning rules: minor bump for new features, patch bump for
7+
bug fixes. Add release notes to `docs/src/whatsnew.rst`. Run `make html` in
8+
`docs/src` to generate documentation.
89

9-
3. Run `SINGLESTOREDB_URL=root:@db-server:db-port make html` in `docs/src` to
10-
generate documentation. You will need `sphinx` and `sphinx_rtd_theme` installed
11-
for this step. You also need a SingleStoreDB server running at the given
12-
IP and port to run samples against.
10+
You will need `sphinx` and `sphinx_rtd_theme` installed for this step. You
11+
also need a SingleStoreDB server running at the given IP and port to run
12+
samples against.
1313

14-
4. Commit all changed files with a commit like "Prepare for vX.X.X release".
14+
There is a utility to do this process for you, but you should check the
15+
`docs/src/whatsnew.rst` to verify the release summary. Use the following
16+
to run it:
17+
```
18+
resources/bump_version.py < major | minor | patch >
1519
16-
5. The coverage tests will be triggered by the push, but you should also run
17-
`Smoke test` workflow manually which does basic tests on all supported versions
18-
of Python.
20+
```
1921

20-
6. Once all workflows are clean, create a new Github release with the name
21-
"SingleStoreDB vX.X.X" and set the generated tag to the matching version
22-
number. Add the release notes from the `whatsnew.rst` file to the release
23-
notes. Creating the release will run the `Public packages` workflow which
24-
builds the packages and pubsishes them to PyPI.
22+
## Commit and push the changes
23+
24+
After verifying the release summary in the documentation, commit the changes:
25+
```
26+
# Make sure newly generated docs get added
27+
git add docs
28+
29+
# Commit changes
30+
git commit -am "Prepare for vX.X.X release".
31+
32+
git push
33+
34+
```
35+
36+
## Run smoke tests
37+
38+
The coverage tests will be triggered by the push, but you should also run
39+
[Smoke test](https://github.com/singlestore-labs/singlestoredb-python/actions/workflows/smoke-test.yml)
40+
workflow manually which does basic tests on all supported versions of Python.
41+
42+
## Create the release on Github
43+
44+
Once all workflows are clean, create a new Github release with the name
45+
"SingleStoreDB vX.X.X" at <https://github.com/singlestore-labs/singlestoredb-python/releases>
46+
and set the generated tag to the matching version
47+
number. Add the release notes from the `whatsnew.rst` file to the release
48+
notes. Creating the release will run the [Publish packages](https://github.com/singlestore-labs/singlestoredb-python/actions/workflows/publish.yml)
49+
workflow which builds the packages and pubsishes them to PyPI.

0 commit comments

Comments
 (0)