Skip to content

Commit

Permalink
Add taplo pre-commit hook to format and sort toml files (#425)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
tkoyama010 and pre-commit-ci[bot] authored Nov 13, 2024
1 parent ed8a7d4 commit dc2b72b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 24 deletions.
10 changes: 6 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ repos:
rev: 2024.08.19
hooks:
- id: sp-repo-review
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
# See options: https://taplo.tamasfe.dev/configuration/formatter-options.html
args: [--option, "reorder_arrays=true"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand All @@ -90,7 +96,3 @@ repos:
args: [--branch, main]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
30 changes: 10 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,33 @@ requires = [
'pyvista[all]<0.44.2',
'scooby<0.9.3',
'setuptools<69.0.4',
'shapely<2.0.6'
'shapely<2.0.6',
]
build-backend = 'setuptools.build_meta'

[project]
name = "scikit-gmsh"
dynamic = [
"readme",
"version"
]
dynamic = ["readme", "version"]
dependencies = [
'gmsh<4.12.3',
'meshio<5.3.6',
'pygmsh<7.1.18',
'pyvista[all]<0.44.2',
'scooby<0.9.3',
'shapely<2.0.6'
'shapely<2.0.6',
]
requires-python = '>=3.9'

[project.optional-dependencies]
test = ['pytest==8.0.0']
docs = [
'myst-parser==4.0.0',
'sphinx==8.0.2',
'sphinx-book-theme==1.1.3',
'sphinx-copybutton==0.5.2',
'sphinx-design==0.6.1',
'sphinx-gallery==0.17.1',
'sphinx-toolbox==3.8.0'
'sphinx-toolbox==3.8.0',
'sphinx==8.0.2',
]

[tool.mypy]
Expand All @@ -53,13 +50,11 @@ version = "0.0.0"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
addopts = ["--showlocals", "--strict-config", "--strict-markers", "-ra"]
xfail_strict = true
filterwarnings = ["error", 'ignore::DeprecationWarning']
log_cli_level = "info"
testpaths = [
"tests"
]
testpaths = ["tests"]

[tool.ruff]
line-length = 150
Expand All @@ -69,12 +64,7 @@ docstring-code-format = true

[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812",
"D203",
"D212",
"ISC001"
]
ignore = ["COM812", "D203", "D212", "ISC001"]

[tool.ruff.lint.isort]
# Sort by name, don't cluster "from" vs "import"
Expand All @@ -94,5 +84,5 @@ force-single-line = true
keep-runtime-typing = true

[tool.setuptools.dynamic]
version = {attr = 'skgmsh.__version__'}
readme = {file = "README.md", content-type = "text/markdown"}
version = { attr = 'skgmsh.__version__' }
readme = { file = "README.md", content-type = "text/markdown" }

0 comments on commit dc2b72b

Please sign in to comment.