-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:jason810496/pgmq-sqlalchemy
- Loading branch information
Showing
20 changed files
with
1,204 additions
and
922 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Contributing | ||
|
||
Welcome to contribute to `pgmq-sqlalchemy` ! <br> | ||
This document will guide you through the process of contributing to the project. | ||
|
||
## How to Contribute | ||
|
||
1. Fork the repository | ||
- Click the `Fork` button in the upper right corner of the repository page. | ||
2. Clone the repository | ||
- Clone the repository to your local machine. | ||
```bash | ||
git clone https://github.com/your-username/pgmq-sqlalchemy.git | ||
``` | ||
3. Create a new branch | ||
- Create a new branch for your changes. | ||
```bash | ||
git checkout -b feature/your-feature-name | ||
``` | ||
4. Make your changes | ||
- Make your changes to the codebase. | ||
- Add tests for your changes. | ||
- Add documentation if changes are user-facing. | ||
5. Commit your changes | ||
- Commit your changes with meaningful commit messages. | ||
- [ref: conventional git commit messages](https://www.conventionalcommits.org/en/v1.0.0/) | ||
```bash | ||
git commit -m "feat: your feature description" | ||
``` | ||
6. Push your changes | ||
- Push your changes to your forked repository. | ||
```bash | ||
git push origin feature/your-feature-name | ||
``` | ||
7. Create a Pull Request | ||
- Create a Pull Request from your forked repository to the `develop` branch of the original repository. | ||
|
||
## Development | ||
|
||
### Setup | ||
|
||
Install dependencies and `ruff` pre-commit hooks. | ||
```bash | ||
make install | ||
``` | ||
|
||
> Prerequisites: **Docker** and **Docker Compose** installed. | ||
|
||
Start development PostgreSQL | ||
```bash | ||
make start-db | ||
``` | ||
|
||
Stop development PostgreSQL | ||
```bash | ||
make stop-db | ||
``` | ||
|
||
### Makefile utility | ||
|
||
```bash | ||
make help | ||
``` | ||
> will show all available commands and their descriptions. | ||
|
||
### Linting | ||
|
||
We use [pre-commit](https://pre-commit.com/) hook with [ruff](https://github.com/astral-sh/ruff-pre-commit) to automatically lint the codebase before committing. | ||
|
||
|
||
### Testing | ||
|
||
Run tests in local | ||
```bash | ||
make test-local | ||
``` | ||
|
||
Run tests in docker | ||
```bash | ||
make test-docker | ||
``` | ||
|
||
### Documentation | ||
|
||
Serve documentation | ||
```bash | ||
make doc-serve | ||
``` | ||
|
||
Clean documentation build | ||
```bash | ||
make doc-clean | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Title (replace this with the title of your pull request) | ||
|
||
## Description | ||
|
||
Describe the changes you made in this pull request. <br> | ||
( replace this with the description of your pull request ) | ||
|
||
## Status | ||
|
||
- [ ] In progress | ||
- [ ] Ready for review | ||
- [ ] Done | ||
|
||
## Checklist | ||
|
||
- [ ] Read the [Contributing Guide](CONTRIBUTING.md) | ||
- [ ] Passes tests | ||
- [ ] Linted ( we use `pre-commit` with `ruff` ) | ||
- [ ] Updated documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/project/pgmq-sqlalchemy/ | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python - -y | ||
- name: Update PATH | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Update Poetry configuration | ||
run: poetry config virtualenvs.create false | ||
|
||
- name: Install dependencies | ||
run: poetry install --sync --no-interaction --without=dev | ||
|
||
- name: Package project | ||
run: poetry build | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. _api-reference: | ||
|
||
API Reference | ||
============= | ||
|
||
.. tip:: | ||
| For a more detailed explanation or implementation of each `PGMQ function`, | ||
| see `PGMQ: SQL functions.md <https://github.com/tembo-io/pgmq/blob/main/docs/api/sql/functions.md>`_. | ||
|
||
.. autoclass:: pgmq_sqlalchemy.PGMQueue | ||
:members: | ||
:inherited-members: | ||
:member-order: bysource | ||
:special-members: __init__ | ||
|
||
|
||
.. autoclass:: pgmq_sqlalchemy.schema.Message | ||
:members: | ||
:undoc-members: | ||
:inherited-members: | ||
:exclude-members: __init__ | ||
|
||
|
||
|
||
.. autoclass:: pgmq_sqlalchemy.schema.QueueMetrics | ||
:members: | ||
:undoc-members: | ||
:inherited-members: | ||
:exclude-members: __init__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.