Skip to content

Commit

Permalink
style: format YAML & JSON (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted authored Jan 16, 2025
1 parent 9df805a commit 18ec312
Show file tree
Hide file tree
Showing 23 changed files with 254 additions and 254 deletions.
28 changes: 14 additions & 14 deletions .github/pyright-matcher.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"problemMatcher": [
"problemMatcher": [
{
"owner": "pyright",
"pattern": [
{
"owner": "pyright",
"pattern": [
{
"regexp": "^\\s\\s(\\S*\\.py):(\\d+):(\\d+)\\s-\\s(error|warning|information):\\s([\\s\\S]+?)\\s\\(([\\s\\S]+?)(?=(?:\\)|\\d+ errors,))",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5,
"code": 6
}
]
"regexp": "^\\s\\s(\\S*\\.py):(\\d+):(\\d+)\\s-\\s(error|warning|information):\\s([\\s\\S]+?)\\s\\(([\\s\\S]+?)(?=(?:\\)|\\d+ errors,))",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5,
"code": 6
}
]
]
}
]
}
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:
fi;
uv run --frozen pyright
format:
name: Format
runs-on: [ubuntu-24.04]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish to PyPI
on:
push:
tags:
- '*'
- "*"

jobs:
publish:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
tags:
# Push events to semver tags
- '[0-9]+.[0-9]+.[0-9]+'
- "[0-9]+.[0-9]+.[0-9]+"

jobs:
update-docs:
Expand Down
3 changes: 1 addition & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ inputs:
description: "secrets.GITHUB_TOKEN, needed for setup-helm action if helm-version is set to latest"
required: false


runs:
using: "composite"
steps:
Expand All @@ -64,7 +63,7 @@ runs:
with:
python-version: ${{ inputs.python-version }}
cache: pip
cache-dependency-path: ''
cache-dependency-path: ""
# FIXME: https://github.com/actions/setup-python/issues/361
# "${{ steps.requirements.outputs.path }}"

Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ kafka_brokers: "http://k8kafka-cp-kafka-headless.kpops.svc.cluster.local:9092"
pipeline_base_dir: tests/pipeline
strimzi_topic:
label:
strimzi.io/cluster: my-cluster
strimzi.io/cluster: my-cluster
22 changes: 0 additions & 22 deletions dprint.json

This file was deleted.

30 changes: 30 additions & 0 deletions dprint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://dprint.dev/schemas/v0.json",
"incremental": true,
"json": {},
"yaml": {},
"markdown": {},
"toml": {},
"malva": {},
"includes": ["**/*.{json,jsonc,yaml,yml,md,toml,css}"],
"excludes": [
".pytest_cache/**",
".mypy_cache/**",
"**/.venv/**",
"CHANGELOG.md",
"**/cli-commands.md",
"**/cli_env_vars.md",
"**/config_env_vars.md",
"tests/compiler/resources/erroneous-file.yaml",
"tests/**/snapshots/**",
"docs/docs/resources/**",
"docs/docs/schema/**",
],
"plugins": [
"https://plugins.dprint.dev/json-0.19.4.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm",
"https://plugins.dprint.dev/markdown-0.17.8.wasm",
"https://plugins.dprint.dev/toml-0.6.4.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.11.1.wasm",
],
}
10 changes: 5 additions & 5 deletions lefthook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pre-commit:
glob: "*.py"
run: uv run pyright
dprint:
glob: "*.{md,toml,css}"
glob: "*.{json,jsonc,yaml,yml,md,toml,css}"
run: dprint fmt
kpops-schema:
glob: "{uv.lock,kpops/**/*.py,hooks/gen_schema.py}"
Expand All @@ -40,10 +40,10 @@ pre-commit:
docs/docs/resources/pipeline-components/dependencies/*.yaml,\
kpops/components/*.py\
}"
# .gitignore -- indicates whether the script is ran with `--all-files`
# hooks/gen_docs/gen_docs_components.py -- hook's behavior is possibly changed
# docs/.../.yaml -- examples changed or dependencies edited
# kpops/components/... -- KPOps components possibly changed
# .gitignore -- indicates whether the script is ran with `--all-files`
# hooks/gen_docs/gen_docs_components.py -- hook's behavior is possibly changed
# docs/.../.yaml -- examples changed or dependencies edited
# kpops/components/... -- KPOps components possibly changed
run: python -m hooks.gen_docs.gen_docs_components {staged_files}

post-checkout:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
{
"kind": "KafkaBrokerConfigList",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/-/configs",
"next": "null"
},
"data": [
"kind": "KafkaBrokerConfigList",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/-/configs",
"next": "null"
},
"data": [
{
"kind": "KafkaBrokerConfig",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/0/configs/default.replication.factor",
"resource_name": "crn:///kafka=cluster-1/broker=0/config=default.replication.factor"
},
"cluster_id": "cluster-1",
"broker_id": "0",
"name": "default.replication.factor",
"value": "1",
"is_default": "true",
"is_read_only": "false",
"is_sensitive": "false",
"source": "DEFAULT_CONFIG",
"synonyms": [
{
"kind": "KafkaBrokerConfig",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/0/configs/default.replication.factor",
"resource_name": "crn:///kafka=cluster-1/broker=0/config=default.replication.factor"
},
"cluster_id": "cluster-1",
"broker_id": "0",
"name": "default.replication.factor",
"value": "1",
"is_default": "true",
"is_read_only": "false",
"is_sensitive": "false",
"source": "DEFAULT_CONFIG",
"synonyms": [
{
"name": "default.replication.factor",
"value": "1",
"source": "DEFAULT_CONFIG"
}
]
},
"name": "default.replication.factor",
"value": "1",
"source": "DEFAULT_CONFIG"
}
]
},
{
"kind": "KafkaBrokerConfig",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/0/configs/num.partitions",
"resource_name": "crn:///kafka=cluster-1/broker=0/config=num.partitions"
},
"cluster_id": "cluster-1",
"broker_id": "0",
"name": "num.partitions",
"value": "1",
"is_default": "true",
"is_read_only": "false",
"is_sensitive": "false",
"source": "DEFAULT_CONFIG",
"synonyms": [
{
"kind": "KafkaBrokerConfig",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/0/configs/num.partitions",
"resource_name": "crn:///kafka=cluster-1/broker=0/config=num.partitions"
},
"cluster_id": "cluster-1",
"broker_id": "0",
"name": "num.partitions",
"value": "1",
"is_default": "true",
"is_read_only": "false",
"is_sensitive": "false",
"source": "DEFAULT_CONFIG",
"synonyms": [
{
"name": "num.partitions",
"value": "1",
"source": "DEFAULT_CONFIG"
}
]
"name": "num.partitions",
"value": "1",
"source": "DEFAULT_CONFIG"
}
]
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"kind": "KafkaClusterList",
"metadata": {
"self": "https://fake-cluster/kafka/v3/clusters",
"next": null
},
"data": [
{
"kind": "KafkaCluster",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1",
"resource_name": "crn:///kafka=cluster-1"
},
"cluster_id": "cluster-1",
"controller": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1"
},
"acls": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/acls"
},
"brokers": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers"
},
"broker_configs": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/broker-configs"
},
"consumer_groups": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups"
},
"topics": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics"
},
"partition_reassignments": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/-/partitions/-/reassignment"
}
}
]
"kind": "KafkaClusterList",
"metadata": {
"self": "https://fake-cluster/kafka/v3/clusters",
"next": null
},
"data": [
{
"kind": "KafkaCluster",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1",
"resource_name": "crn:///kafka=cluster-1"
},
"cluster_id": "cluster-1",
"controller": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1"
},
"acls": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/acls"
},
"brokers": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers"
},
"broker_configs": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/broker-configs"
},
"consumer_groups": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups"
},
"topics": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics"
},
"partition_reassignments": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/-/partitions/-/reassignment"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"kind": "KafkaTopic",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-X",
"resource_name": "crn:///kafka=cluster-1/topic=topic-X"
},
"cluster_id": "cluster-1",
"topic_name": "topic-X",
"is_internal": "false",
"replication_factor": 1,
"partitions_count": 1,
"partitions": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions"
},
"configs": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs"
},
"partition_reassignments": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/-/reassignments"
}
"kind": "KafkaTopic",
"metadata": {
"self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-X",
"resource_name": "crn:///kafka=cluster-1/topic=topic-X"
},
"cluster_id": "cluster-1",
"topic_name": "topic-X",
"is_internal": "false",
"replication_factor": 1,
"partitions_count": 1,
"partitions": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions"
},
"configs": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs"
},
"partition_reassignments": {
"related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/-/reassignments"
}
}
Loading

0 comments on commit 18ec312

Please sign in to comment.