8000 Migrate project management to UV by codesalatdev · Pull Request #6 · codesalatdev/python-picnic-api · GitHub
[go: up one dir, main page]

Skip to content

Migrate project management to UV #6

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

Merged
merged 5 commits into from
Mar 13, 2025
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
15 changes: 6 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,22 @@
"features": {
//"ghcr.io/devcontainers-extra/features/poetry:2": {}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": ["charliermarsh.ruff", "-ms-python.vscode-pylance"]
"extensions": [
"charliermarsh.ruff",
"-ms-python.vscode-pylance"
]
}
},

"postAttachCommand": "python -m pip install --upgrade pip && python -m pip install poetry==2.1.1 && python -m poetry install"

"postAttachCommand": "python -m pip install --upgrade pip && python -m pip install uv==0.6.6 && python -m uv sync"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
}
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
python-version: [3.11,3.12]
poetry-version: [2.1.1]
uv-version: [0.6.6]

runs-on: ubuntu-latest

Expand All @@ -24,27 +24,27 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry ${{ matrix.poetry-version }}
- name: Install uv ${{ matrix.uv-version }}
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install poetry==${{ matrix.poetry-version }}
python -m pip install uv==${{ matrix.uv-version }}

- name: Install dependencies
shell: bash
run: python -m poetry install
run: uv sync

- name: Test with pytest
env:
USERNAME: ${{ secrets.PICNIC_USERNAME }}
PASSWORD: ${{ secrets.PICNIC_PASSWORD }}
COUNTRY_CODE: ${{ secrets.PICNIC_COUNTRY_CODE }}
run: |
python -m poetry run pytest tests/ --cov --cov-report=xml
uv run pytest tests/ --cov --cov-report=xml

- name: Lint with ruff
run: |
python -m poetry run ruff check --output-format=github --ignore FIX
uv run ruff check --output-format=github --ignore FIX

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:
with:
python-version: 3.12

- name: Install poetry 2.1.1
- name: Install uv 0.6.6
run: |
python -m ensurepip
python -m pip install --upgrade pip
10000 python -m pip install poetry==2.1.1
python -m pip install uv==0.6.6

- name: Install dependencies
shell: bash
run: python -m poetry install
run: uv sync

- name: Test with pytest
env:
USERNAME: ${{ secrets.PICNIC_USERNAME }}
PASSWORD: ${{ secrets.PICNIC_PASSWORD }}
COUNTRY_CODE: ${{ secrets.PICNIC_COUNTRY_CODE }}
run: |
python -m poetry run python -m pytest -v integration_tests
uv run pytest -v integration_tests

8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
with:
python-version: 3.11

- name: Install poetry 2.1.1
- name: Install uv 0.6.6
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install poetry==2.1.1
python -m pip install uv==0.6.6

- name: Install dependencies
shell: bash
run: python -m poetry install
run: uv sync

- name: Build package
shell: bash
run: python -m poetry build
run: uv build

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
414 changes: 0 additions & 414 deletions poetry.lock

This file was deleted.

20 changes: 11 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "python-picnic-api2"
version = "1.2.2"
description = ""
readme = "README.rst"
license = "Apache-2.0"
license = {text = "Apache-2.0"}
maintainers = [
{ name = "CodeSalat", email = "pypi@codesalat.dev"}
]
Expand All @@ -18,12 +18,6 @@ dependencies = [
"typing_extensions>=4.12.2"
]

[tool.poetry.group.dev.dependencies]
pytest = "^8.3"
ruff = "^0.9.6"
python-dotenv = "^0.15.0"
pytest-cov = "6.0.0"

[tool.ruff]
line-length = 88
indent-width = 4
Expand All @@ -47,6 +41,14 @@ select = [
"FIX"
]

[dependency-groups]
dev = [
"pytest>=8.3.5",
"pytest-cov>=6.0.0",
"python-dotenv>=1.0.1",
"ruff>=0.9.10",
]

[build-system]
requires = ["poetry-core& A3DB quot;]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
324 changes: 324 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

0