Skip to content

Commit b4fd55f

Browse files
authored
chore: update to repo standards (#5)
1 parent 53eda84 commit b4fd55f

File tree

4 files changed

+162
-1
lines changed

4 files changed

+162
-1
lines changed

.github/dependabot.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (c) 2026 ADBC Drivers Contributors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
version: 2
16+
updates:
17+
- package-ecosystem: "cargo"
18+
commit-message:
19+
prefix: "chore: "
20+
directory: "/"
21+
groups:
22+
arrow-adbc:
23+
applies-to: version-updates
24+
patterns:
25+
- "arrow-*"
26+
- "adbc_*"
27+
schedule:
28+
interval: "weekly"
29+
30+
- package-ecosystem: "github-actions"
31+
commit-message:
32+
prefix: "chore: "
33+
directory: "/"
34+
groups:
35+
actions:
36+
patterns:
37+
- "*"
38+
schedule:
39+
interval: "weekly"

CONTRIBUTING.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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.

src/validation/CLAUDE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ Get validation tests passing using `pixi run validate`. Use `-k` to run a single
2424

2525
### Query-based tests (type/select, type/literal, type/bind, ingest)
2626

27-
1. **Override queries**: If ClickHouse requires different SQL syntax, create override query files in `./validation/queries/` using the `.txtcase` format.
27+
1. **Override queries**: If ClickHouse requires different SQL syntax, create override query files in `./validation/queries/` using the `.txtcase` format. Do not override sections that are identical to the base query. When overriding, check the documentation for the database and add `tags.sql-type-name` to the TOML metadata to reflect the "canonical" type name for that data type. Also, if data values need to be changed, make sure "extreme" values are tested. For example, timestamps/datetimes should test the ANSI SQL extremes of 0001-01-01 and 9999-12-31, or if not possible, they should test the extremes of the database.
2828

2929
2. **Mark as broken**: If a test cannot pass due to driver or vendor limitations, add to the metadata section:
3030
- `[tags] broken-driver = "reason"` - for driver limitations
3131
- `[tags] broken-vendor = "reason"` - for ClickHouse limitations
3232

33+
For ClickHouse limitations, try to link to database documentation.
34+
3335
3. **Hide tests**: Use `hide = true` in metadata to completely hide irrelevant tests.
3436

3537
### Non-query tests (connection, statement)

src/validation/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
# Validation Suite Setup
18+
19+
You must set up a ClickHouse instance. The included [Docker
20+
Compose](https://docs.docker.com/compose/) config can be used:
21+
22+
```
23+
$ cd src/
24+
$ docker compose up
25+
```
26+
27+
This will start ClickHouse running on `http://localhost:8123`.

0 commit comments

Comments
 (0)