Skip to content

Commit 16d232b

Browse files
authored
chore(dev/release): Ensure release verification passes for 0.2.0 (#375)
1 parent c5c5158 commit 16d232b

5 files changed

Lines changed: 45 additions & 25 deletions

File tree

dev/release/README.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
## Verifying a release candidate
2323

2424
Release candidates are verified using the script `verify-release-candidate.sh <version> <rc_num>`.
25-
For example, to verify SedonaDB 0.1.0 RC0, run:
25+
For example, to verify SedonaDB 0.2.0 RC0, run:
2626

2727
```shell
2828
# git clone https://github.com/apache/sedona-db.git && cd sedona-db
2929
# or
3030
# cd existing/sedona-db && git fetch upstream && git switch main && git pull upstream main
31-
dev/release/verify-release-candidate.sh 0.1.0 0
31+
dev/release/verify-release-candidate.sh 0.2.0 0
3232
```
3333

3434
Release verification requires a recent Rust toolchain. This toolchain can be installed
@@ -46,21 +46,23 @@ install the required dependencies:
4646
```shell
4747
conda create -y --name verify-sedona-db
4848
conda activate verify-sedona-db
49-
conda install -y curl gnupg geos proj openssl libabseil cmake pkg-config
49+
conda install -y compilers curl gnupg geos proj openssl libabseil cmake make pkg-config
5050
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CONDA_PREFIX/lib"
5151
```
5252

53-
Currently, system libclang is required to generate C bindings at build time:
53+
When verifying via Docker or on a smaller machine it may be necessary to limit the
54+
number of parallel jobs to avoid running out of memory:
5455

5556
```shell
56-
apt-get update && apt-get install -y libclang-dev
57+
export CARGO_BUILD_JOBS=4
5758
```
5859

59-
When verifying via Docker or on a smaller machine it may be necessary to limit the
60-
number of parallel jobs to avoid running out of memory:
60+
Verifiers may opt in to additional features normally tested in CI with dedicated tooling.
61+
For example, to verify with specific Python build-time features, the `MATURIN_PEP517_ARGS`
62+
environment variable may be set.
6163

6264
```shell
63-
export CARGO_BUILD_JOBS=4
65+
export MATURIN_PEP517_ARGS="--features s2geography"
6466
```
6567

6668
## Creating a release
@@ -71,8 +73,8 @@ a committer.
7173

7274
```shell
7375
git pull upstream main
74-
git branch -b branch-0.1.0
75-
git push upstream -u branch-0.1.0:branch-0.1.0
76+
git branch -b branch-0.2.0
77+
git push upstream -u branch-0.2.0:branch-0.2.0
7678
```
7779

7880
This push should cause two CI runs to begin:
@@ -98,8 +100,8 @@ When the state of the `branch-x.x.x` branch is clean and checks are complete,
98100
the release candidate tag can be created:
99101

100102
```shell
101-
git tag -a apache-sedona-db-0.1.0-rc0 -m "Tag Apache SedonaDB 0.1.0-rc0"
102-
git push upstream apache-sedona-db-0.1.0-rc0
103+
git tag -a apache-sedona-db-0.2.0-rc0 -m "Tag Apache SedonaDB 0.2.0-rc0"
104+
git push upstream apache-sedona-db-0.2.0-rc0
103105
```
104106

105107
This will trigger another packaging CI run that, if successful, will create a
@@ -114,7 +116,7 @@ The GPG_KEY_ID in dev/release/.env must have its public component listed in the
114116

115117
```shell
116118
# sign-assets.sh <version> <rc_number>
117-
dev/release/sign-assets.sh 0.1.0 0
119+
dev/release/sign-assets.sh 0.2.0 0
118120
```
119121

120122
After the assets are signed, they can be committed and uploaded to the
@@ -123,7 +125,7 @@ is provided:
123125

124126
```shell
125127
# upload-candidate.sh <version> <rc_number>
126-
APACHE_USERNAME=your_apache_username dev/release/upload-candidate.sh 0.1.0 0
128+
APACHE_USERNAME=your_apache_username dev/release/upload-candidate.sh 0.2.0 0
127129
```
128130

129131
## Vote
@@ -140,17 +142,17 @@ Apache release repository. A helper script is provided:
140142

141143
```shell
142144
# upload-release.sh <version> <rc_number>
143-
APACHE_USERNAME=your_apache_username dev/release/upload-release.sh 0.1.0 0
145+
APACHE_USERNAME=your_apache_username dev/release/upload-release.sh 0.2.0 0
144146
```
145147

146148
An official GitHub tag must also be created:
147149

148150
```shell
149-
git tag -a apache-sedona-db-0.1.0 -m "SedonaDB 0.1.0" apache-sedona-db-0.1.0-rc0
150-
git push upstream apache-sedona-db-0.1.0
151+
git tag -a apache-sedona-db-0.2.0 -m "SedonaDB 0.2.0" apache-sedona-db-0.2.0-rc0
152+
git push upstream apache-sedona-db-0.2.0
151153
```
152154

153-
The prerelease located at <https://github.com/apache/sedona-db/releases/tag/apache-sedona-db-0.1.0-rc0>
155+
The prerelease located at <https://github.com/apache/sedona-db/releases/tag/apache-sedona-db-0.2.0-rc0>
154156
can now be edited to point to the official release tag and the GitHub release published
155157
from the UI.
156158

@@ -189,19 +191,19 @@ are currently all derived from `Cargo.toml`, which can be updated to:
189191

190192
```
191193
[workspace.package]
192-
version = "0.2.0"
194+
version = "0.3.0"
193195
```
194196

195197
The R package must also be updated. R Packages use a different convention for development
196-
versions such that in preparation for 0.2.0 the development version should be
197-
`0.1.0.9000`. This is set the DESCRIPTION of the requisite package.
198+
versions such that in preparation for 0.3.0 the development version should be
199+
`0.2.0.9000`. This is set the DESCRIPTION of the requisite package.
198200

199201
Development versions and the changelog are derived from the presence of a development
200202
tag on the main branch signifying where development of that version "started". After
201203
the version bump PR merges, that commit should be tagged with the appropriate
202204
development tag:
203205

204206
```shell
205-
git tag -a apache-sedona-db-0.2.0.dev -m "tag dev 0.2.0"
206-
git push upstream apache-sedona-db-0.2.0.dev
207+
git tag -a apache-sedona-db-0.3.0.dev -m "tag dev 0.3.0"
208+
git push upstream apache-sedona-db-0.3.0.dev
207209
```

dev/release/verify-release-candidate.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ test_python() {
262262
show_info "Installing Python package"
263263
rm -rf "${SEDONADB_TMPDIR}/python"
264264

265-
# Keep this export in sync with the export in .github/workflows/python.yml
266-
export MATURIN_PEP517_ARGS="--features s2geography"
267265
pip install "sedonadb/[test]" -v
268266

269267
show_info "Testing Python package"

python/sedonadb/python/sedonadb/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
__version__ = _lib.sedona_python_version()
2121

22+
__features__ = _lib.sedona_python_features()
23+
2224
__all__ = ["connect", "options"]
2325

2426
# Attempt to configure PROJ on import. This will warn if PROJ

python/sedonadb/src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ fn sedona_python_version() -> PyResult<String> {
5353
Ok(VERSION.to_string())
5454
}
5555

56+
#[cfg(feature = "s2geography")]
57+
#[pyfunction]
58+
fn sedona_python_features() -> PyResult<Vec<String>> {
59+
Ok(vec!["s2geography".to_string()])
60+
}
61+
62+
#[cfg(not(feature = "s2geography"))]
63+
#[pyfunction]
64+
fn sedona_python_features() -> PyResult<Vec<String>> {
65+
Ok(vec![])
66+
}
67+
5668
#[pyfunction]
5769
fn sedona_adbc_driver_init() -> PyResult<Py_uintptr_t> {
5870
let driver_init_void = AdbcSedonadbDriverInit as *const c_void;
@@ -91,6 +103,7 @@ fn _lib(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
91103
m.add_function(wrap_pyfunction!(configure_proj_shared, m)?)?;
92104
m.add_function(wrap_pyfunction!(sedona_adbc_driver_init, m)?)?;
93105
m.add_function(wrap_pyfunction!(sedona_python_version, m)?)?;
106+
m.add_function(wrap_pyfunction!(sedona_python_features, m)?)?;
94107
m.add_function(wrap_pyfunction!(sedona_scalar_udf, m)?)?;
95108

96109
m.add_class::<context::InternalContext>()?;

python/sedonadb/tests/functions/test_order.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@
1717

1818
import geopandas
1919
import geopandas.testing
20+
import pytest
21+
import sedonadb
2022

2123

2224
def test_order_sql(con):
25+
if "s2geography" not in sedonadb.__features__:
26+
pytest.skip("Ordering currently requires build with feature s2geography")
27+
2328
wkt_unsorted = [
2429
None,
2530
"POINT EMPTY",

0 commit comments

Comments
 (0)