Skip to content

Commit

Permalink
Rename cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cevian committed May 29, 2024
1 parent 0ecd01b commit fbe376f
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 75 deletions.
34 changes: 0 additions & 34 deletions .github/actions/install-timescaledb/action.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ jobs:
image: timescaledev/rust-builder:ubuntu-1.65

steps:
- name: Checkout Timescale Vector
- name: Checkout
uses: actions/checkout@v3
# extension is small so we do the hacky thing.
# - name: Run Cargo tests
# run: cd pgvectorscale && cargo install --locked cargo-pgrx && cargo pgrx init && cargo pgrx test && cd ..

- name: Verify formatting
run: cd pgvectorscale && cargo fmt --check
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deb-packager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
TAG_DIR: pgvectorscale

steps:
- name: Checkout Timescale Vector
- name: Checkout pgvectorscale
uses: actions/checkout@v3

- name: Install Linux Packages
Expand All @@ -46,10 +46,10 @@ jobs:
pg-src-dir: ~/${{ env.PG_SRC_DIR }}
pg-install-dir: ~/${{ env.PG_INSTALL_DIR }}

- name: Checkout Timescale Vector ${{ env.TAG }}
- name: Checkout ${{ env.TAG }}
uses: actions/checkout@v3
with:
repository: timescale/timescale-vector
repository: timescale/pgvectorscale
ref: '${{ env.TAG }}'
path: ${{ env.TAG_DIR }}

Expand All @@ -72,4 +72,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: vector-${{ env.TAG }}-pg${{ env.PG_VER }}
path: pkgdump/timescale-vector-*${{ env.TAG }}*.deb
path: pkgdump/pgvectorscale-*${{ env.TAG }}*.deb
2 changes: 1 addition & 1 deletion .github/workflows/shellcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
sudo apt-get update
sudo apt-get install shellcheck
- name: Checkout Timescale Vector
- name: Checkout
uses: actions/checkout@v3

- name: Run shellcheck
Expand Down
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
Timescale Vector
# pgvectorscale

A vector index for speeding up ANN search in `pgvector`.

🔧 Tools Setup
## 💾 Building and Installing pgvectorscale

Building the extension requires valid rust, rustfmt, and clang installs, along with the postgres headers for whichever version of postgres you are running, and pgx. We recommend installing rust using the official instructions:
### From source

#### Prerequisites

Building the extension requires valid rust, along with the postgres headers for whichever version of postgres you are running, and pgrx. We recommend installing rust using the official instructions:
```shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
and build tools, the postgres headers, in the preferred manner for your system. You may also need to install OpenSSL. For Ubuntu you can follow the postgres install instructions then run

You should install the appropriate build tools and postgres headers in the preferred manner for your system. You may also need to install OpenSSL. For Ubuntu you can follow the postgres install instructions then run

```shell
sudo apt-get install make gcc pkg-config clang postgresql-server-dev-16 libssl-dev
```

Next you need cargo-pgx, which can be installed with
Next you need cargo-pgrx, which can be installed with
```shell
cargo install --locked cargo-pgrx
```

You must reinstall cargo-pgx whenever you update your Rust compiler, since cargo-pgx needs to be built with the same compiler as Timescale Vector.
You must reinstall cargo-pgrx whenever you update your Rust compiler, since cargo-pgrx needs to be built with the same compiler as pgvectorscale.

Finally, setup the pgx development environment with
Finally, setup the pgrx development environment with
```shell
cargo pgrx init --pg16 pg_config
```

Installing from source is also available on macOS and requires the same set of prerequisites and set up commands listed above.

💾 Building and Installing the extension
#### Building and installing the extension

Download or clone this repository, and switch to the extension subdirectory, e.g.
```shell
git clone https://github.com/timescale/timescale-vector && \
cd timescale-vector/pgvectorscale
git clone https://github.com/timescale/pgvectorscale && \
cd pgvectorscale/pgvectorscale
```

Then run
Expand All @@ -47,11 +50,11 @@ To initialize the extension after installation, enter the following into psql:
CREATE EXTENSION vectorscale;
```

✏️ Get Involved
## ✏️ Get Involved

The Timescale Vector project is still in it's early stage as we decide our priorities and what to implement. As such, now is a great time to help shape the project's direction! Have a look at the list of features we're thinking of working on and feel free to comment on the features, expand the list, or hop on the Discussions forum for more in-depth discussions.
The pgvectorscale project is still in it's early stage as we decide our priorities and what to implement. As such, now is a great time to help shape the project's direction! Have a look at the list of features we're thinking of working on and feel free to comment on the features, expand the list, or hop on the Discussions forum for more in-depth discussions.

🔨 Testing
### 🔨 Testing
See above for prerequisites and installation instructions.

You can run tests against a postgres version pg16 using
Expand All @@ -64,7 +67,7 @@ To run all tests run:
cargo test -- --ignored && cargo pgrx test ${postgres_version}
```

🐯 About Timescale
### 🐯 About Timescale

TimescaleDB is a distributed time-series database built on PostgreSQL that scales to over 10 million of metrics per second, supports native compression, handles high cardinality, and offers native time-series capabilities, such as data retention policies, continuous aggregate views, downsampling, data gap-filling and interpolation.

Expand Down
2 changes: 1 addition & 1 deletion pgvectorscale/benches/distance.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use pgvectorscale::access_method::distance::{
use vectorscale::access_method::distance::{
distance_cosine, distance_l2, distance_l2_optimized_for_few_dimensions,
distance_l2_unoptimized, distance_xor_optimized,
};
Expand Down
30 changes: 15 additions & 15 deletions scripts/package-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -ex
OS_NAME="${3}"
BASEDIR="${2}"/pgvectorscale
DEBDIR="${PWD}"/pkgdump
TIMESCALE_VECTOR_VERSION="${1}"
PGVECTORSCALE_VERSION="${1}"
PG_VERSIONS="${4}"

echo "$BASEDIR"
Expand All @@ -16,7 +16,7 @@ if [ ! -d "$DEBDIR" ]; then
mkdir -p "${DEBDIR}"
fi

DEB_VERSION=${TIMESCALE_VECTOR_VERSION}-${OS_NAME}
DEB_VERSION=${PGVECTORSCALE_VERSION}-${OS_NAME}

# Show what we got to aid debugging.
git log -1
Expand All @@ -30,15 +30,15 @@ cd "${BASEDIR}"

# deb-changelog(5)
cat >"${BASEDIR}"/debian/changelog <<EOF
timescale-vector (1:$DEB_VERSION) unused; urgency=medium
* See https://github.com/timescale/timescale-vector/releases/tag/$TIMESCALE_VECTOR_VERSION
pgvectorscale (1:$DEB_VERSION) unused; urgency=medium
* See https://github.com/timescale/pgvectorscale/releases/tag/$PGVECTORSCALE_VERSION
-- $maintainer $date
EOF
# deb-src-control(5)
cat >"${BASEDIR}"/debian/control <<EOF
Source: timescale-vector
Source: pgvectorscale
Maintainer: $maintainer
Homepage: https://github.com/timescale/timescale-vector
Homepage: https://github.com/timescale/pgvectorscale
Rules-Requires-Root: no
Section: vector
Priority: extra
Expand All @@ -55,14 +55,14 @@ for pg in $PG_VERSIONS; do
# cargo pgrx package
cat >>"${BASEDIR}"/debian/control <<EOF
Package: timescale-vector-postgresql-$pg
Package: pgvectorscale-postgresql-$pg
Architecture: any
Depends: postgresql-$pg
Description: Timescale Vector Extension for Cloud
Description: pgvectorscale for speeding up ANN search
EOF

echo "target/release/pgvectorscale-pg$pg/$libdir/* usr/lib/postgresql/$pg/lib/" >"${BASEDIR}"/debian/timescale-vector-postgresql-"$pg".install
echo "target/release/pgvectorscale-pg$pg/$sharedir/* usr/share/postgresql/$pg/" >>"${BASEDIR}"/debian/timescale-vector-postgresql-"$pg".install
echo "target/release/pgvectorscale-pg$pg/$libdir/* usr/lib/postgresql/$pg/lib/" >"${BASEDIR}"/debian/pgvectorscale-postgresql-"$pg".install
echo "target/release/pgvectorscale-pg$pg/$sharedir/* usr/share/postgresql/$pg/" >>"${BASEDIR}"/debian/pgvectorscale-postgresql-"$pg".install
done

dpkg-buildpackage --build=binary --no-sign --post-clean
Expand All @@ -71,11 +71,11 @@ cd ..

# packagecloud.io doesn't support `.ddeb` files? Like `.udeb`, they're just
# deb packages by another name, so:
for i in timescale-vector*.ddeb; do
for i in pgvectorscale*.ddeb; do
# But it's only on Ubuntu that dpkg-buildpackage creates dbgsym packages
# with the suffix `.ddeb`. On Debian, 'timescale-vector*.ddeb'
# evaluates to 'timescale-vector*.ddeb' so there's nothing to do.
[ "$i" = 'timescale-vector*.ddeb' ] || mv "$i" "${i%.ddeb}".deb
# with the suffix `.ddeb`. On Debian, 'pgvectorscale*.ddeb'
# evaluates to 'pgvectorscale*.ddeb' so there's nothing to do.
[ "$i" = 'pgvectorscale*.ddeb' ] || mv "$i" "${i%.ddeb}".deb
done

cp timescale-vector*.deb "$DEBDIR"
cp pgvectorscale*.deb "$DEBDIR"

0 comments on commit fbe376f

Please sign in to comment.