Skip to content

Commit 5487dff

Browse files
authored
Merge pull request #9 from legendu-net/dev
Merge dev into main
2 parents 399240e + 1cf2ba9 commit 5487dff

File tree

10 files changed

+729
-1083
lines changed

10 files changed

+729
-1083
lines changed

.github/workflows/lint.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,15 @@ jobs:
2626
python-version: ${{ matrix.python-version }}
2727
- name: Install dependencies
2828
run: |
29-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
30-
icon pt -ic
31-
~/.local/bin/poetry env use python3
29+
curl -LsSf https://astral.sh/uv/install.sh | sh
3230
cat pyproject.toml
33-
~/.local/bin/poetry install
31+
~/.local/bin/uv sync
3432
- name: Lint with ruff
3533
run: |
36-
~/.local/bin/poetry run ruff check pysparker/ tests/
34+
~/.local/bin/uv run ruff check pysparker/ tests/
3735
- name: Lint with pytype
3836
run: |
39-
~/.local/bin/poetry run pytype ./
37+
~/.local/bin/uv run pytype ./
4038
- name: Check code format
4139
run: |
42-
~/.local/bin/poetry run ruff format --check .
40+
~/.local/bin/uv run ruff format --check .

.github/workflows/pre-release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ jobs:
1616
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.12"
19-
- name: Install Poetry
19+
- name: Install uv
2020
run: |
21-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
22-
icon pt -ic
21+
curl -LsSf https://astral.sh/uv/install.sh | sh
2322
- name: Build Package
2423
run: |
25-
~/.local/bin/poetry build
24+
~/.local/bin/uv build
2625
- uses: "marvinpinto/action-automatic-releases@latest"
2726
with:
2827
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.12"
19-
- name: Install Poetry
19+
- name: Install uv
2020
run: |
21-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
22-
icon pt -ic
21+
curl -LsSf https://astral.sh/uv/install.sh | sh
2322
- name: Build and Pubblish Package to PyPI
2423
run: |
25-
~/.local/bin/poetry publish --build -u __token__ -p ${{ secrets.PYPI_PYSPARKER }}
24+
~/.local/bin/uv build
2625
ls -lha dist/
26+
~/.local/bin/uv publish -u __token__ -p ${{ secrets.PYPI_PYSPARKER }}
2727
- uses: "marvinpinto/action-automatic-releases@latest"
2828
with:
2929
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test_macos.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ jobs:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install dependencies
2727
run: |
28-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
29-
icon docker -ic --user-to-docker ""
30-
icon pt -ic
31-
~/.local/bin/poetry env use python3
32-
~/.local/bin/poetry install
28+
curl -LsSf https://astral.sh/uv/install.sh | sh
29+
~/.local/bin/uv sync
3330
brew install libmagic
3431
brew link libmagic
3532
- name: Test with pytest
3633
run: |
37-
~/.local/bin/poetry run pytest
34+
~/.local/bin/uv run pytest

.github/workflows/test_ubuntu.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ jobs:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install dependencies
2626
run: |
27-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
28-
icon pt -ic
29-
~/.local/bin/poetry env use python3
30-
~/.local/bin/poetry install
27+
curl -LsSf https://astral.sh/uv/install.sh | sh
28+
~/.local/bin/uv sync
3129
- name: Test with pytest
3230
run: |
33-
~/.local/bin/poetry run pytest
31+
~/.local/bin/uv run pytest

.idx/dev.nix

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
ripgrep
88
rm-improved
99
bat
10-
poetry
10+
fzf
11+
uv
1112
];
1213
env = {
1314
PATH = [
@@ -25,10 +26,6 @@
2526
#onCreate = {
2627
#}
2728
onStart = {
28-
poetry-project = ''
29-
poetry config --local virtualenvs.in-project true
30-
poetry install
31-
'';
3229
icon = ''
3330
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | bash -s -- \
3431
-d ~/.local/bin

poetry.lock

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

poetry.toml

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

pyproject.toml

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,29 @@
1-
[tool.poetry]
1+
[project]
22
name = "pysparker"
33
version = "0.1.1"
44
description = "Some utility functions for PySpark."
5-
authors = ["Ben Du <longendu@yahoo.com>"]
6-
license = "MIT"
5+
authors = [{ name = "Ben Du", email = "longendu@yahoo.com" }]
6+
requires-python = ">=3.10,<3.13"
77
readme = "README.md"
8-
repository = "https://github.com/legendu-net/pysparker"
9-
keywords = ["PySpark", "utils", "big data"]
10-
11-
[tool.poetry.dependencies]
12-
python = ">=3.10,<3.13"
13-
loguru = ">=0.6.0"
14-
datacompy = ">=0.8.1"
15-
16-
[tool.poetry.group.dev.dependencies]
17-
ruff = ">=0.11.7"
18-
pytype = { version = ">=2020.08.10" }
19-
pyspark = ">=3.0.1"
20-
pytest = ">=7.1.2"
21-
22-
[tool.pylint.master]
23-
ignore = ".venv,.ipynb_checkpoints"
24-
unsafe-load-any-extension = "no"
25-
extension-pkg-whitelist = "numpy,cv2,pyspark"
26-
generated-members = "sqlite3.*,cv2.*,pyspark.*"
27-
ignored-modules = "pyspark.sql.functions"
8+
license = "MIT"
9+
keywords = [
10+
"PySpark",
11+
"utils",
12+
"big data",
13+
]
14+
dependencies = [
15+
"loguru>=0.6.0",
16+
"datacompy>=0.8.1",
17+
]
2818

29-
[tool.pylint.typecheck]
30-
ignored-classes = "Namespace"
19+
[project.urls]
20+
Repository = "https://github.com/legendu-net/pysparker"
3121

32-
[tool.pylint.messages_control]
33-
disable = "C0103,C0200,C0301,C0303,C0330,R0902,R0903,R0911,R0912,R0913,W0621,W0622,W0702,W0703,W1116"
22+
[dependency-groups]
23+
dev = [
24+
"ruff>=0.11.7",
25+
"pytype>=2020.08.10",
26+
"pyspark>=3.0.1",
27+
"pytest>=7.1.2",
28+
]
3429

35-
[build-system]
36-
requires = ["poetry>=1.0.0"]
37-
build-backend = "poetry.masonry.api"

0 commit comments

Comments
 (0)