Skip to content

Commit

Permalink
Merge pull request #74 from psadi/feature/uv
Browse files Browse the repository at this point in the history
feat: switch build system to uv
  • Loading branch information
psadi authored Dec 15, 2024
2 parents a94a83d + 971c717 commit 6dfd119
Show file tree
Hide file tree
Showing 8 changed files with 1,090 additions and 1,303 deletions.
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/support_notice.md

This file was deleted.

28 changes: 13 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,34 +74,32 @@ jobs:
restore-keys: |
${{ runner.os }}-tox-
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Prepare Environment, Sync Dependencies and Run Tox
run: |
mkdir -p ~/.config/bb
cp config.ini ~/.config/bb
pdm fix
pdm sync
pdm run tox
uv sync
uv tool install tox --with tox-uv
tox
- name: SonarCloud Scan
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: sonarsource/sonarcloud-github-action@master
uses: sonarsource/sonarcloud-github-action@v4.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: |
-Dsonar.projectKey=psadi_bbcli
args: >
-Dsonar.organization=psadi
-Dsonar.python.version=3
-Dsonar.sources=bb
-Dsonar.tests=tests
-Dsonar.projectKey=psadi_bbcli
-Dsonar.sources=bb/
-Dsonar.tests=tests/
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.exclusions=tests
-Dsonar.test.exclusions=tests/**
-Dsonar.verbose=false
- name: Initialize CodeQL
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'release' }}
Expand All @@ -121,7 +119,7 @@ jobs:

- name: Run build and generate artifacts
run: |
pdm build
uv build
- uses: actions/upload-artifact@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/update-deps.yaml

This file was deleted.

9 changes: 4 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ repos:
rev: v2.7.3
hooks:
- id: pip-audit
- repo: https://github.com/pdm-project/pdm
rev: 2.20.0.post1
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.9
hooks:
- id: pdm-export
args: ["-o", "requirements.txt", "--without-hashes"]
files: ^pdm.lock$
- id: uv-export
args: ["--no-hashes", "--no-header", "--output-file=requirements.txt"]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
Expand Down
1,191 changes: 0 additions & 1,191 deletions pdm.lock

This file was deleted.

36 changes: 15 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

[project]
name = "bb"
dynamic = ["version"]
version = "0.6.4"
description = "Work seamlessly with BitBucket from the command line."
authors = [{ name = "psadi", email = "ps.adithya@icloud.com" }]
dependencies = ["typer>=0.7.0", "httpx>=0.24.0"]
Expand All @@ -30,25 +30,9 @@ license = { text = "AGPL" }
[project.scripts]
bb = "bb:_bb"

[build-system]
requires = ["pdm-pep517>=1.0"]
build-backend = "pdm.pep517.api"

[tool.pdm]
version = { source = "file", path = "bb/__version__.py" }
plugins = ["pdm-autoexport"]

[tool.pdm.build]
includes = ["bb"]
excludes = ["tests"]

[[tool.pdm.autoexport]]
filename = "requirements.txt"
groups = ["default", "dev"]
without-hashes = true

[tool.pdm.scripts]
bb = { call = "bb:_bb" }
[tool.uv]
package = true
upgrade = true

[tool.ruff.format]
quote-style = "double"
Expand All @@ -64,4 +48,14 @@ ignore = ["E501"]
skips = ["B404", "B603", "B607"]

[dependency-groups]
dev = ["pytest>=7.2.1", "pytest-cov>=4.0.0", "tox-pdm>=0.6.1", "ruff>=0.0.257", "bandit>=1.7.5", "pyyaml>=6.0.1", "zipp>=3.19.1", "pre-commit>=3.5.0", "pip-audit>=2.7.3", "tox>=4.23.2"]
dev = [
"pytest>=7.2.1",
"pytest-cov>=4.0.0",
"tox-pdm>=0.6.1",
"ruff>=0.0.257",
"bandit>=1.7.5",
"pyyaml>=6.0.1",
"zipp>=3.19.1",
"pre-commit>=3.5.0",
"pip-audit>=2.7.3",
]
40 changes: 19 additions & 21 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
# This file is @generated by PDM.
# Please do not edit it manually.

anyio==4.6.2.post1
bandit==1.7.10
-e .
anyio==4.7.0
bandit==1.8.0
boolean-py==4.0
cachecontrol[filecache]==0.14.0
cachecontrol==0.14.1
cachetools==5.5.0
certifi==2024.8.30
certifi==2024.12.14
cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
coverage[toml]==7.6.4
coverage==7.6.9
cyclonedx-python-lib==7.6.2
defusedxml==0.7.1
distlib==0.3.9
exceptiongroup==1.2.2; python_version < "3.11"
exceptiongroup==1.2.2 ; python_full_version < '3.11'
filelock==3.16.1
h11==0.14.0
html5lib==1.1
httpcore==1.0.6
httpx==0.27.2
identify==2.6.1
httpcore==1.0.7
httpx==0.28.1
identify==2.6.3
idna==3.10
iniconfig==2.0.0
license-expression==30.4.0
Expand All @@ -31,7 +29,7 @@ mdurl==0.1.2
msgpack==1.1.0
nodeenv==1.9.1
packageurl-python==0.16.0
packaging==24.1
packaging==24.2
pbr==6.1.0
pip==24.3.1
pip-api==0.0.34
Expand All @@ -44,24 +42,24 @@ py-serializable==1.1.2
pygments==2.18.0
pyparsing==3.2.0
pyproject-api==1.8.0
pytest==8.3.3
pytest==8.3.4
pytest-cov==6.0.0
pyyaml==6.0.2
requests==2.32.3
rich==13.9.4
ruff==0.7.2
ruff==0.8.3
shellingham==1.5.4
six==1.16.0
six==1.17.0
sniffio==1.3.1
sortedcontainers==2.4.0
stevedore==5.3.0
stevedore==5.4.0
toml==0.10.2
tomli==2.0.2; python_version < "3.11"
tomli==2.2.1 ; python_full_version <= '3.11'
tox==4.23.2
tox-pdm==0.7.2
typer==0.12.5
typer==0.15.1
typing-extensions==4.12.2
urllib3==2.2.3
virtualenv==20.27.1
virtualenv==20.28.0
webencodings==0.5.1
zipp==3.20.2
zipp==3.21.0
Loading

0 comments on commit 6dfd119

Please sign in to comment.