diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7abc2eeff043da2f6c50f4c19f7d1ab4db1c199c..c08df26ebeeb8aa3f046b405d8490cbf28d30068 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,10 @@ repos: -- repo: https://github.com/jackdewinter/pymarkdown - rev: v0.9.13.3 - hooks: - - id: pymarkdown + - repo: https://github.com/jackdewinter/pymarkdown + rev: v0.9.13.3 + hooks: + - id: pymarkdown + - repo: https://github.com/pappasam/toml-sort + rev: v0.23.1 + hooks: + - id: toml-sort + args: [ --check ] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b6450281096610c41b69029c8135a978e400f12e..dc7ca77129da58a225b6038484ef453e27988eb2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,3 +27,10 @@ pre-commit run --all-files This will run the following hooks: - `pymarkdown` +- `toml-sort` + +#### Sort Toml files + +```bash +toml-sort --in-place pyproject.toml +``` diff --git a/pyproject.toml b/pyproject.toml index 61f7768f48ea66d41bffd1193571667dee581593..a7992c4c21a754684093ef142d9c111e59756789 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,23 +1,20 @@ [build-system] -requires = ["hatchling"] build-backend = "hatchling.build" - -[tool.hatch.metadata] -allow-direct-references = true +requires = ["hatchling"] [project] name = "r2devops_catalog" version = "0.1.0" authors = [ - { name = "Dorian Turba", email = "author.name@example.com" }, + {email = "contact.7ltt4@8shield.net", name = "Dorian Turba"}, ] -description = "A description of what the package is for." +description = "Catalog of r2devops projects" dependencies = [ "black_project @ {root:uri}/tests/black_project", "flake8_project @ {root:uri}/tests/flake8_project", "isort_project @ {root:uri}/tests/isort_project", - "pytest_project @ {root:uri}/tests/pytest_project", "mypy_project @ {root:uri}/tests/mypy_project", + "pytest_project @ {root:uri}/tests/pytest_project", ] [project.optional-dependencies] @@ -25,16 +22,29 @@ QUALITY = [ "black", "mypy", "pre-commit", + "toml-sort", ] -[tool.pymarkdown] -strict-config = true -plugins.line-length.enabled = false +[tool.hatch.metadata] +allow-direct-references = true [[tool.mypy.overrides]] +ignore_missing_imports = true module = [ + "packaging", "packaging.requirements", "packaging.specifiers", - "packaging", ] -ignore_missing_imports = true \ No newline at end of file + +[tool.pymarkdown] +strict-config = true +plugins.line-length.enabled = false + +[tool.tomlsort] +all = true +in_place = true +spaces_indent_inline_array = 4 +trailing_comma_inline_array = true + +[tool.tomlsort.overrides."project"] +table_keys = false