Skip to content
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
14 changes: 9 additions & 5 deletions .github/workflows/pretest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,29 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: install
run: |
pip install -U pip wheel
pip install flake8 autopep8
pip install ruff autopep8 mypy

- name: flake8
- name: ruff
run: |
flake8
ruff check

- name: autopep8
run: |
autopep8 -r . --global-config .pep8 --diff | tee check_autopep8
test ! -s check_autopep8

- name: mypy
run: |
mypy
Empty file added builder/__init__.py
Empty file.
6 changes: 5 additions & 1 deletion builder/setup_cuda_opt_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from __future__ import annotations

import argparse
import os
import shutil
import sys
from pathlib import Path
Expand All @@ -17,7 +18,10 @@

def merge_directory(src_dir: Path, dst_dir: Path) -> None:
"""Merge two directory trees."""
for srcpath, _, files in Path.walk(src_dir):
# MEMO: Path.walk is only available from py3.12
for srcpath, files in (
(Path(srcpath), files) for srcpath, _, files in os.walk(src_dir)
):
dstpath = dst_dir / srcpath.relative_to(src_dir)
if not dstpath.exists():
print(f'Creating directory: {dstpath}')
Expand Down
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[tool.ruff]
line-length = 79
extend-exclude = [".pfnci"]

[tool.ruff.lint]
extend-select = ["I002", "Q"]

[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]

[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"

[tool.mypy]
files = ["builder/*.py", "verifier/*.py", "*.py"]
strict = true
ignore_missing_imports = true
2 changes: 2 additions & 0 deletions release-tests/common/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import unittest

import cupy
Expand Down
2 changes: 2 additions & 0 deletions release-tests/common/test_nvtx.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import unittest

import cupy.cuda.nvtx as libnvtx
Expand Down
2 changes: 2 additions & 0 deletions release-tests/cudnn/test_cudnn.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import unittest

import cupy
Expand Down
2 changes: 2 additions & 0 deletions release-tests/nccl/test_nccl.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import unittest

import cupy.cuda.nccl as libnccl
Expand Down
2 changes: 2 additions & 0 deletions release-tests/pkg_sdist/test_preload.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import unittest

import cupy
Expand Down
2 changes: 2 additions & 0 deletions release-tests/pkg_wheel/test_preload.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import sys
import unittest

Expand Down
2 changes: 2 additions & 0 deletions release-tests/sparse/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import unittest

import cupy
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distlib
typing-extensions
3 changes: 0 additions & 3 deletions setup.cfg

This file was deleted.