Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:
repos:
# Syntax validation and some basic sanity checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: check-ast
Expand All @@ -17,7 +17,7 @@ repos:

# Linting, sorting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.14.10
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -27,14 +27,14 @@ repos:
# Remember to change versions in .azure-pipelines/azure-pipelines.yml to match
# the versions here.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
rev: v1.19.1
hooks:
- id: mypy
files: 'dials_data/.*\.py$'
additional_dependencies: ['types-PyYAML==6.0.12', 'types-requests==2.31.0']

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.14
rev: 0.9.21
hooks:
- id: pip-compile
args: [pyproject.toml, -q, -o, requirements.txt]
Expand Down
4 changes: 2 additions & 2 deletions dials_data/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def cli_info(cmd_args):
else:
print(
f"""
DIALS regression data manager v{information['version.full']}
DIALS regression data manager v{information["version.full"]}

repository location: {information['repository.location']}
repository location: {information["repository.location"]}
""".strip()
)

Expand Down
14 changes: 7 additions & 7 deletions tests/test_yaml_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ def test_yaml_file_is_valid_definition(yaml_file):
)
assert definition["data"], "Data definition is empty"
for n, entry in enumerate(definition["data"]):
assert isinstance(
entry, dict
), f"Data definition #{n+1} contains non-dictionary entry: {entry!r}"
assert "url" in entry, f"Data definition #{n+1} does not specify a URL"
assert isinstance(entry, dict), (
f"Data definition #{n + 1} contains non-dictionary entry: {entry!r}"
)
assert "url" in entry, f"Data definition #{n + 1} does not specify a URL"


@pytest.mark.parametrize(
"yaml_file", list(hashinfo_yamls.values()), ids=list(hashinfo_yamls.keys())
)
def test_yaml_file_is_valid_hashinfo(yaml_file):
assert is_valid_name(yaml_file)
assert (
yaml_file.name in definition_yamls
), "hashinfo file present without corresponding definition file"
assert yaml_file.name in definition_yamls, (
"hashinfo file present without corresponding definition file"
)
hashinfo = yaml.safe_load(yaml_file.read_bytes())
fields = set(hashinfo)
required = {"definition", "formatversion", "verify"}
Expand Down
Loading