Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf7d778d

Browse files
committed
Bump version & moved to uv
1 parent8944288 commitf7d778d

File tree

11 files changed

+138
-739
lines changed

11 files changed

+138
-739
lines changed

‎.env.example‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# RushDB Configuration
2-
RUSHDB_TOKEN=your_api_token_here
2+
RUSHDB_API_KEY=your_api_token_here
33
RUSHDB_URL=http://localhost:3000

‎.github/workflows/ci.yml‎

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Python SDK CI/CD
22

33
on:
44
push:
5-
branches:[main]
5+
branches:[main]
66
pull_request:
7-
branches:[main]
7+
branches:[main]
88
release:
99
types:[published]
1010

@@ -23,23 +23,21 @@ jobs:
2323
with:
2424
python-version:${{ matrix.python-version }}
2525

26-
-name:InstallPoetry
27-
uses:snok/install-poetry@v1
26+
-name:Installuv
27+
uses:astral-sh/setup-uv@v4
2828
with:
29-
version:1.7.1
30-
virtualenvs-create:true
31-
virtualenvs-in-project:true
29+
version:"latest"
3230

3331
-name:Install dependencies
3432
run:|
35-
poetry install --no-interaction --no-root
33+
uv sync --dev
3634
3735
-name:Run linters
3836
run:|
39-
poetry run black . --check
40-
poetry run isort . --check
41-
poetry run ruff check .
42-
poetry run mypy src/rushdb
37+
uv run black . --check
38+
uv run isort . --check
39+
uv run ruff check .
40+
uv run mypy src/rushdb
4341
4442
publish:
4543
if:startsWith(github.ref, 'refs/tags/v')
@@ -54,20 +52,18 @@ jobs:
5452
with:
5553
python-version:"3.11"
5654

57-
-name:InstallPoetry
58-
uses:snok/install-poetry@v1
55+
-name:Installuv
56+
uses:astral-sh/setup-uv@v4
5957
with:
60-
version:1.7.1
61-
virtualenvs-create:true
62-
virtualenvs-in-project:true
58+
version:"latest"
6359

6460
-name:Install dependencies
6561
run:|
66-
poetry install --no-interaction --no-root
62+
uv sync --dev
6763
6864
-name:Build and publish
6965
env:
70-
POETRY_PYPI_TOKEN_PYPI:${{ secrets.PYPI_TOKEN }}
66+
UV_PUBLISH_TOKEN:${{ secrets.PYPI_TOKEN }}
7167
run:|
72-
poetry build
73-
poetry publish
68+
uv build
69+
uv publish

‎.gitignore‎

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Dependencies
12
node_modules
23
dist
34
*.log
@@ -15,4 +16,58 @@ coverage
1516
.rollup.cache
1617
cjs
1718
esm
18-
packages/javascript-sdk/types
19+
packages/javascript-sdk/types
20+
21+
# Python
22+
__pycache__/
23+
*.py[cod]
24+
*$py.class
25+
*.so
26+
.Python
27+
build/
28+
develop-eggs/
29+
dist/
30+
downloads/
31+
eggs/
32+
.eggs/
33+
lib/
34+
lib64/
35+
parts/
36+
sdist/
37+
var/
38+
wheels/
39+
share/python-wheels/
40+
*.egg-info/
41+
.installed.cfg
42+
*.egg
43+
MANIFEST
44+
45+
# Virtual environments
46+
.env
47+
.venv
48+
env/
49+
venv/
50+
ENV/
51+
env.bak/
52+
venv.bak/
53+
54+
# Testing
55+
.coverage
56+
.pytest_cache/
57+
.tox/
58+
htmlcov/
59+
.nox/
60+
61+
# uv
62+
.uv/
63+
uv.lock
64+
65+
# IDE
66+
.vscode/
67+
.idea/
68+
*.swp
69+
*.swo
70+
71+
# OS
72+
.DS_Store
73+
Thumbs.db

‎CONTRIBUTING.md‎

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,39 @@ For urgent issues or further assistance, you can reach out directly:
4343
We appreciate your contributions and look forward to your feedback!
4444

4545
---
46-
##Poetry commands
46+
##Development Commands
4747

48-
```
49-
poetry run isort . --check
48+
```bash
49+
# Install dependencies
50+
uv sync --dev
5051
```
5152

53+
```bash
54+
# Check import sorting
55+
uv run isort. --check
5256
```
53-
poetry run mypy src/rushdb
57+
58+
```bash
59+
# Type checking
60+
uv run mypy src/rushdb
5461
```
5562

63+
```bash
64+
# Code formatting
65+
uv run black.
5666
```
57-
poetry run black .
67+
68+
```bash
69+
# Linting
70+
uv run ruff check.
5871
```
5972

73+
```bash
74+
# Run tests
75+
uv run pytest
6076
```
61-
poetry run ruff check .
77+
78+
```bash
79+
# Run tests with coverage
80+
uv run pytest --cov
6281
```

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pip install rushdb
2727
from rushdbimport RushDB
2828

2929
# Initialize the client
30-
db= RushDB("YOUR_API_TOKEN")
30+
db= RushDB("RUSHDB_API_KEY")
3131

3232
# Create a record
3333
user= db.records.create(

‎poetry.lock‎

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

‎pyproject.toml‎

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
[tool.poetry]
1+
[project]
22
name ="rushdb"
3-
version ="1.6.0"
3+
version ="1.8.0"
44
description ="RushDB Python SDK"
5-
authors = ["RushDB Team <hi@rushdb.com>"]
6-
license ="Apache-2.0"
5+
authors = [
6+
{name ="RushDB Team",email ="hi@rushdb.com"}
7+
]
8+
license = {text ="Apache-2.0"}
79
readme ="README.md"
8-
homepage ="https://github.com/rush-db/rushdb-python"
9-
repository ="https://github.com/rush-db/rushdb-python"
10-
documentation ="https://docs.rushdb.com"
11-
packages = [{include ="rushdb",from ="src" }]
10+
requires-python =">=3.8"
1211
keywords = [
1312
"database",
1413
"graph database",
@@ -40,30 +39,39 @@ keywords = [
4039
"rush db",
4140
"rushdb"
4241
]
42+
dependencies = [
43+
"python-dotenv>=1.0.0",
44+
"requests>=2.31.0"
45+
]
4346

44-
[tool.poetry.dependencies]
45-
python ="^3.8"
46-
python-dotenv ="^1.0.0"
47-
requests ="^2.31.0"
47+
[project.urls]
48+
Homepage ="https://github.com/rush-db/rushdb-python"
49+
Repository ="https://github.com/rush-db/rushdb-python"
50+
Documentation ="https://docs.rushdb.com"
4851

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"
54-
pytest ="^7.4.0"
55-
pytest-cov ="^4.1.0"
56-
types-requests ="^2.31.0.1"
57-
types-python-dateutil ="^2.8.19.14"
52+
[project.optional-dependencies]
53+
dev = [
54+
"black>=23.7.0",
55+
"isort>=5.12.0",
56+
"ruff>=0.0.280",
57+
"mypy>=1.4.1",
58+
"pytest>=7.4.0",
59+
"pytest-cov>=4.1.0",
60+
"types-requests>=2.31.0.1",
61+
"types-python-dateutil>=2.8.19.14"
62+
]
5863

5964
[build-system]
60-
requires = ["poetry-core>=1.0.0"]
61-
build-backend ="poetry.core.masonry.api"
65+
requires = ["hatchling"]
66+
build-backend ="hatchling.build"
67+
68+
[tool.hatch.build.targets.wheel]
69+
packages = ["src/rushdb"]
6270

6371
[tool.ruff]
6472
line-length =120
6573

6674
[tool.isort]
6775
profile ="black"
6876
multi_line_output =3
69-
line_length =120
77+
line_length =120

‎src/rushdb/api/records.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ def _extract_target_ids(
558558
List[Dict[str,Any]],
559559
"Record",
560560
List["Record"],
561-
]
561+
],
562562
)->List[str]:
563563
"""Extract record IDs from various input types and formats.
564564

‎src/rushdb/client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def _make_request(
178178

179179
# Prepare headers
180180
request_headers= {
181-
"token":self.api_key,
181+
"Authorization":f"Bearer{self.api_key}",
182182
"Content-Type":"application/json",
183183
**(headersor {}),
184184
}

‎src/rushdb/models/result.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def skip(self) -> int:
6666
@property
6767
deflimit(self)->Optional[int]:
6868
"""Get the limit that was applied to the search."""
69-
returnself._search_query.get("limit")orlen(self.data)
69+
returnself._search_query.get("limit")
7070

7171
def__len__(self)->int:
7272
"""Get the number of records in this result set."""
@@ -108,7 +108,7 @@ def get_page_info(self) -> dict:
108108
"loaded":len(self.data),
109109
"has_more":self.has_more,
110110
"skip":self.skip,
111-
"limit":self.limitorlen(self.data),
111+
"limit":self.limit,
112112
}
113113

114114

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp