diff --git a/.github/workflows/test_rust_workflow.yml b/.github/workflows/test_rust_workflow.yml index 76a4542668..680df601e2 100644 --- a/.github/workflows/test_rust_workflow.yml +++ b/.github/workflows/test_rust_workflow.yml @@ -53,7 +53,7 @@ jobs: with: cache-all-crates: true - name: Flip raphtory-arrow in Cargo.toml - run: python ./scripts/flip_ra.py Cargo.toml + run: python ./scripts/flip_ra.py - name: Install bininstall uses: cargo-bins/cargo-binstall@main - name: Install nextest @@ -63,7 +63,7 @@ jobs: RUSTFLAGS: -Awarnings TEMPDIR: ${{ runner.temp }} run: | - cargo nextest run --all --no-default-features + cargo nextest run --all --no-default-features --features "arrow" - name: Run Tests (features=io) env: RUSTFLAGS: -Awarnings diff --git a/Makefile b/Makefile index b1b4fa8f30..706a308552 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,6 @@ rust-build-docs: cargo doc --no-deps -p raphtory -q rust-build-readthedocs: - ./scripts/hide_arrow_dep.sh cargo doc --no-deps -p raphtory -q --target-dir $(RUST_READTHEDOCS_DOCS_TARGET) rm -rf $(RUST_READTHEDOCS_DOCS_TARGET)/debug mv $(RUST_READTHEDOCS_DOCS_TARGET)/doc/* $(RUST_READTHEDOCS_DOCS_TARGET) diff --git a/scripts/flip_ra.py b/scripts/flip_ra.py index 3a0a849e92..73e21ebaba 100755 --- a/scripts/flip_ra.py +++ b/scripts/flip_ra.py @@ -1,23 +1,24 @@ #!/usr/bin/env python3 -import sys -import tempfile import shutil +import os, stat +import subprocess +directory = "./raphtory-arrow" -if len(sys.argv) != 2: - print("Usage: flip_ra.py ") - sys.exit(1) +def remove_readonly(func, path, _): + "Clear the readonly bit and reattempt the removal" + os.chmod(path, stat.S_IWRITE) + func(path) -file = sys.argv[1] +shutil.rmtree(directory, onerror=remove_readonly) -with tempfile.NamedTemporaryFile(delete=False, mode='w') as tmp: - tmp_file_name = tmp.name - with open(file, 'r') as f: - for line in f: - if line.startswith("#flip raphtory-arrow"): - line = line.replace("#flip raphtory-arrow", "raphtory-arrow", 1) - elif line.startswith("raphtory-arrow"): - line = line.replace("raphtory-arrow", "#flip raphtory-arrow", 1) - tmp.write(line) - -shutil.move(tmp_file_name, file) +subprocess.run( + [ + "git", + "clone", + "--depth", + "1", + "git@github.com:Pometry/raphtory-arrow.git", + "raphtory-arrow", + ] +)