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

build: update pyproject.toml #6

Merged
merged 1 commit into from
Dec 27, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/CI-Linux-x64-Clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Test
run: |
cp src/build/waifu2x_ncnn_vulkan_wrapper.*.so src/waifu2x_ncnn_py
pdm run dev
pdm install
pdm run test

- name: dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI-Linux-x64-GCC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Test
run: |
cp src/build/waifu2x_ncnn_vulkan_wrapper.*.so src/waifu2x_ncnn_py
pdm run dev
pdm install
pdm run test

- name: dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI-MacOS-Universal-Clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:

- name: Test
run: |
pdm run dev
pdm install
pdm run test

- name: dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI-Windows-x64-MSVC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: |
echo F | xcopy .\src\build\Release\waifu2x_ncnn_vulkan_wrapper.*.pyd .\src\waifu2x_ncnn_py
echo F | xcopy .\tests\vulkan-1.dll .\src\waifu2x_ncnn_py
pdm run dev
pdm install
pdm run test

- name: dist
Expand Down
17 changes: 8 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,20 @@ test = [
"scikit-image"
]

[tool.pdm.scripts.dev]
composite = [
"pdm install --dev",
"pre-commit install"
]
help = "Install the dev packages"

[tool.pdm.scripts.lint]
composite = [
"mypy src/waifu2x_ncnn_py tests",
"ruff check . --fix --exit-non-zero-on-fix",
"ruff format .",
"mypy src/waifu2x_ncnn_py tests"
"ruff format ."
]
help = "Check code style against linters"

[tool.pdm.scripts.post_install]
composite = [
"pre-commit install"
]
help = "Install the pre-commit hook"

[tool.pdm.scripts.test]
cmd = "pytest tests --cov=src --cov-report=xml --cov-report=html"
help = "Run tests with coverage"
Expand Down