diff --git a/.github/workflows/pgmq_python.yml b/.github/workflows/pgmq_python.yml index 681bf4d..ed62fda 100644 --- a/.github/workflows/pgmq_python.yml +++ b/.github/workflows/pgmq_python.yml @@ -1,9 +1,9 @@ -name: tembo-pgmq-python CI workflow +name: pgmq-python CI workflow defaults: run: shell: bash - working-directory: tembo-pgmq-python + working-directory: ./ on: pull_request: @@ -11,66 +11,70 @@ on: - main paths: - ".github/workflows/pgmq_python.yml" - - "tembo-pgmq-python/tembo_pgmq_python/**" - - "tembo-pgmq-python/tests/**" - - "tembo-pgmq-python/pyproject.toml" - - "pgmq-extension/**" + - "src/**" + - "tests/**" + - "pyproject.toml" push: branches: - main paths: - ".github/workflows/pgmq_python.yml" - - "tembo-pgmq-python/tembo_pgmq_python/**" - - "tembo-pgmq-python/tests/**" - - "tembo-pgmq-python/pyproject.toml" - - "pgmq-extension/**" + - "src/**" + - "tests/**" + - "pyproject.toml" jobs: lints: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python 3.11.0 - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: 3.11.0 - - name: Install dependencies - run: | - curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.7.1 python3 - - poetry install + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + version: "latest" + - name: Install project + run: uv sync --all-groups - name: Lints / Type Checking - run: make lints + run: make lint tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python 3.11.0 - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: 3.11.0 - - name: Install dependencies - run: | - curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.7.1 python3 - - poetry install --extras "async" + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + version: "latest" + - name: Install project + run: uv sync --all-groups --all-extras - name: Unit and Integration Tests run: make test publish: runs-on: ubuntu-latest # only publish off main branch - if: github.repository == 'tembo-io/pgmq' && github.ref == 'refs/heads/main' + if: github.repository == 'pgmq/pgmq-py' && github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v4 - name: Set up Python 3.11.0 - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: 3.11.0 - - name: Install dependencies - run: | - curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.7.1 python3 - - poetry install + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + version: "latest" + - name: Install project + run: uv sync --all-groups - name: Publish env: POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} run: | - poetry publish --build --skip-existing + uv publish diff --git a/Makefile b/Makefile index 4a8fbad..212337c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -SCOPE=pgmq-py/ +SCOPE=src/ .PHONY: format lint test clear-postgres run-pgmq-postgres @@ -15,7 +15,7 @@ clear-postgres: docker rm -f pgmq-postgres || true run-pgmq-postgres: - docker run -d --name pgmq-postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 quay.io/tembo/pg17-pgmq:latest + docker run -d --name pgmq-postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 ghcr.io/pgmq/pg17-pgmq:latest test: clear-postgres run-pgmq-postgres sleep 10 # Give PostgreSQL time to start diff --git a/benches/bench.py b/benches/bench.py index 2a3082a..acaca2e 100644 --- a/benches/bench.py +++ b/benches/bench.py @@ -236,7 +236,6 @@ def bench( # example usage (remove `poetry run`) if not using poetry to manage the environment # 10 processes each writing 1 message at a time, as fast as possible for 60 seconds # 10 processes, each reading->deleting up to 10 messages at a time, until all messages consumed - # excecute from pgmq/tembo-pgmq-python # # poetry run python -m benches.bench 'postgresql://$USER:$PASSWORD@$HOST:$PORT/$DATABASE' 60 \ # --write-concurrency=10 \ diff --git a/pyproject.toml b/pyproject.toml index 91572be..15dab26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,11 +24,11 @@ classifiers = [ ] authors = [ - { name = "Adam Hendel", email = "adam@tembo.io" }, + { name = "Adam Hendel" }, ] maintainers = [ - { name = "Adam Hendel", email = "adam@tembo.io" }, + { name = "Adam Hendel" }, { name = "Ali Tavallaie", email = "ali@techbend.io" }, ]