Skip to content

feat(pre-commit): adds pre-commit linting, yaml-compliance checking, …#10

Open
Matt-Carre wants to merge 4 commits into
mainfrom
pre-commit-check-yaml
Open

feat(pre-commit): adds pre-commit linting, yaml-compliance checking, …#10
Matt-Carre wants to merge 4 commits into
mainfrom
pre-commit-check-yaml

Conversation

@Matt-Carre

Copy link
Copy Markdown
Collaborator

…yaml-regeneration, and environment variables

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f2bbe7f) to head (4bdce37).

Additional details and impacted files
@@             Coverage Diff              @@
##             main       #10       +/-   ##
============================================
+ Coverage   17.88%   100.00%   +82.11%     
============================================
  Files           4         3        -1     
  Lines         123        22      -101     
============================================
  Hits           22        22               
+ Misses        101         0      -101     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/.env
Comment thread src/python_interface_to_workflows/workflow_definitions/create_division_yaml.py Outdated
Comment thread .pre-commit-config.yaml

@JamesDoingStuff JamesDoingStuff left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! Got a few suggestions - hope you don't think me harsh, but you're getting the hang of this quickly so we have time to be thorough :)

Comment thread src/python_interface_to_workflows/workflow_definitions/create_division_yaml.py Outdated
Comment thread src/python_interface_to_workflows/workflow_definitions/create_division_yaml.py Outdated
Comment thread src/python_interface_to_workflows/workflow_definitions/create_division_yaml.py Outdated
Comment thread src/python_interface_to_workflows/workflow_definitions/create_division_yaml.py Outdated
Comment thread checkyamlcompliance Outdated
Comment on lines +21 to +29
required_labels: list[str] = [
r"apiVersion:\sargoproj\.io\/v1alpha",
r"kind:\sClusterWorkflowTemplate",
r"metadata:",
r"\s\sannotations:",
r"\s\s\s\sworkflows.argoproj.io/title:\s.+",
r"\s\s\s\sworkflows.diamond.ac.uk/repository:\s.+",
r"\s\slabels:",
r"\s\s\s\sworkflows.diamond.ac.uk/science-group-.+:\s.+",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry that using RegEx here will make things fragile - if the formatting changes to single tabs instead of double spaces, or if someone has the right label present in the template but put it under annotations by mistake etc. There's a python module that can parse yaml - may be worth a look?

Comment thread checkyamlcompliance Outdated
Comment thread checkyamlcompliance Outdated
Comment thread Dockerfile Outdated
Comment thread checkyamlcompliance Outdated
@JamesDoingStuff

Copy link
Copy Markdown
Collaborator

Also, is there a reason for leaving file extensions off the scripts? I know they're not required, but I find them helpful to know what the contents looks like and to distinguish from binaries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants