Skip to content

Commit

Permalink
Auto-format and organize imports via ruff on save
Browse files Browse the repository at this point in the history
  • Loading branch information
deltamarnix committed Dec 9, 2024
1 parent 7f01bdf commit d975e12
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 37 deletions.
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
"test"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"python.testing.pytestEnabled": true,
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
}
}
}
55 changes: 19 additions & 36 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
[build-system]
requires = [
"setuptools >=61",
]
requires = ["setuptools >=61"]
build-backend = "setuptools.build_meta"

[project]
name = "flopy4"
description = "Development project to reimplement MF6 support for FloPy"
authors = [
{name = "Joe Hughes", email = "[email protected]"},
{name = "Chris Langevin", email = "[email protected]"},
{name = "Josh Larsen", email = "[email protected]"},
{name = "Michael Reno", email = "[email protected]"},
{name = "Wes Bonelli", email = "[email protected]"},
{ name = "Joe Hughes", email = "[email protected]" },
{ name = "Chris Langevin", email = "[email protected]" },
{ name = "Josh Larsen", email = "[email protected]" },
{ name = "Michael Reno", email = "[email protected]" },
{ name = "Wes Bonelli", email = "[email protected]" },
]
maintainers = [
{name = "Joe Hughes", email = "[email protected]"},
{name = "Chris Langevin", email = "[email protected]"},
{name = "Josh Larsen", email = "[email protected]"},
{name = "Michael Reno", email = "[email protected]"},
{name = "Wes Bonelli", email = "[email protected]"},
{ name = "Joe Hughes", email = "[email protected]" },
{ name = "Chris Langevin", email = "[email protected]" },
{ name = "Josh Larsen", email = "[email protected]" },
{ name = "Michael Reno", email = "[email protected]" },
{ name = "Wes Bonelli", email = "[email protected]" },
]
keywords = ["MODFLOW", "groundwater", "hydrogeology"]
license = {text = "CC0"}
license = { text = "CC0" }
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
Expand Down Expand Up @@ -51,9 +49,7 @@ dynamic = ["version"]

[project.optional-dependencies]
dev = ["flopy4[lint,test,build]"]
lint = [
"ruff"
]
lint = ["ruff"]
test = [
"flopy4[lint]",
"coverage",
Expand All @@ -68,17 +64,14 @@ test = [
"pytest-dotenv",
"pytest-xdist",
]
build = [
"build",
"twine",
]
build = ["build", "twine"]

[tool.setuptools]
include-package-data = true
zip-safe = false

[tool.setuptools.dynamic]
version = {attr = "flopy4.version.__version__"}
version = { attr = "flopy4.version.__version__" }

[tool.setuptools.packages.find]
include = ["flopy4", "flopy4.*"]
Expand All @@ -89,19 +82,10 @@ include = ["flopy4", "flopy4.*"]

[tool.ruff]
line-length = 79
target-version = "py38"
include = [
"pyproject.toml",
"flopy4/**/*.py",
"test/**/*.py",
"docs/**/*.py",
]
extend-include = [
"docs/**/*.ipynb"
]
exclude = [
"flopy4/ispec/*.py",
]
target-version = "py310"
include = ["pyproject.toml", "flopy4/**/*.py", "test/**/*.py", "docs/**/*.py"]
extend-include = ["docs/**/*.ipynb"]
exclude = ["flopy4/ispec/*.py"]

[tool.ruff.lint]
select = [
Expand Down Expand Up @@ -156,4 +140,3 @@ test = { cmd = "pytest -v -n auto" }

[tool.pixi.feature.lint.tasks]
lint = { cmd = "ruff check ." }

0 comments on commit d975e12

Please sign in to comment.