diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f3d881..1e7d197 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,6 +36,7 @@ repos: - flake8-comprehensions - flake8-debugger - flake8-isort + - flake8-pyproject - flake8-string-format - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.3.0 diff --git a/pyproject.toml b/pyproject.toml index b0af197..e476125 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,79 @@ requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "miutil[cuda]>=0.4.0", "scikit-build>=0.11.0", "cmake>=3.18", "ninja"] +build-backend = "setuptools.build_meta" [tool.setuptools_scm] write_to = "cuvec/_dist_ver.py" write_to_template = "__version__ = '{version}'\n" + +[project.urls] +documentation = "https://amypad.github.io/CuVec" +repository = "https://github.com/AMYPAD/CuVec" +changelog = "https://github.com/AMYPAD/CuVec/releases" + +[project] +name = "cuvec" +dynamic = ["version"] +authors = [{name = "Casper da Costa-Luis", email = "casper.dcl@physics.org"}] +description = "Unifying Python/C++/CUDA memory: Python buffered array -> C++11 `std::vector` -> CUDA managed memory" +readme = "README.rst" +requires-python = ">=3.7" +keywords = ["Python", "C", "C++", "buffer", "vector", "array", "CUDA", "CPython", "SWIG", "extensions", "API"] +license = {text = "MPL-2.0"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Environment :: GPU", + "Environment :: GPU :: NVIDIA CUDA", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Programming Language :: C", + "Programming Language :: C++", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Utilities"] +dependencies = ['importlib_resources; python_version < "3.9"', "numpy"] + +[project.optional-dependencies] +dev = ["pytest>=6", "pytest-cov", "pytest-timeout", "pytest-xdist"] + +[tool.flake8] +max_line_length = 99 +extend_ignore = ["E261"] +exclude = [".git", "__pycache__", "build", "dist", ".eggs"] + +[tool.yapf] +spaces_before_comment = [15, 20] +arithmetic_precedence_indication = true +allow_split_before_dict_value = false +coalesce_brackets = true +column_limit = 99 +each_dict_entry_on_separate_line = false +space_between_ending_comma_and_closing_bracket = false +split_before_named_assigns = false +split_before_closing_bracket = false +blank_line_before_nested_class_or_def = false + +[tool.isort] +profile = "black" +line_length = 99 +known_first_party = ["cuvec", "tests"] + +[tool.pytest.ini_options] +minversion = "6.0" +timeout = 30 +log_level = "INFO" +python_files = ["tests/test_*.py"] +testpaths = ["tests"] +addopts = "-v --tb=short -rxs -W=error -n=2 --durations=0 --durations-min=1 --cov=cuvec --cov-report=term-missing --cov-report=xml" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 17d3e62..0000000 --- a/setup.cfg +++ /dev/null @@ -1,84 +0,0 @@ -[metadata] -name=cuvec -description=Unifying Python/C++/CUDA memory: Python buffered array -> C++11 `std::vector` -> CUDA managed memory -long_description=file: README.rst -long_description_content_type=text/x-rst -license=MPL-2.0 -license_files=LICENCE -url=https://github.com/AMYPAD/CuVec -project_urls= - Changelog=https://github.com/AMYPAD/CuVec/releases - Documentation=https://amypad.github.io/CuVec -author=Casper da Costa-Luis -author_email=casper.dcl@physics.org -keywords=Python, C, C++, buffer, vector, array, CUDA, CPython, SWIG, extensions, API -classifiers= - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Environment :: GPU - Environment :: GPU :: NVIDIA CUDA - Intended Audience :: Education - Intended Audience :: Science/Research - License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) - Operating System :: Microsoft :: Windows - Operating System :: POSIX :: Linux - Programming Language :: C - Programming Language :: C++ - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3 :: Only - Topic :: Software Development :: Libraries - Topic :: Software Development :: Libraries :: Python Modules - Topic :: Utilities -[options] -setup_requires= - setuptools>=42 - wheel - setuptools_scm[toml] - miutil[cuda]>=0.4.0 - scikit-build>=0.11.0 - cmake>=3.18 - ninja -install_requires= - importlib_resources; python_version < "3.9" - numpy -python_requires=>=3.7 -[options.extras_require] -dev= - pytest - pytest-cov - pytest-timeout - pytest-xdist - -[flake8] -max_line_length=99 -extend_ignore=E261 -exclude=.git,__pycache__,build,dist,.eggs - -[yapf] -spaces_before_comment=15, 20 -arithmetic_precedence_indication=true -allow_split_before_dict_value=false -coalesce_brackets=True -column_limit=99 -each_dict_entry_on_separate_line=False -space_between_ending_comma_and_closing_bracket=False -split_before_named_assigns=False -split_before_closing_bracket=False -blank_line_before_nested_class_or_def=False - -[isort] -profile=black -line_length=99 -known_first_party=cuvec,tests - -[tool:pytest] -timeout=30 -log_level=INFO -python_files=tests/test_*.py -testpaths=tests -addopts=-v --tb=short -rxs -W=error -n=2 --durations=0 --durations-min=1 --cov=cuvec --cov-report=term-missing --cov-report=xml