-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
126 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,119 @@ | ||
[build-system] | ||
requires = [ | ||
"hatchling" | ||
] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "Mesa-Geo" | ||
description = "GIS Agent-based modeling (ABM) in Python" | ||
license = { text = "Apache 2.0" } | ||
requires-python = ">=3.10" | ||
authors = [ | ||
{ name = "Project Mesa Team", email = "[email protected]" }, | ||
] | ||
keywords = [ | ||
"agent", | ||
"based", | ||
"modeling", | ||
"model", | ||
"ABM", | ||
"simulation", | ||
"multi-agent", | ||
] | ||
classifiers = [ | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Artificial Life", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Development Status :: 3 - Alpha", | ||
"Natural Language :: English", | ||
] | ||
readme = "README.md" | ||
dependencies = [ | ||
"mesa", | ||
"geopandas", | ||
"libpysal", | ||
"rtree", | ||
"rasterio", | ||
"shapely", | ||
"pyproj", | ||
"folium", | ||
"xyzservices>=2022.9.0", | ||
"ipyleaflet" | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"ruff~=0.1.1", # Update periodically | ||
"coverage", | ||
"pytest >= 4.6", | ||
"pytest-cov", | ||
"sphinx", | ||
"pytest-mock", | ||
] | ||
docs = [ | ||
"sphinx", | ||
"ipython", | ||
"pydata_sphinx_theme", | ||
"seaborn", | ||
"myst-nb", | ||
"myst-parser", # Markdown in Sphinx | ||
"jupyterlite_sphinx", | ||
"jupyterlite-xeus>=0.2.0a0", | ||
"jupyter_bridge" | ||
] | ||
|
||
[project.urls] | ||
homepage = "https://github.com/projectmesa/mesa-geo" | ||
repository = "https://github.com/projectmesa/mesa-geo" | ||
|
||
[project.scripts] | ||
mesa = "mesa.main:cli" | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["mesa-geo"] | ||
|
||
[tool.hatch.version] | ||
path = "mesa_geo/__init__.py" | ||
|
||
[tool.ruff] | ||
# See https://github.com/charliermarsh/ruff#rules for error code definitions. | ||
# Hardcode to Python 3.10. | ||
# Reminder to update mesa-examples if the value below is changed. | ||
target-version = "py310" | ||
extend-exclude = ["docs", "build"] | ||
|
||
[tool.ruff.lint] | ||
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 | ||
# "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 ':' | ||
|
@@ -39,21 +124,16 @@ select = [ | |
# 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 | ||
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` TODO | ||
"S310", # Audit URL open for permitted schemes. Allowing use of `file:` or custom schemes is often unexpected. | ||
"S603", # `subprocess` call: check for execution of untrusted input | ||
"ISC001", # ruff format asks to disable this feature | ||
] | ||
|
||
#ruff ignores build and docs | ||
extend-exclude = ["docs", "build"] | ||
|
||
# Hardcode to Python 3.10. | ||
target-version = "py310" | ||
"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 | ||
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` TODO | ||
"S310", # Audit URL open for permitted schemes. Allowing use of `file:` or custom schemes is often unexpected. | ||
"S603", # `subprocess` call: check for execution of untrusted input | ||
"ISC001", # ruff format asks to disable this feature | ||
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes | ||
] |