From 29010c1c7222341535a3ac3be02dd163663772c6 Mon Sep 17 00:00:00 2001 From: rht Date: Thu, 27 Jun 2024 03:11:05 -0400 Subject: [PATCH 1/2] setup: Migrate from setup.py to pyproject.toml (#13) * setup: Migrate from setup.py to pyproject.toml * Use Hatchling instead of setuptools --------- Co-authored-by: Adam Amer <136176500+adamamer20@users.noreply.github.com> --- pyproject.toml | 15 +++++++++++++++ setup.py | 10 ---------- 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2f1e080 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "mesa_frames" +version = "0.1.0-alpha1" +description = "An extension to the Mesa framework which uses pandas/Polars DataFrames for enhanced performance" +authors = [ + { name = "Adam Amer" }, +] +license = { text = "MIT" } + +[tool.hatch.build.targets.wheel] +packages = ["mesa_frames"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 80feb0f..0000000 --- a/setup.py +++ /dev/null @@ -1,10 +0,0 @@ -from setuptools import find_packages, setup - -setup( - name="mesa_frames", - packages=find_packages(where="mesa_frames"), - version="0.1.0-alpha1", - description="An extension to the Mesa framework which uses Pandas DataFrames for enhanced performance", - author="Adam Amer", - license="MIT License", -) From e83b4aea9d1a23cbf6808717b8ea9f0ea1d8a59b Mon Sep 17 00:00:00 2001 From: rht Date: Mon, 1 Jul 2024 02:34:58 -0400 Subject: [PATCH 2/2] ci: Add pre-commit configuration (#14) --- .codespellignore | 2 ++ .pre-commit-config.yaml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .codespellignore create mode 100644 .pre-commit-config.yaml diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 0000000..ed64b98 --- /dev/null +++ b/.codespellignore @@ -0,0 +1,2 @@ +nd +wasn diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c9d08c5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,36 @@ +ci: + autoupdate_schedule: 'monthly' + +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.4.3 + hooks: + # Run the linter. + - id: ruff + types_or: [ python, pyi, jupyter ] + args: [ --fix ] + # Run the formatter. + - id: ruff-format + types_or: [ python, pyi, jupyter ] +- repo: https://github.com/asottile/pyupgrade + rev: v3.15.2 + hooks: + - id: pyupgrade + args: [--py310-plus] +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 # Use the ref you want to point at + hooks: + - id: trailing-whitespace + - id: check-toml + - id: check-yaml +- repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + args: [ + "--ignore-words", + ".codespellignore", + "--exclude-file", + "docs/api/search.js", + ]