Skip to content

Commit

Permalink
convert to hatch build
Browse files Browse the repository at this point in the history
  • Loading branch information
tpike3 committed Jun 22, 2024
1 parent e746276 commit 61a4114
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 235 deletions.
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ python:
install:
- method: pip
path: .
extre_requirements:
- docs

conda:
environment: docs/source/environment.yml
Expand Down
168 changes: 124 additions & 44 deletions pyproject.toml
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 ':'
Expand All @@ -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
]
66 changes: 0 additions & 66 deletions setup.cfg

This file was deleted.

125 changes: 0 additions & 125 deletions setup.py

This file was deleted.

0 comments on commit 61a4114

Please sign in to comment.