Skip to content

Commit

Permalink
Switch from poetry to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
rkhwaja committed Sep 5, 2024
1 parent d30c424 commit 1db3976
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 43 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
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: Linter
run: |
poe lint
uv run poe lint
- name: Tests
env:
GRAPH_API_CLIENT_ID: ${{ secrets.GRAPH_API_CLIENT_ID }}
Expand All @@ -69,7 +68,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
*.egg-info
.venv

Expand Down
70 changes: 34 additions & 36 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
[tool.poetry]
[project]
name = "fs.onedrivefs"
packages = [
{ include = "fs"}
]
version = "1.1.5"
description = "Pyfilesystem2 implementation for OneDrive using Microsoft Graph API"
authors = ["Rehan Khwaja <[email protected]>"]
license = "MIT"
homepage = "https://github.com/rkhwaja/fs.onedrivefs"
maintainers = [
{ name = "Rehan KHwaja", email = "[email protected]" }
]
keywords = ["filesystem", "Pyfilesystem2", "onedrive"]
readme = "README.md"
classifiers = [
Expand All @@ -20,36 +17,25 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]
requires-python = ">=3.8"
dependencies = [
"fs>=2.4.13,<3",
"requests>=2.20",
"requests-oauthlib>=1.2.0",
]

[tool.poetry.dependencies]
python = ">=3.8,<4"
# Need 2.0.5 for opendir factory parameter
# Need 2.0.6 because in 2.0.5, opener didn't work
# Need 2.4.13 for preserve_time flag
fs = ">=2.4.13,<3"
requests = ">=2.20"
requests-oauthlib = ">=1.2.0"
[project.urls]
Homepage = "https://github.com/rkhwaja/fs.onedrivefs"

[tool.poetry.dev-dependencies]
pyperclip = ">=1.7"
pytest = ">=3.10"
pytest-localserver = ">=0.5.0"
pyngrok = ">=7"
click = ">=7.0"
pytest-cov = ">=2.9.0"
pynacl = ">=1.5.0"
cffi = [
{ version = ">=1.15.0", markers = "sys_platform == 'darwin'" }
]
pytest-rerunfailures = ">=10"
poethepoet = ">=0.16.4"
pytest-xdist = ">=3.2.1"
ruff = ">=0.4.4"
[project.entry-points."fs.opener"]
onedrive = "fs.onedrivefs.opener:OneDriveFSOpener"

[tool.poetry.plugins] # Optional super table
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.poetry.plugins."fs.opener"]
"onedrive" = "fs.onedrivefs.opener:OneDriveFSOpener"
[tool.hatch.build.targets.wheel]
packages = ["fs"]

[tool.poe.tasks]
lint = "ruff check fs/onedrivefs/ tests/"
Expand All @@ -75,6 +61,18 @@ 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 = [
"pyperclip>=1.7",
"pytest>=3.10",
"pytest-localserver>=0.5.0",
"pyngrok>=7",
"click>=7.0",
"pytest-cov>=2.9.0",
"pynacl>=1.5.0",
"cffi>=1.15.0 ; sys_platform == 'darwin'",
"pytest-rerunfailures>=10",
"poethepoet>=0.16.4",
"pytest-xdist>=3.2.1",
"ruff>=0.4.4",
]

0 comments on commit 1db3976

Please sign in to comment.