Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyproject.toml #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[project]
name = "mesa-viz-tornado"
version = "0.1.0"
description = "Legacy tornado-based visualization framework for Mesa"
authors = [
{ name = "Project Mesa Team", email = "[email protected]" },
]
license = { file = "LICENSE" }
requires-python = ">=3.8"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.ruff]
# See https://github.com/charliermarsh/ruff#rules for error code definitions.
select = [
# "ANN", # annotations TODO
"B", # bugbear
"C4", # comprehensions
"DTZ", # naive datetime
"E", # style errors
"F", # flakes
"I", # import sorting
"ISC", # string concatenation
"N", # naming
"PGH", # pygrep-hooks
"PIE", # miscellaneous
"PLC", # pylint convention
"PLE", # pylint error
# "PLR", # pylint refactor TODO
"PLW", # pylint warning
"Q", # quotes
"RUF", # Ruff
"S", # security
"SIM", # simplify
"T10", # debugger
"UP", # upgrade
"W", # style warnings
"YTT", # sys.version
]
# Ignore list taken from https://github.com/psf/black/blob/master/.flake8
# E203 Whitespace before ':'
# E266 Too many leading '#' for block comment
# E501 Line too long (82 > 79 characters)
# W503 Line break occurred before a binary operator
# But we don't specify them because ruff's Black already
# checks for it.
# See https://github.com/charliermarsh/ruff/issues/1842#issuecomment-1381210185
extend-ignore = [
"E501",
"S101", # Use of `assert` detected
"B017", # `assertRaises(Exception)` should be considered evil TODO
"PGH004", # Use specific rule codes when using `noqa` TODO
"B905", # `zip()` without an explicit `strict=` parameter
"N802", # Function name should be lowercase
"N999", # Invalid module name. We should revisit this in the future, TODO
"B007", # Loop control variable `i` not used within loop body
"N806", # Variable `N` in function should be lowercase
"N803", # Argument name `N` should be lowercase
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes TODO
"B008", # Do not perform function call `pyproj.CRS` in argument defaults TODO
"S301", # `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue TODO
]
# Hardcode to Python 3.8.
target-version = "py38"

[tool.isort]
profile = "black"
sections = ['FUTURE', 'STDLIB', 'THIRDPARTY', 'LOCALFOLDER']
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def ensure_js_dep_single(url, out_name=None):


setup(
name="Mesa-Viz-Tornado",
name="mesa-viz-tornado",
version=version,
description="Tornado-based visualization framework for Mesa",
long_description=readme,
Expand Down