diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..7540f326 --- /dev/null +++ b/.flake8 @@ -0,0 +1,40 @@ +# Configure flake8 + +[flake8] +max-line-length = 88 +max-doc-length = 79 +ignore = + # Too many leading '#' for block comment + E266, + # Line too long (82 > 79 characters) + E501, + # Do not use variables named 'I', 'O', or 'l' + E741, + # Line break before binary operator (conflicts with black) + W503, + # Functions too long. The kernels will end up a bit long but not complex. + CFQ001, + # Number of arguments. Kernels take only scalars (no lists or arrays) + CFQ002, +exclude = + .git, + __pycache__, + .ipynb_checkpoints, + doc/_build, +per-file-ignores = + # disable unused-imports errors on __init__.py + __init__.py: F401 + # disable unused arguments in kernel files + _kernels.py: U100 + +# Configure flake8-rst-docstrings +# ------------------------------- +# Add some roles used in our docstrings +rst-roles = + class, + func, + mod, + meth, + ref, +# Ignore "Unknown target name" raised on citations +extend-ignore = RST306 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b8f9abdd..1aa7fabb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -61,7 +61,7 @@ jobs: - name: Collect requirements run: | echo "Install Dependente to capture dependencies:" - python -m pip install dependente==0.1.0 + python -m pip install dependente==0.3.0 echo "" echo "Capturing run-time dependencies:" dependente --source install > requirements-full.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79dcf200..9c85b0e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,7 +84,7 @@ jobs: - name: Collect requirements run: | echo "Install Dependente to capture dependencies:" - python -m pip install dependente==0.1.0 + python -m pip install dependente==0.3.0 echo "" echo "Capturing run-time dependencies:" if [[ "${{ matrix.dependencies }}" == "oldest" ]]; then diff --git a/pyproject.toml b/pyproject.toml index 1066d898..8ee75f87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,47 @@ -# Specify that we use setuptools and setuptools_scm (to generate the version -# string). Actual configuration is in setup.cfg. +[project] +name = "choclo" +description = "Kernel functions for your geophysical models" +dynamic = ["version"] +authors = [ + {name="The Choclo Developers", email="fatiandoaterra@protonmail.com"}, +] +maintainers = [ + {name = "Santiago Soler", email = "santisoler@fastmail.com"} +] +readme = "README.md" +license = {text = "BSD-3-Clause"} +keywords = ["geoscience", "geophysics"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "License :: OSI Approved :: BSD License", + "Natural Language :: English", + "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 :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering", + "Topic :: Software Development :: Libraries", +] +requires-python = ">=3.8" +dependencies = [ + "numpy>=1.19", + "numba>=0.52", +] + +[project.urls] +"Documentation" = "https://www.fatiando.org/choclo" +"Changelog" = "https://www.fatiando.org/choclo/latest/changes.html" +"Bug Tracker" = "https://github.com/fatiando/choclo/issues" +"Source Code" = "https://github.com/fatiando/choclo" + [build-system] -requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"] +requires = ["setuptools>=61", "wheel", "setuptools_scm[toml]>=8.0.3"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index c87ecd39..00000000 --- a/setup.cfg +++ /dev/null @@ -1,83 +0,0 @@ -[metadata] -name = choclo -fullname = Choclo -description = Kernel functions for your geophysical models -long_description = file: README.md -long_description_content_type = text/markdown -author = The Choclo Developers -author_email = fatiandoaterra@protonmail.com -maintainer = Santiago Soler -maintainer_email = santiago.r.soler@gmail.com -license = BSD 3-Clause License -license_files = LICENSE.txt -platform = any -keywords = geophysics, geoscience -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Science/Research - Intended Audience :: Developers - Intended Audience :: Education - License :: OSI Approved :: BSD License - Natural Language :: English - Operating System :: OS Independent - Topic :: Scientific/Engineering - Topic :: Software Development :: Libraries - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 -url = https://github.com/fatiando/choclo -project_urls = - Documentation = https://www.fatiando.org/choclo - Release Notes = https://github.com/fatiando/choclo/releases - Bug Tracker = https://github.com/fatiando/choclo/issues - Source Code = https://github.com/fatiando/choclo - -[options] -zip_safe = True -packages = find: -python_requires = >=3.8 -install_requires = - numpy>=1.19 - numba>=0.52 - -[flake8] -max-line-length = 88 -max-doc-length = 79 -ignore = - # Too many leading '#' for block comment - E266, - # Line too long (82 > 79 characters) - E501, - # Do not use variables named 'I', 'O', or 'l' - E741, - # Line break before binary operator (conflicts with black) - W503, - # Functions too long. The kernels will end up a bit long but not complex. - CFQ001, - # Number of argumentys. Kernels take only scalars (no lists or arrays) - CFQ002, -exclude = - .git, - __pycache__, - .ipynb_checkpoints, - doc/_build, -per-file-ignores = - # disable unused-imports errors on __init__.py - __init__.py: F401 - # disable unused arguments in kernel files - _kernels.py: U100 - -# Configure flake8-rst-docstrings -# ------------------------------- -# Add some roles used in our docstrings -rst-roles = - class, - func, - mod, - meth, - ref, -# Ignore "Unknown target name" raised on citations -extend-ignore = RST306