Skip to content

Rename pgx to pgrx #594

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

Closed
wants to merge 6 commits into from
Closed
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
104 changes: 65 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: tests
on:
push:
branches:
- master
workflow_dispatch:
jobs:
tests:
Expand All @@ -14,49 +12,77 @@ jobs:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get install -y \
curl \
build-essential \
libopenblas-dev \
clang \
python3-dev \
libpython3-dev \
postgresql \
postgresql-server-dev-14 \
pkg-config \
python3-pip \
python3
sudo pip3 install xgboost lightgbm scikit-learn
git submodule update --init --recursive

# PostgreSQL apt
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:apt-fast/stable --yes
sudo add-apt-repository ppa:deadsnakes/ppa --yes
sudo apt update

sudo apt-get install -y apt-fast
sudo apt-get update && sudo apt-fast install -y \
libopenblas-dev \
libssl-dev \
bison \
flex \
pkg-config \
cmake \
libreadline-dev \
libz-dev \
curl \
lsb-release \
tzdata \
sudo \
cmake \
libpq-dev \
libclang-dev \
wget \
postgresql-15 \
postgresql-14 \
postgresql-13 \
postgresql-12 \
postgresql-11 \
postgresql-server-dev-15 \
postgresql-server-dev-14 \
postgresql-server-dev-13 \
postgresql-server-dev-12 \
postgresql-server-dev-11 \
lsb-release \
python3.10 \
python3-pip \
libpython3.10-dev \
python3.10-dev \

sudo pip3 install xgboost lightgbm scikit-learn
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo
pgml-extension/target
~/.pgx
~/.cargo
key: ${{ runner.os }}-rust-${{ hashFiles('pgml-extension/Cargo.lock') }}
- name: Submodules
run: |
git submodule update --init --recursive
- name: Run tests
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
source ~/.cargo/env
cargo install cargo-pgx --version "0.7.1"

if [[ ! -d ~/.pgx ]]; then
cargo pgx init
fi

cargo pgx test

cargo pgx stop
cargo pgx start

# psql -p 28813 -h 127.0.0.1 -d pgml -P pager -f tests/test.sql

cargo pgx stop



- name: Install pgrx
uses: postgresml/gh-actions-cargo@master
with:
working-directory: pgml-extension
command: install
args: cargo-pgrx --version "0.7.4"
- name: pgrx init
uses: postgresml/gh-actions-cargo@master
with:
working-directory: pgml-extension
command: pgrx
args: init --pg11=/usr/lib/postgresql/11/bin/pg_config --pg12=/usr/lib/postgresql/12/bin/pg_config --pg13=/usr/lib/postgresql/13/bin/pg_config --pg14=/usr/lib/postgresql/14/bin/pg_config --pg15=/usr/lib/postgresql/15/bin/pg_config
- name: pgrx test
uses: postgresml/gh-actions-cargo@master
with:
working-directory: pgml-extension
command: pgrx
args: test
2 changes: 1 addition & 1 deletion .github/workflows/package-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
with:
working-directory: pgml-extension
command: install
args: cargo-pgx --version "0.7.1"
args: cargo-pgx --version "0.7.4"
- name: pgx init
uses: postgresml/gh-actions-cargo@master
with:
Expand Down
50 changes: 25 additions & 25 deletions pgml-extension/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions pgml-extension/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ crate-type = ["cdylib"]

[features]
default = ["pg15", "python"]
pg11 = ["pgx/pg11", "pgx-tests/pg11" ]
pg12 = ["pgx/pg12", "pgx-tests/pg12" ]
pg13 = ["pgx/pg13", "pgx-tests/pg13" ]
pg14 = ["pgx/pg14", "pgx-tests/pg14" ]
pg15 = ["pgx/pg15", "pgx-tests/pg15" ]
pg11 = ["pgrx/pg11", "pgrx-tests/pg11" ]
pg12 = ["pgrx/pg12", "pgrx-tests/pg12" ]
pg13 = ["pgrx/pg13", "pgrx-tests/pg13" ]
pg14 = ["pgrx/pg14", "pgrx-tests/pg14" ]
pg15 = ["pgrx/pg15", "pgrx-tests/pg15" ]
pg_test = []
python = ["pyo3"]
cuda = ["xgboost/cuda", "lightgbm/cuda"]

[dependencies]
pgx = "=0.7.4"
pgx-pg-sys = "=0.7.4"
pgrx = "=0.7.4"
pgrx-pg-sys = "=0.7.4"
xgboost = { git="https://github.com/postgresml/rust-xgboost.git", branch = "master" }
once_cell = "1"
rand = "0.8"
Expand Down Expand Up @@ -48,7 +48,7 @@ flate2 = "1.0"
csv = "1.1"

[dev-dependencies]
pgx-tests = "=0.7.4"
pgrx-tests = "=0.7.4"

[profile.dev]
panic = "unwind"
Expand Down
4 changes: 2 additions & 2 deletions pgml-extension/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ RUN useradd postgresml -m -s /bin/bash -G sudo
RUN echo 'postgresml ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER postgresml
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN $HOME/.cargo/bin/cargo install cargo-pgx --version "0.7.4"
RUN $HOME/.cargo/bin/cargo pgx init
RUN $HOME/.cargo/bin/cargo install cargo-pgrx --version "0.7.4"
RUN $HOME/.cargo/bin/cargo pgrx init
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
RUN sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
RUN sudo apt update
Expand Down
2 changes: 1 addition & 1 deletion pgml-extension/control
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ Description: PostgresML - machine learning with PostgreSQL
learning directly in the database. It allows to both train
algorithms on tables or views, and to predict novel datapoints
using only SQL.
The extension is written in Rust using tcdi/pgx with some additional
The extension is written in Rust using tcdi/pgrx with some additional
functionality written in Python & PLPython.
18 changes: 9 additions & 9 deletions pgml-extension/docker/Cargo.toml.cuda
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ crate-type = ["cdylib"]

[features]
default = ["pg15", "python", "cuda"]
pg10 = ["pgx/pg10", "pgx-tests/pg10" ]
pg11 = ["pgx/pg11", "pgx-tests/pg11" ]
pg12 = ["pgx/pg12", "pgx-tests/pg12" ]
pg13 = ["pgx/pg13", "pgx-tests/pg13" ]
pg14 = ["pgx/pg14", "pgx-tests/pg14" ]
pg15 = ["pgx/pg15", "pgx-tests/pg15" ]
pg10 = ["pgrx/pg10", "pgrx-tests/pg10" ]
pg11 = ["pgrx/pg11", "pgrx-tests/pg11" ]
pg12 = ["pgrx/pg12", "pgrx-tests/pg12" ]
pg13 = ["pgrx/pg13", "pgrx-tests/pg13" ]
pg14 = ["pgrx/pg14", "pgrx-tests/pg14" ]
pg15 = ["pgrx/pg15", "pgrx-tests/pg15" ]
pg_test = []
python = ["pyo3"]
cuda = ["xgboost/cuda", "lightgbm/cuda"]

[dependencies]
pgx = "=0.7.1"
pgx-pg-sys = "=0.7.1"
pgrx = "=0.7.1"
pgrx-pg-sys = "=0.7.1"
xgboost = { git="https://github.com/postgresml/rust-xgboost.git", branch = "master" }
once_cell = "1"
rand = "0.8"
Expand Down Expand Up @@ -49,7 +49,7 @@ flate2 = "1.0"
csv = "1.1"

[dev-dependencies]
pgx-tests = "=0.7.1"
pgrx-tests = "=0.7.1"

[profile.dev]
panic = "unwind"
Expand Down
18 changes: 9 additions & 9 deletions pgml-extension/docker/Cargo.toml.no-python
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ crate-type = ["cdylib"]

[features]
default = ["pg15"]
pg10 = ["pgx/pg10", "pgx-tests/pg10" ]
pg11 = ["pgx/pg11", "pgx-tests/pg11" ]
pg12 = ["pgx/pg12", "pgx-tests/pg12" ]
pg13 = ["pgx/pg13", "pgx-tests/pg13" ]
pg14 = ["pgx/pg14", "pgx-tests/pg14" ]
pg14 = ["pgx/pg15", "pgx-tests/pg15" ]
pg10 = ["pgrx/pg10", "pgrx-tests/pg10" ]
pg11 = ["pgrx/pg11", "pgrx-tests/pg11" ]
pg12 = ["pgrx/pg12", "pgrx-tests/pg12" ]
pg13 = ["pgrx/pg13", "pgrx-tests/pg13" ]
pg14 = ["pgrx/pg14", "pgrx-tests/pg14" ]
pg14 = ["pgrx/pg15", "pgrx-tests/pg15" ]
pg_test = []
python = ["pyo3"]
cuda = ["xgboost/cuda", "lightgbm/cuda"]

[dependencies]
pgx = "=0.7.1"
pgx-pg-sys = "=0.7.1"
pgrx = "=0.7.1"
pgrx-pg-sys = "=0.7.1"
xgboost = { git="https://github.com/postgresml/rust-xgboost.git", branch = "master" }
once_cell = "1"
rand = "0.8"
Expand Down Expand Up @@ -49,7 +49,7 @@ flate2 = "1.0"
csv = "1.1"

[dev-dependencies]
pgx-tests = "=0.7.1"
pgrx-tests = "=0.7.1"

[profile.dev]
panic = "unwind"
Expand Down
2 changes: 1 addition & 1 deletion pgml-extension/sql/setup_examples.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---
--- Usage:
---
--- $ cargo pgx run --release
--- $ cargo pgrx run --release
--- $ psql -P pager-off -h localhost -p 28813 -d pgml -f sql/setup_examples.sql
---
\set ON_ERROR_STOP true
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy