Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-170: add yamllint and run over the repo #230

Merged
merged 4 commits into from
Sep 23, 2024
Merged

gh-170: add yamllint and run over the repo #230

merged 4 commits into from
Sep 23, 2024

Conversation

paddyroddy
Copy link
Member

@paddyroddy paddyroddy commented Sep 17, 2024

Still working towards #170. The options seem like a lot but these are ones I've used and I've found great for readability. Plus, for example, removing Python versions makes diffs easier when doing something like

python-version:
  - "3.8"
  - "3.9"
  - "3.10"
  - "3.11"

rather than

python-version: ["3.8", "3.9", "3.10", "3.11"]

@paddyroddy paddyroddy added the infrastructure Project infrastructure: dev tools, packaging, etc. label Sep 17, 2024
@paddyroddy paddyroddy self-assigned this Sep 17, 2024
@paddyroddy paddyroddy marked this pull request as draft September 17, 2024 16:02
@paddyroddy paddyroddy marked this pull request as ready for review September 17, 2024 16:02
rev: v1.35.1
hooks:
- id: yamllint
args:
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to add these args as config in pyproject.toml? Looks good otherwise!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can always add "move some of the pre-commit config to pyproject" as a to-do item.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry this is my bad. These options have been tried and tested, but I have some hacky "global" pre-commit hooks, where I don't want to have the same config everywhere https://github.com/paddyroddy/.github/blob/main/precommit/general/general-hooks.yaml

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it possible to add these args as config in pyproject.toml? Looks good otherwise!

It's not by the way, but can add to a .yamllint.yaml file

Copy link
Member

Choose a reason for hiding this comment

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

Ah, thanks for looking into this, keeping it as it is should be fine!

@Saransh-cpp Saransh-cpp changed the title Add yamllint and run over the repo gh-170: add yamllint and run over the repo Sep 19, 2024
@Saransh-cpp
Copy link
Member

Taking over 🫡

@Saransh-cpp Saransh-cpp merged commit 46bbd92 into main Sep 23, 2024
10 checks passed
@Saransh-cpp Saransh-cpp deleted the add-yamllint branch September 23, 2024 10:46
@Saransh-cpp Saransh-cpp self-assigned this Sep 27, 2024
paddyroddy added a commit that referenced this pull request Oct 1, 2024
Closes #267. The main advantage here is when running the given tool it
will always work, rather than just via `pre-commit`. Previously
requested in
#230 (comment). Have
used `pyproject.toml` where possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Project infrastructure: dev tools, packaging, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants