diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..fdfc7cc5 --- /dev/null +++ b/.flake8 @@ -0,0 +1,29 @@ +[flake8] +exclude = + .git + __pycache__ + build + dist + examples + autotest +ignore = + # https://flake8.pycqa.org/en/latest/user/error-codes.html + F401, + # https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes + # Indentation + E121, E122, E126, E127, E128, + # Whitespace + E203, E221, E222, E226, E231, E241, + # Import + E402, + # Line length + E501, E502, + # Statement + E722, E741, + # Whitespace warning + W291, W292, W293, + # Blank line warning + W391, + # Line break warning + W503, W504 +statistics = True \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcbac55d..384cf20d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: with: python-version: 3.8 cache: 'pip' - cache-dependency-path: setup.cfg + cache-dependency-path: pyproject.toml - name: Install Python packages run: | @@ -132,7 +132,7 @@ jobs: python-version: ${{ matrix.python }} cache: 'pip' cache-dependency-path: | - modflow-devtools/setup.cfg + modflow-devtools/pyproject.toml modflow6-examples/etc/requirements*.txt - name: Install Python packages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 65e1a312..1ef838ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: with: python-version: 3.8 cache: 'pip' - cache-dependency-path: setup.cfg + cache-dependency-path: pyproject.toml - name: Install Python dependencies run: | @@ -214,7 +214,7 @@ jobs: with: python-version: 3.8 cache: 'pip' - cache-dependency-path: setup.cfg + cache-dependency-path: pyproject.toml - name: Install Python dependencies run: | diff --git a/MANIFEST.in b/MANIFEST.in index bdeb1120..6851bc09 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ global-exclude .DS_Store *.pyc *.pyo *.pyd *.swp *.bak *~ .* *.sh *.yml *.md *.toml exclude autotest/* include pyproject.toml -include version.txt \ No newline at end of file +include version.txt +include README.md \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a9a9ec68..46d8cfdb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,80 @@ [build-system] # Minimum requirements for the build system to execute requires = [ - "setuptools>=45", - "wheel", + "setuptools>=61", ] build-backend = "setuptools.build_meta" +[project] +name = "modflow-devtools" +description = "Python tools for MODFLOW development" +authors = [ + {name = "Joseph D. Hughes", email = "modflow@usgs.gov"}, +] +maintainers = [ + {name = "Joseph D. Hughes", email = "modflow@usgs.gov"}, +] +keywords = [ + "MODFLOW", + "development", + "utilities", + "groundwater", + "hydrogeology" +] +readme = "README.md" +license = {text = "CC0"} +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Hydrology" +] +requires-python = ">=3.8" +dependencies = [ + "numpy", + "pytest" +] +dynamic = ["version"] + +[project.optional-dependencies] +lint = [ + "black", + "cffconvert", + "flake8", + "isort", + "pylint" +] +test = [ + "modflow-devtools[lint]", + "coverage", + "flaky", + "filelock", + "meson!=0.63.0", + "ninja", + "pytest-cases", + "pytest-cov", + "pytest-dotenv", + "pytest-xdist", + "PyYaml" +] +docs = [ + "sphinx", + "sphinx-rtd-theme", + "myst-parser" +] + +[project.urls] +"Documentation" = "https://modflow-devtools.readthedocs.io/en/latest/" +"Bug Tracker" = "https://github.com/MODFLOW-USGS/modflow-devtools/issues" +"Source Code" = "https://github.com/MODFLOW-USGS/modflow-devtools" + + [tool.black] line-length = 79 target_version = ["py37"] @@ -19,6 +88,13 @@ profile = "black" src_paths = ["src/modflow_devtools"] line_length = 79 +[tool.setuptools] +include-package-data = true +zip-safe = false + +[tool.setuptools.dynamic] +version = {file = "version.txt"} + [tool.setuptools_scm] fallback_version = "999" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 172edebc..00000000 --- a/setup.cfg +++ /dev/null @@ -1,99 +0,0 @@ -[metadata] -name = modflow-devtools -version = file: version.txt -description = modflow-devtools is a Python package containing tools for MODFLOW development. -long_description = file: README.md -long_description_content_type = text/markdown -author = Joseph D. Hughes -author_email = modflow@usgs.gov -maintainer = Joseph D. Hughes -maintainer_email = jdhughes@usgs.gov -license = CC0 -license_files = LICENSE.md -platform = Windows, Mac OS-X, Linux -keywords = MODFLOW, development -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Science/Research - License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication - Operating System :: Microsoft :: Windows - Operating System :: POSIX - Operating System :: Unix - Operating System :: MacOS - 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 :: 3.11 - Programming Language :: Python :: 3 :: Only - Topic :: Scientific/Engineering :: Hydrology -url = https://github.com/MODFLOW-USGS/modflow-devtools -download_url = https://pypi.org/project/modflow-devtools -project_urls = - Documentation = https://mfpymake.readthedocs.io - Bug Tracker = https://github.com/MODFLOW-USGS/modflow-devtools/issues - Source Code = https://github.com/MODFLOW-USGS/modflow-devtools - -[options] -include_package_data = True -zip_safe = False -packages = find: -python_requires = >=3.8 -install_requires = - numpy - pytest - -[options.extras_require] -lint = - black - cffconvert - flake8 - isort - pylint -test = - %(lint)s - coverage - flaky - filelock - meson!=0.63.0 - ninja - pytest-cases - pytest-cov - pytest-dotenv - pytest-xdist - PyYaml -docs = - sphinx - sphinx-rtd-theme - myst-parser - - -[flake8] -exclude = - .git - __pycache__ - build - dist - autotest -ignore = - # https://flake8.pycqa.org/en/latest/user/error-codes.html - F401, - # https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes - # Indentation - E121, E122, E126, E127, E128, - # Whitespace - E203, E221, E222, E226, E231, E241, - # Import - E402, - # Line length - E501, E502, - # Statement - E722, E741, - # Whitespace warning - W291, W292, W293, - # Blank line warning - W391, - # Line break warning - W503, W504 -statistics = True diff --git a/setup.py b/setup.py index 60684932..e4505ea4 100755 --- a/setup.py +++ b/setup.py @@ -1,3 +1,3 @@ from setuptools import setup -setup() +setup(name="modflow-devtools")