Skip to content

Commit bf577f6

Browse files
committed
Cleanups
1 parent e45944a commit bf577f6

File tree

4 files changed

+107
-117
lines changed

4 files changed

+107
-117
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,73 @@
1-
name: Python SDK CI
1+
name: Python SDK CI/CD
22

33
on:
44
push:
55
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
release:
9+
types: [published]
610

711
jobs:
8-
test:
12+
lint:
913
runs-on: ubuntu-latest
1014
strategy:
1115
matrix:
1216
python-version: ["3.8", "3.9", "3.10", "3.11"]
1317

1418
steps:
15-
- uses: actions/checkout@v4
16-
17-
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v4
19-
with:
20-
python-version: ${{ matrix.python-version }}
21-
22-
- name: Install Poetry
23-
uses: snok/install-poetry@v1
24-
with:
25-
version: 1.7.1
26-
virtualenvs-create: true
27-
virtualenvs-in-project: true
28-
29-
- name: Install dependencies
30-
run: |
31-
cd python-sdk
32-
poetry install
33-
34-
- name: Run linters
35-
run: |
36-
cd python-sdk
37-
poetry run black . --check
38-
poetry run isort . --check
39-
poetry run ruff check .
40-
poetry run mypy rushdb tests
41-
42-
- name: Run tests
43-
run: |
44-
cd python-sdk
45-
poetry run pytest tests/ --cov=rushdb --cov-report=xml
46-
47-
- name: Upload coverage to Codecov
48-
uses: codecov/codecov-action@v3
49-
with:
50-
file: ./python-sdk/coverage.xml
51-
flags: python-sdk
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install Poetry
27+
uses: snok/install-poetry@v1
28+
with:
29+
version: 1.7.1
30+
virtualenvs-create: true
31+
virtualenvs-in-project: true
32+
33+
- name: Install dependencies
34+
run: |
35+
poetry install --no-interaction --no-root
36+
37+
- name: Run linters
38+
run: |
39+
poetry run black . --check
40+
poetry run isort . --check
41+
poetry run ruff check .
42+
poetry run mypy src/rushdb
43+
44+
publish:
45+
if: startsWith(github.ref, 'refs/tags/v')
46+
runs-on: ubuntu-latest
47+
needs: lint
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- name: Set up Python
53+
uses: actions/setup-python@v4
54+
with:
55+
python-version: "3.11"
56+
57+
- name: Install Poetry
58+
uses: snok/install-poetry@v1
59+
with:
60+
version: 1.7.1
61+
virtualenvs-create: true
62+
virtualenvs-in-project: true
63+
64+
- name: Install dependencies
65+
run: |
66+
poetry install --no-interaction --no-root
67+
68+
- name: Build and publish
69+
env:
70+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
71+
run: |
72+
poetry build
73+
poetry publish

pyproject.toml

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,61 @@
11
[tool.poetry]
22
name = "rushdb"
33
version = "0.1.0"
4-
description = "Python SDK for RushDB - A modern graph database"
5-
authors = ["RushDB Team"]
6-
license = "MIT"
4+
description = "RushDB Python SDK"
5+
authors = ["RushDB Team <hi@rushdb.com>"]
6+
license = "Apache-2.0"
77
readme = "README.md"
8-
homepage = "https://github.com/onepx/rushdb"
9-
repository = "https://github.com/onepx/rushdb"
10-
documentation = "https://docs.rushdb.dev"
11-
keywords = ["database", "graph", "sdk", "rushdb"]
12-
packages = [
13-
{ include = "rushdb" }
8+
homepage = "https://github.com/rushdb/rushdb-python"
9+
repository = "https://github.com/rushdb/rushdb-python"
10+
documentation = "https://docs.rushdb.com"
11+
packages = [{ include = "rushdb", from = "src" }]
12+
keywords = [
13+
"database",
14+
"graph database",
15+
"instant database",
16+
"instant-database",
17+
"instantdatabase",
18+
"instant db",
19+
"instant-db",
20+
"instantdb",
21+
"neo4j",
22+
"cypher",
23+
"ai",
24+
"ai database",
25+
"etl",
26+
"data-pipeline",
27+
"data science",
28+
"data-science",
29+
"data management",
30+
"data-management",
31+
"machine learning",
32+
"machine-learning",
33+
"persistence",
34+
"db",
35+
"graph",
36+
"graphs",
37+
"graph-database",
38+
"self-hosted",
39+
"rush-db",
40+
"rush db",
41+
"rushdb"
1442
]
1543

1644
[tool.poetry.dependencies]
1745
python = "^3.8"
46+
python-dotenv = "^1.0.0"
1847
requests = "^2.31.0"
19-
typing-extensions = "^4.9.0"
2048

21-
[tool.poetry.group.dev.dependencies]
49+
[tool.poetry.dev-dependencies]
50+
black = "^23.7.0"
51+
isort = "^5.12.0"
52+
ruff = "^0.0.280"
53+
mypy = "^1.4.1"
2254
pytest = "^7.4.0"
2355
pytest-cov = "^4.1.0"
24-
black = "^23.12.1"
25-
isort = "^5.13.2"
26-
mypy = "^1.8.0"
27-
ruff = "^0.1.9"
56+
types-requests = "^2.31.0.1"
57+
types-python-dateutil = "^2.8.19.14"
2858

2959
[build-system]
30-
requires = ["poetry-core"]
60+
requires = ["poetry-core>=1.0.0"]
3161
build-backend = "poetry.core.masonry.api"
32-
33-
[tool.black]
34-
line-length = 88
35-
target-version = ["py38"]
36-
37-
[tool.isort]
38-
profile = "black"
39-
multi_line_output = 3
40-
41-
[tool.mypy]
42-
python_version = "3.8"
43-
warn_return_any = true
44-
warn_unused_configs = true
45-
disallow_untyped_defs = true
46-
check_untyped_defs = true
47-
48-
[tool.ruff]
49-
select = ["E", "F", "B", "I"]
50-
ignore = []
51-
line-length = 88
52-
target-version = "py38"

requirements.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)