jiayuasu commented on code in PR #1182: URL: https://github.com/apache/sedona-db/pull/1182#discussion_r3837838433
########## dev/release/README.md: ########## @@ -74,6 +74,12 @@ enable runtime binding generation: export SEDONADB_CARGO_TEST_ARGS="--features bindgen" ``` +The Python test suite includes comparison tests that connect to a PostGIS instance at +`postgresql://localhost:5432/postgres?user=postgres&password=password` when one is +reachable. Start the pinned version with `docker compose up -d postgis` from the +repository root before verifying; an unrelated local PostgreSQL listening on port 5432 +(e.g., an older PostGIS that lacks `ST_HasM`) will cause these tests to fail. Review Comment: Thanks, applied. The suggestion picked up a trailing space that tripped the pre-commit check; fixed in c6c4458. ########## dev/release/README.md: ########## @@ -242,26 +248,54 @@ popd ``` Use `twine` to upload the release to PyPI. This will require a token created -in the PyPI UI. +in the PyPI UI. The pure-Python packages (e.g., `sedonadb-expr`) are built with +Metadata-Version 2.5, which requires `twine>=7`. If the token is stored in +`~/.pypirc`, the `[distutils] index-servers` list must include `pypi` or twine will +not read the `[pypi]` section. The native wheels are large, so `--skip-existing` +allows the upload to be resumed if it is interrupted. ```shell -# pip install twine -twine upload wheels/**/*.whl +# pip install "twine>=7" +twine upload --repository pypi --skip-existing wheels/**/*.whl wheels/**/*.tar.gz rm -rf wheels ``` ### Upload to `crates.io` -A script is provided to upload the crates to <https://crates.io>. +A script is provided to upload the crates to <https://crates.io>. Run it from a +checkout of the release tag with submodules initialized (the `sedona-s2geography` +crate compiles the `s2geography` and `s2geometry` submodules during verification). ```shell +git checkout apache-sedona-db-0.4.1 +git submodule update --init c/sedona-s2geography/s2geography c/sedona-s2geography/s2geometry cargo login -dev/release/upload-crates-io.sh +# Validate first, then publish. Tests and the release build can be skipped if the +# release tarball has already been verified. +dev/release/publish-crates.sh --dry-run-local +dev/release/publish-crates.sh --publish --skip-tests --skip-validation ``` -Currently the `[dev-dependencies]` of some crates need to be modified to avoid circular -dependencies (we have a PR in the works to remove these circular dependencies), usually -removing `sedona-testing`. +If publishing stops partway, fix the problem and resume with +`--start-from <crate-name>`. + +`cargo publish` resolves `[dev-dependencies]` that carry a version requirement, so +dev-dependencies that form a cycle with a crate published later must be removed from +the local checkout before publishing (do not commit these changes). As of 0.4.1 these are +`sedona-testing` in `sedona-geometry`, `sedona-gdal`, `sedona-geo-generic-alg`, +`sedona-raster`, `sedona-expr`, and `sedona-functions`; `sedona-proj` in +`sedona-functions`; and `sedona` in `sedona-pointcloud`, `sedona-tg`, `sedona-geos`, +`sedona-geoarrow-c`, and `sedona-s2geography`. Review Comment: Agreed that it is a hack. I reworded the paragraph to reference #702 and #1025 and to frame this as a stopgap until the cycles are removed, with the note that the modifications are local-only and the published crate contents are otherwise identical to the voted release. Happy to drop the paragraph entirely once #1025 lands. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
