Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Refine README
Browse files Browse the repository at this point in the history
Signed-off-by: JaySon-Huang <[email protected]>
  • Loading branch information
JaySon-Huang committed Oct 25, 2024
1 parent 71f0ad9 commit cb6d831
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
- 'v6.5.3'
- 'v6.1.7'
- 'v5.4.3'
- 'v5.3.4'
- 'v5.2.4'
- 'v5.1.5'
- 'v4.0.15'
name: test_${{ matrix.python-version }}_tidb_${{ matrix.tidb-version }}
runs-on: ubuntu-latest
container:
Expand Down
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,29 @@ from sqlalchemy import create_engine
engine = create_engine("tidb://username:password@ip:port/database_name?charset=utf8mb4")
```

## testing
## Testing this dialect with SQLAlchemy and Alembic

Bootstrap your environment with virtualenv and requirements installed

```bash
make bootstrap
```

You can run the tests using the following command:

```bash
tox
# or test for a specified python version
make all
# Or running test with `tox` for a specified python version
tox -e py39
# Or running test directly using `pytest`
pytest "test/test_suite.py::DateTest"
```

To know more about developing the TiDB dialect, checkout the guide on sqlalchemy:

* https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4/README.dialects.rst
* https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4/README.unittests.rst

## Known issues

- TiDB only support `FOREIGN KEY` constraints since v6.6.0([#18209](https://github.com/pingcap/tidb/issues/18209)).
Expand Down

0 comments on commit cb6d831

Please sign in to comment.