Skip to content

Commit 4b2a181

Browse files
authored
Merge pull request #120 from supabase-community/chore/fix-ci-cd-and-update-precommit-rules-and-add-badges-to-readme
chore: fix ci cd, update precommit rules and add badges to readme
2 parents e498781 + d5c4483 commit 4b2a181

File tree

5 files changed

+575
-53
lines changed

5 files changed

+575
-53
lines changed

.github/workflows/ci.yml

+7-28
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,26 @@ jobs:
2121
- name: Set up Poetry
2222
uses: abatilo/[email protected]
2323
with:
24-
poetry-version: 1.1.11
24+
poetry-version: 1.1.12
2525
- name: Run Tests
2626
run: make run_tests
2727
- name: Upload Coverage
2828
uses: codecov/codecov-action@v1
2929

3030
publish:
3131
needs: test
32-
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') && github.ref == 'refs/heads/develop' && github.event_name == 'push' }}
32+
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') && !startsWith(github.event.head_commit.message, 'chore') && github.ref == 'refs/heads/develop' && github.event_name == 'push' && github.repository_owner == 'supabase-community' }}
3333
runs-on: ubuntu-latest
3434
name: "Bump version, create changelog and publish"
3535
steps:
3636
- name: Clone Repository
3737
uses: actions/checkout@v2
3838
with:
39+
ref: ${{ github.ref }}
3940
fetch-depth: 0
40-
- name: Create bump and changelog
41-
uses: commitizen-tools/commitizen-action@master
41+
- name: Python Semantic Release
42+
uses: relekang/python-semantic-release@master
4243
with:
4344
github_token: ${{ secrets.GITHUB_TOKEN }}
44-
branch: develop
45-
changelog_increment_filename: body.md
46-
- name: Release
47-
uses: softprops/action-gh-release@v1
48-
with:
49-
body_path: body.md
50-
tag_name: ${{ env.REVISION }}
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
- name: Set up Python 3.9
54-
uses: actions/setup-python@v2
55-
with:
56-
python-version: 3.9
57-
- name: Set up Poetry
58-
uses: abatilo/[email protected]
59-
with:
60-
poetry-version: 1.1.11
61-
# - name: Publish
62-
# env:
63-
# PYPI_USERNAME: __token__
64-
# PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
65-
# run: |
66-
# poetry install
67-
# poetry publish --build -u $PYPI_USERNAME -p $PYPI_PASSWORD
45+
repository_username: __token__
46+
repository_password: ${{ secrets.PYPI_TOKEN }}

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.1
3+
rev: v4.1.0
44
hooks:
55
- id: trailing-whitespace
66
- id: check-added-large-files
@@ -35,18 +35,18 @@ repos:
3535
]
3636

3737
- repo: https://github.com/ambv/black
38-
rev: 21.11b1
38+
rev: 21.12b0
3939
hooks:
4040
- id: black
4141

4242
- repo: https://github.com/asottile/pyupgrade
43-
rev: v2.29.1
43+
rev: v2.31.0
4444
hooks:
4545
- id: pyupgrade
4646
args: ["--py37-plus", "--keep-runtime-typing"]
4747

4848
- repo: https://github.com/commitizen-tools/commitizen
49-
rev: v2.20.0
49+
rev: v2.20.3
5050
hooks:
5151
- id: commitizen
5252
stages: [commit-msg]

README.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
# supabase-py
22

3-
[![CI/CD](https://github.com/supabase-community/supabase-py/actions/workflows/ci.yml/badge.svg)](https://github.com/supabase-community/supabase-py/actions/workflows/ci.yml)
4-
[![PyPI version](https://badge.fury.io/py/supabase.svg)](https://badge.fury.io/py/supabase)
5-
[![Documentation Status](https://readthedocs.org/projects/supabase/badge/?version=latest)](https://supabase.readthedocs.io/en/latest/?badge=latest)
3+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?label=license)](https://opensource.org/licenses/MIT)
4+
[![CI](https://github.com/supabase-community/supabase-py/actions/workflows/ci.yml/badge.svg)](https://github.com/supabase-community/supabase-py/actions/workflows/ci.yml)
5+
[![Python](https://img.shields.io/pypi/pyversions/supabase)](https://pypi.org/project/supabase)
6+
[![Version](https://img.shields.io/pypi/v/supabase?color=%2334D058)](https://pypi.org/project/supabase)
7+
[![Codecov](https://codecov.io/gh/supabase-community/supabase-py/branch/develop/graph/badge.svg)](https://codecov.io/gh/supabase-community/supabase-py)
8+
[![Last commit](https://img.shields.io/github/last-commit/supabase-community/supabase-py.svg?style=flat)](https://github.com/supabase-community/supabase-py/commits)
9+
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/supabase-community/supabase-py)](https://github.com/supabase-community/supabase-py/commits)
10+
[![Github Stars](https://img.shields.io/github/stars/supabase-community/supabase-py?style=flat&logo=github)](https://github.com/supabase-community/supabase-py/stargazers)
11+
[![Github Forks](https://img.shields.io/github/forks/supabase-community/supabase-py?style=flat&logo=github)](https://github.com/supabase-community/supabase-py/network/members)
12+
[![Github Watchers](https://img.shields.io/github/watchers/supabase-community/supabase-py?style=flat&logo=github)](https://github.com/supabase-community/supabase-py)
13+
[![GitHub contributors](https://img.shields.io/github/contributors/supabase-community/supabase-py)](https://github.com/supabase-community/supabase-py/graphs/contributors)
614

715
Supabase client for Python. This mirrors the design of [supabase-js](https://github.com/supabase/supabase-js/blob/master/README.md)
816

@@ -21,15 +29,15 @@ We are currently in Public Alpha. Watch "releases" of this repo to get notified
2129

2230
**Recomended:** First activate your virtual environment, with your favourites system. For example, we like `poetry` and `conda`!
2331

24-
#### PyPi installation
32+
### PyPi installation
2533

2634
Now install the package. (for > Python 3.7)
2735

2836
```bash
2937
pip install supabase
3038
```
3139

32-
#### Local installation
40+
### Local installation
3341

3442
You can also installing from after cloning this repo. Install like below to install in Development Mode, which means when you edit the source code the changes will be reflected in your python module.
3543

@@ -115,7 +123,7 @@ user = supabase.auth.sign_in(email=random_email, password=random_password)
115123

116124
## Managing Data
117125

118-
#### Insertion of Data
126+
### Insertion of Data
119127

120128
```python
121129
from supabase import create_client, Client
@@ -127,7 +135,7 @@ data = supabase.table("countries").insert({"name":"Germany"}).execute()
127135
assert len(data.get("data", [])) > 0
128136
```
129137

130-
#### Selection of Data
138+
### Selection of Data
131139

132140
```python
133141
from supabase import create_client, Client
@@ -140,7 +148,7 @@ data = supabase.table("countries").select("*").execute()
140148
assert len(data.get("data", [])) > 0
141149
```
142150

143-
#### Update of Data
151+
### Update of Data
144152

145153
```python
146154
from supabase import create_client, Client

0 commit comments

Comments
 (0)