Use sophisticated pre-commit for validation#1071
Conversation
|
Welcome to ccf-deadlines! |
|
We appreciate your efforts in enhancing the workflow. Plz wait patiently for the review. |
| submitted: 2344 | ||
| accepted: 547 | ||
| str: 23.3%(547/2344 24') | ||
| rate: 0.233361774744027303 |
There was a problem hiding this comment.
Just curious—if it's just formatting, why does the value change😂
There was a problem hiding this comment.
Interesting, I didn't catch that. Apperently that's an issue of the underlying ruamel.yaml used by macisamuele/language-formatters-pre-commit-hooks
Running:
import sys
import ruamel.yaml
yaml_str = """\
val: 0.233361774744027303
"""
print(yaml_str.replace("\n", ""))
yaml = ruamel.yaml.YAML()
data = yaml.load(yaml_str)
yaml.dump(data, sys.stdout)outputs
val: 0.233361774744027303
val: 0.233361774744027306
I'll raise the issue with ruamel but in the mean time, I'll switch to another yaml formatter will rewrite the commit to ensure no data is lost.
|
@jacklightChen I switched to another yaml formatter and redid the formatting. I also split the formatting into two commits. One for adding the new hooks (2ea24d6) and one for running the formatters for the first time (c047fe6). I hope it makes reviewing easier :) PS: For some reason, I re-pushed the same wrong configuration at first. Everything should check out now. Unfortunately, the yaml formatter from Google doesn't remove unnecessary quotation marks, etc., but changing values is a no-go |
|
Great job! |
This PR updates the pre-commit pipeline to utilize the sophisticated pre-commit framework.
Major changes:
.pre-commit-config.yamlfile for the pre-commit settings (f4f2ce3)validatepipeline into the global pre-commit file using a local repo (f4f2ce3)Minor changes: