https://github.com/zerothi/sisl
Raw File
Tip revision: fb4943347206777b4d0254cc984d28a7a5190897 authored by Nick Papior on 04 October 2023, 07:45:48 UTC
added changelog to docs
Tip revision: fb49433
pyproject.toml
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

# Regarding pyproject.toml see
# - PEP 517 project metadata https://www.python.org/dev/peps/pep-0517
# - PEP 518 project metadata https://www.python.org/dev/peps/pep-0518
# - PEP 621 project metadata https://www.python.org/dev/peps/pep-0621

# First we define the build-system which we will probably alter the most
[build-system]
requires = [
    "setuptools_scm[toml]>=6.2",
    "scikit-build-core[pyproject]",
    "Cython>=0.29.28",
    # see https://github.com/scipy/oldest-supported-numpy/
    # should fix #310
    "oldest-supported-numpy; sys_platform != 'win32'",
    # TODO work-arounds for windows installations where -mno-cygwin is passed
    "numpy==1.19.5 ; sys_platform == 'win32' and python_version <= '3.9'",
    "numpy==1.21.5 ; sys_platform == 'win32' and python_version >= '3.10'",
]
build-backend = "scikit_build_core.build"

# Top most items are probably changed the most
[project]
requires-python = ">=3.8"

name = "sisl"
description = "Manipulation and post-processing of DFT output and creating tight-binding models for NEGF transport"
readme = "README.md"
license = {text = "MPL-2.0"}
keywords = [
    "tight-binding",
    "DFT",
    "LCAO",
    "NEGF",
    "physics"
]

dependencies = [
    # TODO work-arounds for windows installations
    "numpy>=1.19.5 ; sys_platform == 'win32' and python_version <= '3.9'",
    "numpy>=1.21.5 ; sys_platform == 'win32' and python_version >= '3.10'",
    "numpy>=1.13 ; sys_platform != 'win32'",
    "scipy>=1.5.0",
    "pyparsing>=1.5.7",
    "xarray>=0.10.0",
]

authors = [
    {name = "Nick Papior", email = "nickpapior@gmail.com"}
]
maintainers = [{name="sisl developers"}]

classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Environment :: Console",
    "Intended Audience :: Science/Research",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
    "Programming Language :: C",
    "Programming Language :: Fortran",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: Implementation :: CPython",
    "Topic :: Software Development",
    "Topic :: Scientific/Engineering",
    "Topic :: Scientific/Engineering :: Physics",
    "Operating System :: OS Independent",
]

# We purposefully get the version dynamically
dynamic = ["version"]


[tool.setuptools_scm]
write_to = "src/sisl/_version.py"
fallback_version = "0.14.2"


[tool.scikit-build]

wheel.packages = ["src/sisl", "src/sisl_toolbox"]

# required for dynamic metadata
experimental = true

metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"

# define a consistent build directory
build-dir = "build/{wheel_tag}"

# cmake and ninja stuff
cmake.verbose = true
cmake.minimum-version = "3.20"

# source configuration
sdist.reproducible = true
sdist.include = ["src/sisl/_version.py", "*/CMakeLists.txt"]

wheel.expand-macos-universal-tags = true


[project.scripts]
sgeom = "sisl.geometry:sgeom"
sgrid = "sisl.grid:sgrid"
sdata = "sisl.utils._sisl_cmd:sisl_cmd"
stoolbox = "sisl_toolbox.cli:stoolbox_cli"


[project.urls]
Homepage = "https://zerothi.github.io/sisl"
Releases = "https://github.com/zerothi/sisl/releases"
Documentation = "https://zerothi.github.io/sisl"
Source = "https://github.com/zerothi/sisl"
Tracker = "https://github.com/zerothi/sisl/issues"
Discussions = "https://github.com/zerothi/sisl/discussions"
Changelog = "https://zerothi.github.io/sisl/changelog/index.html"
Chat = "https://discord.gg/5XnFXFdkv2"


[project.optional-dependencies]

analysis = [
    "netCDF4",
    "tqdm"
]

viz = [
    "dill >= 0.3.2",
    "pathos",
    "netCDF4",
    "scikit-image",

    "plotly",
    "matplotlib",
    "ase",
]

viz-plotly = [
    "dill >= 0.3.2",
    "pathos",
    "netCDF4",
    "scikit-image",

    "plotly",
]

viz-matplotlib = [
    "dill >= 0.3.2",
    "pathos",
    "netCDF4",
    "scikit-image",

    "matplotlib",
]

viz-blender = [
    "dill >= 0.3.2",
    "pathos",
    "netCDF4",
    "scikit-image",
]

viz-ase = [
    "dill >= 0.3.2",
    "pathos",
    "netCDF4",
    "scikit-image",

    "ase",
]

test = [
    "pytest",
    "pytest-cov",
    "pytest-env",
    "pytest-faulthandler",
    "coveralls",
    "tqdm",
    "dill >= 0.3.2",
    "pathos",
    "netCDF4",
    "scikit-image",
    "matplotlib",
    "plotly",
    "ase"
]


[tool.pytest.ini_options]
testpaths = [
    "src"
]
markers = [
    "slow: mark a test as slow",
]

addopts = "-rXs --durations=20 --cov"

[tool.coverage.run]
source = ["src"]


[tool.pylint]
[tool.pylint.master]
jobs = 6
ignore-paths = [
   ".*/tests/.*.py"
]

ignore-patterns = [
   "conftest.py",
   # This is autogenerated, but may be present
   "_version.py"
]

# Do not create false-positives for Cython extensions
extension-pkg-allow-list = [
   "sisl._math_small",
   "sisl._indices",
   "sisl._lattice",
   "sisl.io.siesta._siesta",
   "sisl.physics._bloch",
   "sisl.physics._matrix_k",
   "sisl.physics._matrix_dk",
   "sisl.physics._matrix_ddk",

   # external packages required
   "numpy",
   "scipy"
]


[tool.pylint.format]
# Currently no formatting rules

[tool.pylint.messages_control]
max-line-length = 110

disable = [
    "invalid-name",
    "missing-module-docstring",
    "redefined-builtin"
]



[tool.tox]

legacy_tox_ini = """
[tox]
minversion = 3.3.0
envlist = py38,py39,py310,py311
isolated_build = True

[testenv]
setenv =
    SISL_NUM_PROCS=1
    SISL_VIZ_NUM_PROCS=1
deps = -rdocs/requirements.txt
commands = pytest -s -rXs {posargs}
"""


[tool.isort]
# how should sorting be done
profile = "hug"
sections = ['FUTURE', 'STDLIB', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER']
known_first_party = ["sisl_toolbox", "sisl"]
line_length = 90
overwrite_in_place = true
extend_skip = ["src/sisl/__init__.py"]



# Options for cibuildwheel
[tool.cibuildwheel]
build-verbosity = 3
test-extras = "test"

skip = [
    "pp*",
    "*musllinux*",
]

# The netCDF package does not have a wheel for 312 (yet!)
test-skip = "cp312-* *-macosx_arm64 *-macosx_universal2:arm64 *"

# Instead of running pytest directly, we use a bash script that will set up
# the appropiate value for the SISL_FILES_TEST variable, a path pointing to
# the sisl-files directory, which contains files for testing.
test-command = "bash {project}/tools/build_tools/test_wheel.sh {project}"

[tool.cibuildwheel.linux]
archs = [
    "x86_64",
#    "aarch64",
]

[tool.cibuildwheel.windows]
archs = [
    "AMD64",
    "x86",
]

test-command = "pytest --pyargs sisl -m 'not slow'"

[tool.cibuildwheel.macos]
archs = [
#    "universal2",
    "x86_64",
]
back to top