Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from poetry to uv #90

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: ci
on:
push:
branches:
- master
- main
pull_request:
branches:
- '*'
Expand Down Expand Up @@ -48,15 +48,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v3
- name: Install uv
uses: yezz123/setup-uv@v4
- name: Dependencies
run: |
poetry config virtualenvs.create false
poetry install
uv sync --no-cache
- name: Lint
run: |
poe lint
uv run poe lint
- name: Tests
env:
GOOGLEDRIVEFS_TEST_CLIENT_ID: ${{ secrets.GOOGLEDRIVEFS_TEST_CLIENT_ID }}
Expand All @@ -66,7 +65,7 @@ jobs:
if: ${{needs.secrets.outputs.valid}} == 'true'
run: |
if python --version | grep -q 'Python 3.12' ; then
poe test
uv run poe test
fi
- name: Coverage
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ __pycache__/

# Distribution / packaging
dist/
poetry.lock
uv.lock
.venv
*.egg-info
pip-wheel-metadata
Expand Down
69 changes: 36 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
[tool.poetry]
[project]
name = "fs.googledrivefs"
packages = [
{ include = "fs"}
]
version = "2.4.3"
description = "Pyfilesystem2 implementation for Google Drive"
authors = ["Rehan Khwaja <[email protected]>"]
license = "MIT"
homepage = "https://github.com/rkhwaja/fs.googledrivefs"
maintainers = [
{ name = "Rehan Khwaja", email = "[email protected]" }
]
keywords = ["filesystem", "Pyfilesystem2", "google"]
readme = "README.md"
classifiers = [
Expand All @@ -18,27 +15,27 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.8"
dependencies = [
"fs>=2.4.13",
"google-api-python-client>=1.7.10",
"google-auth>=1.5.1",
]

[tool.poetry.dependencies]
python = ">=3.8"
fs = ">=2.4.13"
google-api-python-client = ">=1.7.10"
google-auth = ">=1.5.1"
[project.urls]
Homepage = "https://github.com/rkhwaja/fs.googledrivefs"

[project.entry-points."fs.opener"]
"googledrive" = "fs.googledrivefs.opener:GoogleDriveFSOpener"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.poetry.dev-dependencies]
pytest = ">=7.2.0"
pytest-timeout = ">=1.3.3"
requests-oauthlib = ">=1.0"
pyperclip = ">=1.7"
pytest-cov = ">=2.10.1"
poethepoet = ">=0.16.4"
pyngrok = ">=7"
pytest-localserver = ">=0.5.0"
pytest-xdist = ">=3.2.1"
ruff = ">=0.5.5"
pytest-rerunfailures = ">=14.0"
[tool.hatch.build.targets.wheel]
packages = ["fs"]

[tool.poe.tasks]
lint = "ruff check fs/googledrivefs/ tests/"
Expand All @@ -49,11 +46,6 @@ pytest -n 4 --reruns 2 --only-rerun TimeoutError --cov=fs/googledrivefs --timeou
coverage xml
"""

[tool.poetry.plugins] # Optional super table

[tool.poetry.plugins."fs.opener"]
"googledrive" = "fs.googledrivefs.opener:GoogleDriveFSOpener"

[tool.ruff]
line-length = 200
lint.ignore = ["ANN", "D", "DTZ", "EM102", "ERA001", "FBT002", "FIX", "G004", "I", "N", "PT009", "PT027", "PT013", "PTH", "S101", "TCH003", "TD", "TRY003", "W191"]
Expand All @@ -68,6 +60,17 @@ target-version = "py38"
inline-quotes = "single"
multiline-quotes = "single"

[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.uv]
dev-dependencies = [
"poethepoet>=0.16.4",
"pyngrok>=7",
"pyperclip>=1.7",
"pytest-cov>=2.10.1",
"pytest-localserver>=0.5.0",
"pytest-rerunfailures>=14.0",
"pytest-timeout>=1.3.3",
"pytest-xdist>=3.2.1",
"pytest>=7.2.0",
"requests-oauthlib>=1.0",
"ruff>=0.5.5",
]
Loading