Skip to content

Commit

Permalink
Ditch setup.cfg and replace it with pyproject.toml
Browse files Browse the repository at this point in the history
Move flake8 configuration to its own `.flake8` file.
  • Loading branch information
santisoler committed Mar 22, 2024
1 parent 98832ff commit e1aa48a
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 85 deletions.
40 changes: 40 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -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
44 changes: 41 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,45 @@
# 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="[email protected]"},
]
maintainers = [
{name = "Santiago Soler", email = "[email protected]"}
]
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",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
]
requires-python = ">=3.7"
dependencies = [
"numpy>=1.19",
"numba>=0.52",
]

[project.urls]
"Homepage" = "https://www.fatiando.org/choclo"
"Documentation" = "https://www.fatiando.org/choclo"
"Repository" = "https://github.com/fatiando/choclo.git"
"Changelog" = "https://www.fatiando.org/choclo/latest/changes.html"
"Bug Tracker" = "https://github.com/fatiando/choclo/issues"
"Source Code" = "https://github.com/fatiando/choclo"
"Release Notes" = "https://github.com/fatiando/choclo/releases"

[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]
Expand Down
82 changes: 0 additions & 82 deletions setup.cfg

This file was deleted.

0 comments on commit e1aa48a

Please sign in to comment.