Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDF internals, ray consensus, improved intersections performance #36

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 96 additions & 97 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,106 +1,105 @@
on: [push, pull_request]

defaults:
run:
shell: bash
run:
shell: bash

jobs:
lint-rust:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: make lint-rust

lint-rust:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: make lint-rust
lint-python:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- run: pip install $(grep -E '^(black|ruff|mypy|numpy)' requirements.txt)
- run: make lint-python

lint-python:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip install $(grep -E '^(black|ruff|mypy|numpy)' requirements.txt)
- run: make lint-python
test-rust:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- run: cargo test

test-rust:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- run: cargo test
test-python:
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: |
sudo apt-get install libspatialindex-dev
pip install -U pip wheel
pip install -r requirements.txt
name: Install dependencies
- run: |
mkdir -p $TGT_DIR
rm -f $TGT_DIR/*.whl
maturin build --release --interpreter python --out $TGT_DIR
pip install $TGT_DIR/*.whl
name: Install package
env:
TGT_DIR: "target/wheels/${{ matrix.python-version }}"
- run: pytest --verbose

test-python:
strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: |
sudo apt-get install libspatialindex-dev
pip install -U pip wheel
pip install -r requirements.txt
name: Install dependencies
- run: |
mkdir -p $TGT_DIR
rm -f $TGT_DIR/*.whl
maturin build --release --interpreter python --out $TGT_DIR
pip install $TGT_DIR/*.whl
name: Install package
env:
TGT_DIR: "target/wheels/${{ matrix.python-version }}"
- run: pytest --verbose

deploy:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-20.04]
needs: [lint-rust, lint-python, test-rust, test-python]
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- uses: messense/maturin-action@v1
with:
manylinux: auto
command: publish
args: -u __token__ -p ${{ secrets.MATURIN_PASSWORD }} --skip-existing --universal2
name: Deploy wheels
deploy:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-20.04]
needs: [lint-rust, lint-python, test-rust, test-python]
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- uses: messense/maturin-action@v1
with:
manylinux: auto
command: publish
args: -u __token__ -p ${{ secrets.MATURIN_PASSWORD }} --skip-existing --universal2
name: Deploy wheels
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,5 @@ ENV/
.mypy_cache/

.benchmarks/

tmp/
38 changes: 19 additions & 19 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
version: 2

sphinx:
builder: html
builder: html

build:
os: "ubuntu-22.04"
tools:
python: "3.9"
apt_packages:
- curl
- build-essential
- gcc
- make
jobs:
pre_create_environment:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
pre_install:
- /bin/bash scripts/cargo_hack.sh

os: "ubuntu-22.04"
tools:
python: "3.9"
rust: "1.70"
# apt_packages:
# - curl
# - build-essential
# - gcc
# - make
# jobs:
# pre_create_environment:
# - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# pre_install:
# - /bin/bash scripts/cargo_hack.sh

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
install:
- requirements: docs/requirements.txt
- method: pip
path: .
Loading
Loading