-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from Materials-Data-Science-and-Informatics/fe…
…ature/update_hooks update pre-commit hooks and dependencies
- Loading branch information
Showing
43 changed files
with
1,010 additions
and
786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
repos: | ||
# Various general + format-specific helpers | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-symlinks | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: check-yaml | ||
exclude: "mkdocs.yml" | ||
- id: check-toml | ||
- id: check-json | ||
- id: check-ast | ||
- id: debug-statements | ||
- id: check-merge-conflict | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-added-large-files | ||
args: [--maxkb=10000] | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: "0.22.0" | ||
hooks: | ||
- id: check-github-workflows | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.6 | ||
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/pre-commit/mirrors-mypy | ||
rev: "v1.1.1" | ||
hooks: | ||
- id: mypy | ||
args: [--no-strict-optional, --ignore-missing-imports] | ||
# NOTE: you might need to add some deps here: | ||
additional_dependencies: [] | ||
# Various general + format-specific helpers | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-symlinks | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: check-yaml | ||
exclude: 'mkdocs.yml' | ||
- id: check-toml | ||
- id: check-json | ||
- id: check-ast | ||
- id: debug-statements | ||
- id: check-merge-conflict | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-added-large-files | ||
args: [--maxkb=10000] | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: '0.29.0' | ||
hooks: | ||
- id: check-github-workflows | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.5.4 | ||
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/pre-commit/mirrors-mypy | ||
rev: 'v1.11.0' | ||
hooks: | ||
- id: mypy | ||
args: [--no-strict-optional, --ignore-missing-imports] | ||
# NOTE: you might need to add some deps here: | ||
additional_dependencies: [] | ||
|
||
# Metadata | ||
- repo: https://github.com/citation-file-format/cff-converter-python | ||
rev: "44e8fc9" | ||
hooks: | ||
- id: validate-cff | ||
- repo: https://github.com/fsfe/reuse-tool | ||
rev: "v1.1.2" | ||
hooks: | ||
- id: reuse | ||
# Metadata | ||
- repo: https://github.com/citation-file-format/cff-converter-python | ||
rev: '054bda51dbe278b3e86f27c890e3f3ac877d616c' | ||
hooks: | ||
- id: validate-cff | ||
- repo: https://github.com/fsfe/reuse-tool | ||
rev: 'v4.0.3' | ||
hooks: | ||
- id: reuse | ||
|
||
- repo: local | ||
hooks: | ||
# NOTE: copy from .pre-commit-hooks.yaml, for technical reasons | ||
- id: somesy-sync | ||
name: Run somesy sync | ||
entry: somesy sync | ||
language: python | ||
files: '^\.somesy\.toml|pyproject\.toml$' | ||
pass_filenames: false | ||
- repo: local | ||
hooks: | ||
# NOTE: copy from .pre-commit-hooks.yaml, for technical reasons | ||
- id: somesy-sync | ||
name: Run somesy sync | ||
entry: somesy sync | ||
language: python | ||
files: '^\.somesy\.toml|pyproject\.toml$' | ||
pass_filenames: false | ||
|
||
- id: somesy-fill | ||
name: Update AUTHORS.md | ||
entry: somesy fill -t docs/_template_authors.md -o AUTHORS.md | ||
language: python | ||
files: '^\.somesy\.toml|pyproject\.toml$' | ||
pass_filenames: false | ||
- id: somesy-fill | ||
name: Update AUTHORS.md | ||
entry: somesy fill -t docs/_template_authors.md -o AUTHORS.md | ||
language: python | ||
files: '^\.somesy\.toml|pyproject\.toml$' | ||
pass_filenames: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""somesy package.""" | ||
|
||
import importlib_metadata | ||
from typing_extensions import Final | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""CFF module.""" | ||
|
||
from .writer import CFF | ||
|
||
__all__ = ["CFF"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Fill command of somesy.""" | ||
|
||
import logging | ||
from pathlib import Path | ||
from sys import stdin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Set config files for somesy.""" | ||
|
||
import logging | ||
from pathlib import Path | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Sync command for somesy.""" | ||
|
||
import logging | ||
from pathlib import Path | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Utility functions for CLI commands.""" | ||
|
||
import logging | ||
import traceback | ||
from typing import Optional | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Integration with codemeta.json (to re-generate codemeta as part of somesy sync).""" | ||
|
||
from .writer import CodeMeta | ||
|
||
__all__ = ["CodeMeta"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Commands for somesy.""" | ||
|
||
from .init_config import init_config | ||
from .sync import sync | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Somesy log configuration.""" | ||
|
||
import logging | ||
from enum import Enum, auto | ||
from typing import Optional | ||
|
Oops, something went wrong.