Skip to content

Commit

Permalink
[SEDONA-613] Add pre-commit hook yamllint (apache#1484)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton authored and Kontinuation committed Jul 10, 2024
1 parent ae1bd35 commit 7a76b1f
Show file tree
Hide file tree
Showing 10 changed files with 248 additions and 225 deletions.
12 changes: 6 additions & 6 deletions .asf.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
notifications:
commits: commits@sedona.apache.org
issues_status: dev@sedona.apache.org
issues_comment: issues@sedona.apache.org
pullrequests_status: dev@sedona.apache.org
pullrequests_comment: issues@sedona.apache.org
jira_options: link label worklog
commits: commits@sedona.apache.org
issues_status: dev@sedona.apache.org
issues_comment: issues@sedona.apache.org
pullrequests_status: dev@sedona.apache.org
pullrequests_comment: issues@sedona.apache.org
jira_options: link label worklog
github:
description: "A cluster computing framework for processing large-scale geospatial data"
homepage: https://sedona.apache.org/
Expand Down
11 changes: 11 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# https://yamllint.readthedocs.io/en/stable/
extends: default

rules:
colons: disable
comments: disable
comments-indentation: disable
document-start: disable
line-length: disable
truthy: false
2 changes: 2 additions & 0 deletions .github/linters/codespell.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
actualy
afterall
atmost
bu
celle
checkin
eiter
errorprone
fpt
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,28 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Setup docker (missing on macOS)
if: runner.os == 'macos'
run: |
brew install docker
colima start
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.darwin-amd64 -o $DOCKER_CONFIG/cli-plugins/docker-buildx
chmod +x $DOCKER_CONFIG/cli-plugins/docker-buildx
- env:
SPARK_VERSION: ${{ matrix.spark }}
SEDONA_VERSION: ${{ matrix.sedona }}
GEOTOOLS_VERSION: ${{ matrix.geotools }}
run: ./docker/sedona-spark-jupyterlab/build.sh ${SPARK_VERSION} ${SEDONA_VERSION} local ${GEOTOOLS_VERSION}
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Setup docker (missing on macOS)
if: runner.os == 'macos'
run: |
brew install docker
colima start
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.darwin-amd64 -o $DOCKER_CONFIG/cli-plugins/docker-buildx
chmod +x $DOCKER_CONFIG/cli-plugins/docker-buildx
- env:
SPARK_VERSION: ${{ matrix.spark }}
SEDONA_VERSION: ${{ matrix.sedona }}
GEOTOOLS_VERSION: ${{ matrix.geotools }}
run: ./docker/sedona-spark-jupyterlab/build.sh ${SPARK_VERSION} ${SEDONA_VERSION} local ${GEOTOOLS_VERSION}
72 changes: 36 additions & 36 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,39 +83,39 @@ jobs:
skipTests: ''

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- run: sudo apt-get -y install python3-pip python-dev-is-python3
- env:
SPARK_VERSION: ${{ matrix.spark }}
run: (pip install pyspark==${SPARK_VERSION};pip install pandas==1.3.5;pip install shapely==1.8.5;pip install pyarrow==10.0.1)
- env:
SPARK_VERSION: ${{ matrix.spark }}
SCALA_VERSION: ${{ matrix.scala }}
SKIP_TESTS: ${{ matrix.skipTests }}
run: |
SPARK_COMPAT_VERSION="3.0"
if [ ${SPARK_VERSION:2:1} -gt "3" ]; then
SPARK_COMPAT_VERSION=${SPARK_VERSION:0:3}
fi
mvn -q clean install -Dspark=${SPARK_COMPAT_VERSION} -Dscala=${SCALA_VERSION:0:4} -Dspark.version=${SPARK_VERSION} ${SKIP_TESTS}
- run: mkdir staging
- run: cp spark-shaded/target/sedona-*.jar staging
- run: |
[ -d "flink-shaded/target/" ] && cp flink-shaded/target/sedona-*.jar staging 2>/dev/null || true
- uses: actions/upload-artifact@v3
with:
name: generated-jars ${{ matrix.spark }} ${{ matrix.scala }} ${{ matrix.jdk }}
path: staging
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- run: sudo apt-get -y install python3-pip python-dev-is-python3
- env:
SPARK_VERSION: ${{ matrix.spark }}
run: (pip install pyspark==${SPARK_VERSION};pip install pandas==1.3.5;pip install shapely==1.8.5;pip install pyarrow==10.0.1)
- env:
SPARK_VERSION: ${{ matrix.spark }}
SCALA_VERSION: ${{ matrix.scala }}
SKIP_TESTS: ${{ matrix.skipTests }}
run: |
SPARK_COMPAT_VERSION="3.0"
if [ ${SPARK_VERSION:2:1} -gt "3" ]; then
SPARK_COMPAT_VERSION=${SPARK_VERSION:0:3}
fi
mvn -q clean install -Dspark=${SPARK_COMPAT_VERSION} -Dscala=${SCALA_VERSION:0:4} -Dspark.version=${SPARK_VERSION} ${SKIP_TESTS}
- run: mkdir staging
- run: cp spark-shaded/target/sedona-*.jar staging
- run: |
[ -d "flink-shaded/target/" ] && cp flink-shaded/target/sedona-*.jar staging 2>/dev/null || true
- uses: actions/upload-artifact@v3
with:
name: generated-jars ${{ matrix.spark }} ${{ matrix.scala }} ${{ matrix.jdk }}
path: staging
74 changes: 37 additions & 37 deletions .github/workflows/python-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,40 +38,40 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install pipenv
run: pip install -U pipenv
- name: Install dependencies
run: |
cd python
pipenv --python ${{ matrix.python }}
pipenv install --dev
- name: Build extension
run: |
cd python
pipenv run python setup.py build_ext --inplace
- name: Run tests
run: |
cd python
pipenv run pytest tests/utils/test_geomserde_speedup.py
- name: Run tests on Shapely 2.0
run: |
cd python
pipenv install shapely~=2.0
pipenv run pytest tests/utils/test_geomserde_speedup.py
- name: Run tests on Shapley 1.7
# Shapely 1.7 only provides wheels for cp36 ~ cp39, so we'll skip running
# this test for recent python versions.
if: ${{ matrix.python == '3.9' || matrix.python == '3.8' }}
run: |
cd python
pipenv install shapely~=1.7
pipenv run pytest tests/utils/test_geomserde_speedup.py
- name: Install from sdist
run: |
cd python
pipenv run python setup.py sdist
pipenv run python -m pip install dist/*sedona-*.tar.gz
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install pipenv
run: pip install -U pipenv
- name: Install dependencies
run: |
cd python
pipenv --python ${{ matrix.python }}
pipenv install --dev
- name: Build extension
run: |
cd python
pipenv run python setup.py build_ext --inplace
- name: Run tests
run: |
cd python
pipenv run pytest tests/utils/test_geomserde_speedup.py
- name: Run tests on Shapely 2.0
run: |
cd python
pipenv install shapely~=2.0
pipenv run pytest tests/utils/test_geomserde_speedup.py
- name: Run tests on Shapley 1.7
# Shapely 1.7 only provides wheels for cp36 ~ cp39, so we'll skip running
# this test for recent python versions.
if: ${{ matrix.python == '3.9' || matrix.python == '3.8' }}
run: |
cd python
pipenv install shapely~=1.7
pipenv run pytest tests/utils/test_geomserde_speedup.py
- name: Install from sdist
run: |
cd python
pipenv run python setup.py sdist
pipenv run python -m pip install dist/*sedona-*.tar.gz
38 changes: 19 additions & 19 deletions .github/workflows/python-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.18.1
env:
CIBW_SKIP: 'pp* *musl*'
CIBW_ARCHS_LINUX: 'x86_64 aarch64'
CIBW_ARCHS_WINDOWS: 'AMD64 ARM64'
CIBW_ARCHS_MACOS: 'x86_64 arm64'
with:
package-dir: python
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.18.1
env:
CIBW_SKIP: 'pp* *musl*'
CIBW_ARCHS_LINUX: 'x86_64 aarch64'
CIBW_ARCHS_WINDOWS: 'AMD64 ARM64'
CIBW_ARCHS_MACOS: 'x86_64 arm64'
with:
package-dir: python
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
Loading

0 comments on commit 7a76b1f

Please sign in to comment.