[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.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Atmospheric Science", "Intended Audience :: Science/Research", "Operating System :: OS Independent", "License :: OSI Approved :: BSD License" ] requires-python = ">=3.10" dependencies = [ "matplotlib>=3.5.0", "numpy>=1.23.0", "pandas>=1.4.0", "pint>=0.17", "pooch>=1.2.0", "pyproj>=3.3.0", "scipy>=1.8.0", "traitlets>=5.1.0", "xarray>=2022.6.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>=7.0", "pytest-mpl", "vcrpy>=4.3.1" ] extras = [ "cartopy>=0.21.0", "dask>=2020.12.0", "shapely>=1.6.4", "boto3>=1.26.45" ] [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" "Bluesky" = "https://bsky.app/profile/metpy.bsky.social" "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,./tests/remote/fixtures" exclude-file = ".codespellexclude" ignore-words = ".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", # Pandas >=2.2 warns about PyArrow being a future dependency 'ignore:\nPyarrow will become a required dependency of pandas:DeprecationWarning', # Not yet fixed in xarray "ignore:__array__ implementation doesn't accept a copy keyword:DeprecationWarning" ] [tool.ruff] line-length = 95 exclude = ["docs", "build", "src/metpy/io/_metar_parser/metar_parser.py", "talks"] preview = true [tool.ruff.lint] select = ["A", "B", "C", "CPY001", "D", "E", "E226", "F", "G", "I", "N", "NPY", "PIE", "Q", "R", "S", "SIM", "T", "U", "W"] # NPY201 ignores the use of 'trapz' false alarm ignore = ["F405", "I001", "NPY201", "RET504", "RET505", "RET506", "RET507", "RUF100"] explicit-preview-rules = true [tool.ruff.lint.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 avoid need for spaces after 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"