diff --git a/docs/developing.rst b/docs/developing.rst index 9120d2b0f..d8cbaba23 100644 --- a/docs/developing.rst +++ b/docs/developing.rst @@ -233,4 +233,4 @@ At this point, everything should be ready to run the tests on the Docker image. .. _embedded: https://sphinx-gallery.github.io/stable/syntax.html#embedding-rst .. _IPython Sphinx Directives: https://ipython.readthedocs.io/en/stable/sphinxext.html .. _isort: https://github.com/PyCQA/isort -.. _flake8: https://github.com/PyCQA/flake8 +.. _ruff: https://github.com/astral-sh/ruff diff --git a/imod-environment-dev.yml b/imod-environment-dev.yml index 91c9be98a..a5628e5d1 100644 --- a/imod-environment-dev.yml +++ b/imod-environment-dev.yml @@ -4,7 +4,7 @@ channels: dependencies: - black - - flake8 + - ruff - hypothesis - isort - mypy diff --git a/pyproject.toml b/pyproject.toml index 27248cb42..5198a2f99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,13 +2,136 @@ requires = ["setuptools>=42", "wheel"] build-backend = "setuptools.build_meta" +[project] +name = "imod" +version = "0.15.0" +requires-python = ">=3.10" +authors = [ + { name = "Deltares", email = "huite.bootsma@deltares.nl" }, +] +maintainers = [ + { name = "Deltares", email = "huite.bootsma@deltares.nl" } +] +description = "Make massive MODFLOW models!" +readme = "README.rst" +license = { file = "LICENSE" } +keywords = ["imod", "modflow", "groundwater modeling"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Hydrology", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", + "opic :: Scientific/Engineering" +] +dependencies = [ + "affine", + "cftime >=1", + "dask", + "fastcore", + "Jinja2", + "matplotlib", + "numba", + "numpy", + "pandas", + "pooch", + "scipy", + "tomli_w", + "toolz", + "tqdm", + "xarray >=0.15", + "xugrid >=0.3.0", +] + +[project.urls] +Homepage = "https://github.com/Deltares/imod-python" +Documentation = "https://deltares.github.io/imod-python/" +Repository = "https://github.com/Deltares/imod-python.git" +"Bug Tracker" = "https://github.com/Deltares/imod-python/issues" +Changelog = "https://github.com/Deltares/imod-python/blob/master/docs/api/changelog.rst" + +[project.optional-dependencies] +all = [ + "bottleneck", + "contextily >=1", + "cytoolz", + "geopandas", + "pyvista", + "rasterio >=1", + "rioxarray", + "shapely >=1.8", + "tomli >= 1.1.0 ; python_version < '3.11'", + "zarr", +] +dev = [ + "imod[all]", + "black", + "ruff", + "flopy", + "hypothesis", + "mypy", + "pydata-sphinx-theme", + "pytest", + "pytest-cov", + "pytest-benchmark", + "sphinx", + "sphinx-gallery", +] + [tool.isort] profile = "black" [tool.coverage.report] exclude_lines = [ - "pragma: no cover", + "pragma: no cover", +] + +[tool.ruff.lint] +select = ["C4", "E", "F", "I"] +ignore = [ + "C401", + "C402", + "C403", + "C404", + "C408", + "C416", + "C417", + "C419", + "D202", + "D205", + "D206", + "D400", + "D404", + "C405", + "E402", + "E501", + "E703", + "E713", + "E721", + "E731", + "E741", + "F811", + "PD002", + "PD901", + "PD003", + "PD004", ] +fixable = ["I"] +ignore-init-module-imports = true + +[tool.ruff.lint.pydocstyle] +convention = "numpy" + +[tool.ruff.lint.per-file-ignores] +"./docs/conf.py" = ["F401"] +"__init__.py" = ["F401"] +"conftest.py" = ["F401"] +"test_examples.py" = ["F401"] [tool.mypy] files = "imod/mf6/**.py" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index bf32d1190..000000000 --- a/setup.cfg +++ /dev/null @@ -1,96 +0,0 @@ -[metadata] -name = imod -version = 0.15.0 -author = Deltares -author_email = huite.bootsma@deltares.nl -description = Make massive MODFLOW models -url=https://github.com/Deltares/imod-python -project_urls = - Code=https://github.com/Deltares/imod-python - Issues=https://github.com/Deltares/imod-python/issues -long_description = file: README.rst -long_description_content_type = text/x-rst -license = MIT -classifiers = - Development Status :: 4 - Beta - Intended Audience :: Science/Research - Topic :: Scientific/Engineering :: Hydrology - License :: OSI Approved :: MIT License - Operating System :: OS Independent - Programming Language :: Python - 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 -keywords = - imod - modflow - groundwater modeling - -[options] -packages = find: -include_package_data = True -python_requires = >=3.10 -install_requires = - affine - cftime >=1 - dask - fastcore - Jinja2 - matplotlib - numba - numpy - pandas - pooch - scipy - tomli_w - toolz - tqdm - xarray >=0.15 - xugrid >=0.3.0 - -[options.extras_require] -all = - bottleneck - contextily >=1 - cytoolz - geopandas - pyvista - rasterio >=1 - rioxarray - shapely >=1.8 - tomli >= 1.1.0 ; python_version < "3.11" - zarr -dev = - %(all)s - black - flake8 - flopy - hypothesis - mypy - pydata-sphinx-theme - pytest - pytest-cov - pytest-benchmark - sphinx - sphinx-gallery - -[flake8] -ignore = - # whitespace before ':' - doesn't work well with black - E203, - # module level import not at top of file - E402, - # line too long - let black worry about that - E501, - # line break before binary operator - W503, - # duplicate function definitions, doesn't work with type dispatching. - F811, -per-file-ignores = - ./docs/conf.py:F401 - __init__.py:F401 - conftest.py:F401 - test_examples.py:F401 \ No newline at end of file