From a09b850e18b9d24ca4c15bb7f16b62a7859115a4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Jul 2022 19:15:10 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.cfg | 288 +++++++++++++++++++++++++++--------------------------- tox.ini | 136 +++++++++++++------------- 2 files changed, 212 insertions(+), 212 deletions(-) diff --git a/setup.cfg b/setup.cfg index a1ca88b..5e2268b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,79 +7,79 @@ license_file = LICENSE.md url = https://nei.plasmapy.org description = Package for non-equilibrium ionization modeling of plasma long_description = file: README.rst -classifiers= - Development Status :: 3 - Alpha - Intended Audience :: Science/Research - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: Implementation :: CPython - Topic :: Scientific/Engineering :: Physics - Topic :: Scientific/Engineering :: Astronomy +classifiers = + Development Status :: 3 - Alpha + Intended Audience :: Science/Research + License :: OSI Approved :: BSD License + Operating System :: OS Independent + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: Implementation :: CPython + Topic :: Scientific/Engineering :: Physics + Topic :: Scientific/Engineering :: Astronomy [options] zip_safe = False packages = find: python_requires = >=3.8 setup_requires = - setuptools_scm + setuptools_scm install_requires = - astropy >= 4.3.1 - h5py >= 3.0 - matplotlib >= 3.4 - numpy >= 1.20 - plasmapy >= 0.7 - scipy >= 1.5 - setuptools >= 50.0 + astropy >= 4.3.1 + h5py >= 3.0 + matplotlib >= 3.4 + numpy >= 1.20 + plasmapy >= 0.7 + scipy >= 1.5 + setuptools >= 50.0 [options.extras_require] extras = - # ought to mirror requirements/extras.txt - # for developers - pre-commit - setuptools_scm - tox + # ought to mirror requirements/extras.txt + # for developers + pre-commit + setuptools_scm + tox tests = - # ought to mirror requirements/tests.txt - %(extras)s - dlint - flake8 - flake8-absolute-import - flake8-rst-docstrings - flake8-use-fstring - hypothesis - pydocstyle - pygments - pytest >= 6.0.0 - pytest-regressions - pytest-xdist + # ought to mirror requirements/tests.txt + %(extras)s + dlint + flake8 + flake8-absolute-import + flake8-rst-docstrings + flake8-use-fstring + hypothesis + pydocstyle + pygments + pytest >= 6.0.0 + pytest-regressions + pytest-xdist docs = - # ought to mirror requirements/docs/txt - %(extras)s - docutils - ipykernel - nbsphinx - numpydoc - pillow - pygments >= 2.11.0 - sphinx >= 3.2.0 - sphinx-automodapi - sphinx-changelog - sphinxcontrib-bibtex - sphinx-copybutton - sphinx-gallery - sphinx-hoverxref >= 1.0.0 - sphinx_rtd_theme >= 1.0.0 - towncrier >= 19.2.0 + # ought to mirror requirements/docs/txt + %(extras)s + docutils + ipykernel + nbsphinx + numpydoc + pillow + pygments >= 2.11.0 + sphinx >= 3.2.0 + sphinx-automodapi + sphinx-changelog + sphinxcontrib-bibtex + sphinx-copybutton + sphinx-gallery + sphinx-hoverxref >= 1.0.0 + sphinx_rtd_theme >= 1.0.0 + towncrier >= 19.2.0 developer = - # install everything for developers - # ought to functionally mirror requirements.txt - %(docs)s - %(extras)s - %(tests)s + # install everything for developers + # ought to functionally mirror requirements.txt + %(docs)s + %(extras)s + %(tests)s [options.package_data] plasmapy_nei = data/* @@ -94,106 +94,106 @@ minversion = 6.0 testpaths = "plasmapy_nei" norecursedirs = "build" "docs/" doctest_optionflags = - NORMALIZE_WHITESPACE - ELLIPSIS - NUMBER + NORMALIZE_WHITESPACE + ELLIPSIS + NUMBER addopts = --doctest-modules --doctest-continue-on-failure filterwarnings = - ignore:.*Creating a LegacyVersion.*:DeprecationWarning + ignore:.*Creating a LegacyVersion.*:DeprecationWarning [flake8] convention = numpy extend-ignore = - D105, - D107, - # Ignoring D202 allows blank lines to be put on either side of code "paragraphs" at the beginning of a function. - D202, - # D205 and D400 are ignored to allow the "one-liner" to exceed one - # line, which is sometimes necessary for even concise descriptions of plasma - # physics functions and classes. - D205, - # D302 is unnecessary as we are using Python 3.6+. - D302, - # D205 and D400 are ignored to allow the "one-liner" to exceed one - # line, which is sometimes necessary for even concise descriptions of plasma - # physics functions and classes. - D400, - # D403: First word of the first line should be properly capitalized ('Latex', not 'LaTeX') # Dominik: good job, pydocstyle /s - D403, - # E203 something something whitespace? TODO check again - E203, - E501, - # E731 do not assign a lambda, use a def - Dominik: disagreed, lambdas have uses - E731, - F401, - F405, - # W605 invalid escape sequence, - W605, - RST210, - RST213, - # RST305 so that ReST substitutions in a different file can be used - RST305, - RST306 + D105, + D107, + # Ignoring D202 allows blank lines to be put on either side of code "paragraphs" at the beginning of a function. + D202, + # D205 and D400 are ignored to allow the "one-liner" to exceed one + # line, which is sometimes necessary for even concise descriptions of plasma + # physics functions and classes. + D205, + # D302 is unnecessary as we are using Python 3.6+. + D302, + # D205 and D400 are ignored to allow the "one-liner" to exceed one + # line, which is sometimes necessary for even concise descriptions of plasma + # physics functions and classes. + D400, + # D403: First word of the first line should be properly capitalized ('Latex', not 'LaTeX') # Dominik: good job, pydocstyle /s + D403, + # E203 something something whitespace? TODO check again + E203, + E501, + # E731 do not assign a lambda, use a def - Dominik: disagreed, lambdas have uses + E731, + F401, + F405, + # W605 invalid escape sequence, + W605, + RST210, + RST213, + # RST305 so that ReST substitutions in a different file can be used + RST305, + RST306 exclude = - extern, - sphinx, - *test*, - *parsetab.py, - conftest.py, - docs/conf.py, - setup.py, - .jupyter + extern, + sphinx, + *test*, + *parsetab.py, + conftest.py, + docs/conf.py, + setup.py, + .jupyter # Use rst-roles and rst-directives to list roles and directives from # Sphinx extensions so that they don't get flagged when using # flake8-rst-docstrings. rst-roles = - attr - cite - cite:ct - cite:cts - cite:p - cite:ps - cite:t - cite:ts - class - confval - data - event - exc - file - func - meth - mod - ref - rst:dir - term + attr + cite + cite:ct + cite:cts + cite:p + cite:ps + cite:t + cite:ts + class + confval + data + event + exc + file + func + meth + mod + ref + rst:dir + term rst-directives = - confval - deprecated - event - nbgallery - rst:directive - todo + confval + deprecated + event + nbgallery + rst:directive + todo enable-extensions = - # Look for strings that have {} in them but aren't f-strings. - # If there is a false positive from this in a file, put that in - # per-file-ignores. - FS003 + # Look for strings that have {} in them but aren't f-strings. + # If there is a false positive from this in a file, put that in + # per-file-ignores. + FS003 [coverage:run] omit = - ci-helpers/* - */tests/* - plasmapy_nei/version.py + ci-helpers/* + */tests/* + plasmapy_nei/version.py [coverage:report] exclude_lines = - coverage: ignore - ImportError - ModuleNotFoundError - @vectorize - @numba.vectorize - @numba.jit - @jit - @numba.njit - @njit + coverage: ignore + ImportError + ModuleNotFoundError + @vectorize + @numba.vectorize + @numba.jit + @jit + @numba.njit + @njit diff --git a/tox.ini b/tox.ini index 25147ad..8a2f7a3 100644 --- a/tox.ini +++ b/tox.ini @@ -2,39 +2,39 @@ envlist = clean,py38,build_docs isolated_build = True indexserver = - NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple + NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple [testenv] -whitelist_externals= - /bin/bash - /usr/bin/bash +whitelist_externals = + /bin/bash + /usr/bin/bash setenv = - MPLBACKEND = agg - COLUMNS = 180 - PYTEST_COMMAND = pytest --pyargs plasmapy_nei --durations=25 -n=auto --dist=loadfile + MPLBACKEND = agg + COLUMNS = 180 + PYTEST_COMMAND = pytest --pyargs plasmapy_nei --durations=25 -n=auto --dist=loadfile extras = tests deps = - astropydev: git+https://github.com/astropy/astropy - matplotlibdev: git+https://github.com/matplotlib/matplotlib - numpydev: :NIGHTLY:numpy - plasmapydev: git+https://github.com/PlasmaPy/PlasmaPy - xarraydev: git+https://github.com/pydata/xarray - cov: pytest-cov - !minimal: pytest-xdist - pytest-github-actions-annotate-failures + astropydev: git+https://github.com/astropy/astropy + matplotlibdev: git+https://github.com/matplotlib/matplotlib + numpydev: :NIGHTLY:numpy + plasmapydev: git+https://github.com/PlasmaPy/PlasmaPy + xarraydev: git+https://github.com/pydata/xarray + cov: pytest-cov + !minimal: pytest-xdist + pytest-github-actions-annotate-failures commands = - !cov: {env:PYTEST_COMMAND} {posargs} -m 'not slow' - all: {env:PYTEST_COMMAND} {posargs} - cov-all: {env:PYTEST_COMMAND} {posargs} --cov=plasmapy_nei --cov-report=xml --cov-config={toxinidir}{/}setup.cfg --cov-append --cov-report xml:coverage.xml + !cov: {env:PYTEST_COMMAND} {posargs} -m 'not slow' + all: {env:PYTEST_COMMAND} {posargs} + cov-all: {env:PYTEST_COMMAND} {posargs} --cov=plasmapy_nei --cov-report=xml --cov-config={toxinidir}{/}setup.cfg --cov-append --cov-report xml:coverage.xml description = - run tests - astropydev: with the development version of astropy - matplotlibdev: with the development version of matplotlib - numpydev: with the development version of numpy - plasmapydev: with the development version of plasmapy - xarraydev: with the development version of xarray - minimal: with minimal versions of dependencies - cov: with code coverage + run tests + astropydev: with the development version of astropy + matplotlibdev: with the development version of matplotlib + numpydev: with the development version of numpy + plasmapydev: with the development version of plasmapy + xarraydev: with the development version of xarray + minimal: with minimal versions of dependencies + cov: with code coverage [testenv:clean] deps = coverage @@ -45,21 +45,21 @@ commands = coverage erase changedir = {toxinidir} extras = docs setenv = - HOME = {envtmpdir} + HOME = {envtmpdir} commands = sphinx-build docs docs{/}_build{/}html -W --keep-going -b html {posargs} [testenv:build_docs_no_examples] changedir = {toxinidir} extras = docs setenv = - HOME = {envtmpdir} + HOME = {envtmpdir} commands = sphinx-build -D nbsphinx_execute='never' docs docs{/}_build{/}html -b html {posargs} [testenv:build_docs_nitpicky] changedir = {toxinidir} extras = docs setenv = - HOME = {envtmpdir} + HOME = {envtmpdir} commands = sphinx-build docs docs{/}_build{/}html -W -n --keep-going -b html {posargs} # This env requires tox-conda. @@ -67,57 +67,57 @@ commands = sphinx-build docs docs{/}_build{/}html -W -n --keep-going -b html {po basepython = python3.8 extras = deps = - lmfit - pytest-cov - pytest-xdist + lmfit + pytest-cov + pytest-xdist conda_deps = - astropy >= 4.3.1 - h5py >= 3.0.0 - matplotlib - mpmath - numpy >= 1.19.0 - numpydoc - pillow - pytest >= 5.4.0 - scipy >= 1.5.0 - sphinx - sphinx_rtd_theme + astropy >= 4.3.1 + h5py >= 3.0.0 + matplotlib + mpmath + numpy >= 1.19.0 + numpydoc + pillow + pytest >= 5.4.0 + scipy >= 1.5.0 + sphinx + sphinx_rtd_theme # This env tests minimal versions of each dependency. [testenv:py38-all-minimal] basepython = python3.8 extras = deps = - astropy==4.3.1 - h5py==3.0.0 - hypothesis - lmfit==1.0.0 - matplotlib==3.3.0 - mpmath==1.2.1 - numba - numpy==1.19.0 - pillow - pytest==6.0.0 - pytest-cov - pytest-regressions - scipy==1.5.0 - tqdm==4.41.0 - xarray==0.15.0 + astropy==4.3.1 + h5py==3.0.0 + hypothesis + lmfit==1.0.0 + matplotlib==3.3.0 + mpmath==1.2.1 + numba + numpy==1.19.0 + pillow + pytest==6.0.0 + pytest-cov + pytest-regressions + scipy==1.5.0 + tqdm==4.41.0 + xarray==0.15.0 setenv = - PYTEST_COMMAND = pytest --pyargs plasmapy_nei --durations=25 + PYTEST_COMMAND = pytest --pyargs plasmapy_nei --durations=25 [testenv:linters] deps = - dlint - flake8 - flake8-absolute-import - flake8-rst-docstrings - flake8-use-fstring - pydocstyle - pygments + dlint + flake8 + flake8-absolute-import + flake8-rst-docstrings + flake8-use-fstring + pydocstyle + pygments commands = - flake8 --bug-report - flake8 {toxinidir}{/}plasmapy_nei --count --show-source --statistics + flake8 --bug-report + flake8 {toxinidir}{/}plasmapy_nei --count --show-source --statistics [testenv:py38-minimal-pypi-import] basepython = python3.8