|
| 1 | +<!-- |
| 2 | + Copyright (c) 2026 ADBC Drivers Contributors |
| 3 | +
|
| 4 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + you may not use this file except in compliance with the License. |
| 6 | + You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | + Unless required by applicable law or agreed to in writing, software |
| 11 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + See the License for the specific language governing permissions and |
| 14 | + limitations under the License. |
| 15 | +--> |
| 16 | + |
| 17 | +# How to Contribute |
| 18 | + |
| 19 | +All contributors are expected to follow the [Code of |
| 20 | +Conduct](https://github.com/adbc-drivers/clickhouse?tab=coc-ov-file#readme). |
| 21 | + |
| 22 | +## Reporting Issues and Making Feature Requests |
| 23 | + |
| 24 | +Please file issues and feature requests on the GitHub issue tracker: |
| 25 | +https://github.com/adbc-drivers/clickhouse/issues |
| 26 | + |
| 27 | +Potential security vulnerabilities should be reported to |
| 28 | +[security@adbc-drivers.org](mailto:security@adbc-drivers.org) instead. See |
| 29 | +the [Security |
| 30 | +Policy](https://github.com/adbc-drivers/clickhouse?tab=security-ov-file#readme). |
| 31 | + |
| 32 | +## Build and Test |
| 33 | + |
| 34 | +Most likely, you want to contribute to the upstream driver at |
| 35 | +https://github.com/ClickHouse/adbc_clickhouse. This repository only holds |
| 36 | +build and test scripts for the ADBC Driver Foundry. |
| 37 | + |
| 38 | +You can invoke the build script used by CI: |
| 39 | + |
| 40 | +```shell |
| 41 | +$ cd src/ |
| 42 | +# ./ci/scripts/build.sh <test|release> <linux|macos|windows> <amd64|arm64> |
| 43 | +# For example, this makes a debug build: |
| 44 | +$ ./ci/scripts/build.sh test linux amd64 |
| 45 | +``` |
| 46 | + |
| 47 | +This will produce a shared library in `src/build`. |
| 48 | + |
| 49 | +To run the validation suite, you will first need to build the shared library. |
| 50 | +You will also need to set up a ClickHouse instance (see [the validation |
| 51 | +README](./src/validation/README.md)). Finally, from the `src/` subdirectory: |
| 52 | + |
| 53 | +```shell |
| 54 | +$ pixi run validate |
| 55 | +``` |
| 56 | + |
| 57 | +This will produce a test report, which can be rendered into a documentation |
| 58 | +page (using MyST Markdown): |
| 59 | + |
| 60 | +```shell |
| 61 | +$ pixi run gendocs --output generated/ |
| 62 | +``` |
| 63 | + |
| 64 | +Then look at `./generated/clickhouse.md`. |
| 65 | + |
| 66 | +## Opening a Pull Request |
| 67 | + |
| 68 | +Before opening a pull request: |
| 69 | + |
| 70 | +- Review your changes and make sure no stray files, etc. are included. |
| 71 | +- Ensure the Apache license header is at the top of all files. |
| 72 | +- Check if there is an existing issue. If not, please file one, unless the |
| 73 | + change is trivial. |
| 74 | +- Assign the issue to yourself by commenting just the word `take`. |
| 75 | +- Run the static checks by installing [pre-commit](https://pre-commit.com/), |
| 76 | + then running `pre-commit run --all-files` from inside the repository. Make |
| 77 | + sure all your changes are staged/committed (unstaged changes will be |
| 78 | + ignored). |
| 79 | + |
| 80 | +When writing the pull request description: |
| 81 | + |
| 82 | +- Ensure the title follows [Conventional |
| 83 | + Commits](https://www.conventionalcommits.org/en/v1.0.0/) format. The |
| 84 | + component generally be omitted. Example titles: |
| 85 | + |
| 86 | + - `feat: support GEOGRAPHY data type` |
| 87 | + - `chore: update action versions` |
| 88 | + - `fix!: return us instead of ms` |
| 89 | + |
| 90 | + Ensure that breaking changes are appropriately flagged with a `!` as seen |
| 91 | + in the last example above. |
| 92 | +- Make sure the description ends with `Closes #NNN`, `Fixes #NNN`, or |
| 93 | + similar, so that the issue will be linked to your pull request. |
0 commit comments