https://github.com/Unidata/metpy
Raw File
Tip revision: 0ed75dc84c74d62be9b29321bb844289ed37eced authored by Drew Camron on 21 March 2024, 18:47:59 UTC
Merge pull request #3437 from dopplershift/fix-3416
Tip revision: 0ed75dc
pyproject.toml
[build-system]
requires = ["setuptools>=61", "wheel", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"

[project]
name = "MetPy"
description = "Collection of tools for reading, visualizing and performing calculations with weather data."
readme = "README.md"
dynamic = ["version"]
maintainers = [{name = "MetPy Developers", email = "support-python@unidata.ucar.edu"}]
license = {text = "BSD-3-Clause"}
keywords = ["meteorology", "weather"]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Framework :: Matplotlib",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Scientific/Engineering",
    "Topic :: Scientific/Engineering :: Atmospheric Science",
    "Intended Audience :: Science/Research",
    "Operating System :: OS Independent",
    "License :: OSI Approved :: BSD License"
]
requires-python = ">=3.9"
dependencies = [
    "matplotlib>=3.5.0",
    "numpy>=1.20.0",
    "pandas>=1.4.0",
    "pint>=0.17",
    "pooch>=1.2.0",
    "pyproj>=3.0.0",
    "scipy>=1.8.0",
    "traitlets>=5.0.5",
    "xarray>=0.21.0"
]

[project.entry-points."xarray.backends"]
gini = "metpy.io.gini:GiniXarrayBackend"

[project.optional-dependencies]
doc = [
    "metpy[examples]",
    "myst-parser",
    "netCDF4",
    "sphinx",
    "sphinx-gallery>=0.4",
    "sphinx-design",
    "pydata-sphinx-theme"
]
examples = [
    "geopandas>=0.6.0",
    "metpy[extras]"
]
test = [
    "netCDF4",
    "packaging>=21.0",
    "pytest>=6.2",
    "pytest-mpl"
]
extras = [
    "cartopy>=0.21.0",
    "dask>=2020.12.0",
    "shapely>=1.6.4"
]

[project.urls]
"homepage" = "https://github.com/Unidata/MetPy"
"Documentation" = "https://unidata.github.io/MetPy/"
"Release Notes" = "https://github.com/Unidata/MetPy/releases"
"Bug Tracker" = "https://github.com/Unidata/MetPy/issues"
"Source Code" = "https://github.com/Unidata/MetPy"
"Twitter" = "https://twitter.com/MetPy"
"MetPy Mondays" = "https://www.youtube.com/playlist?list=PLQut5OXpV-0ir4IdllSt1iEZKTwFBa7kO"

[tool.codespell]
skip = "*.tbl,*.ipynb,AUTHORS.txt,gempak.rst,.git,./staticdata,./docs/build,*.pdf,./talks"
exclude-file = ".codespellignore"

[tool.doc8]
ignore-path = ["docs/build", "docs/api/generated", "docs/_templates", "docs/tutorials",
    "docs/examples"]
file-encoding = "utf8"
max-line-length = 95

[tool.isort]
line_length = 95
known_first_party = ["metpy", "flake8_metpy"]
force_single_line = false
reverse_relative = true
use_parentheses = true
force_sort_within_sections = true
order_by_type = false
sort_relative_in_force_sorted_sections = true
combine_as_imports = true
combine_star = true

[tool.pytest.ini_options]
markers = "xfail_dask: marks tests as expected to fail with Dask arrays"
norecursedirs = "build docs .idea"
doctest_optionflags = "NORMALIZE_WHITESPACE"
mpl-results-path = "test_output"
xfail_strict = true
filterwarnings = [
    "error",
    "ignore:numpy.ndarray size changed:RuntimeWarning",
    # To be removed in the next python-dateutil release.
    # See: https://github.com/dateutil/dateutil/issues/1314
    'ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:dateutil.tz.tz:37',
    # Numpy deprecation triggered by Pint: https://github.com/hgrecco/pint/pull/1880
    "ignore:Conversion of an array with ndim > 0 to a scalar is deprecated:DeprecationWarning:pint.facets.plain.quantity:575",
    # PyProj automatically dispatching for single point, will be waiting for NumPy 2.0 to address
    # See: https://github.com/pyproj4/pyproj/issues/1309
    "ignore:Conversion of an array with ndim > 0 to a scalar is deprecated:DeprecationWarning:pyproj.geod:404",
    # Pandas >=2.2 warns about PyArrow being a future dependency
    'ignore:\nPyarrow will become a required dependency of pandas:DeprecationWarning',
]

[tool.ruff]
line-length = 95
exclude = ["docs", "build", "src/metpy/io/_metar_parser/metar_parser.py"]
select = ["A", "B", "C", "CPY001", "D", "E", "E226", "F", "G", "I", "N", "NPY", "Q", "R", "S", "SIM", "T", "U", "W"]
ignore = ["F405", "I001", "RET504", "RET505", "RET506", "RET507", "RUF100"]
preview = true
explicit-preview-rules = true

[tool.ruff.per-file-ignores]
"ci/filter_links.py" = ["E731", "T201", "S603", "S607"]
"docs/doc-server.py" = ["T201"]
"examples/*.py" = ["D", "T201", "B018"]
"src/metpy/_vendor/xarray.py" = ["UP032"]
"src/metpy/deprecation.py" = ["CPY001", "UP032"]
"src/metpy/testing.py" = ["S101"]
"src/metpy/io/nexrad.py" = ["S101"]
"tests/*/*.py" = ["S101"]
"tests/test_*.py" = ["S101"]
"tests/test_xarray.py" = ["S101", "B018"]
"tools/flake8-metpy/test*.py" = ["S101"]
"tools/nexrad_msgs/parse_spec.py" = ["B028", "S101"]
"tutorials/*.py" = ["D", "T201", "B018"]

[tool.ruff.lint.flake8-copyright]
# Needed to add a comma
notice-rgx = "(?i)Copyright\\s+(\\(C\\)\\s+)?\\d{4}([-,]\\d{4})*"
author = "MetPy Developers"

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

[tool.ruff.lint.isort]
known-first-party = ["metpy", "flake8_metpy"]
force-single-line = false
relative-imports-order = "closest-to-furthest"
force-sort-within-sections = true
order-by-type = false
combine-as-imports = true

[tool.ruff.lint.mccabe]
max-complexity = 61

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.setuptools_scm]
version_scheme = "post-release"
back to top