Skip to content

Feature/add precommit hooks#23

Merged
laurejt merged 13 commits intodevelopfrom
feature/add-precommit-hooks
Mar 30, 2026
Merged

Feature/add precommit hooks#23
laurejt merged 13 commits intodevelopfrom
feature/add-precommit-hooks

Conversation

@laurejt
Copy link
Copy Markdown

@laurejt laurejt commented Mar 20, 2026

Associated Issue(s): resolves #17

Changes in this PR

  • Adds the following pre-commit hooks:
    • ruff linter and formatter
    • yamlfmt: YAML formatter
    • codespell
    • some out-of-the-box file checks
    • check uv.lock
    • validate GitHub Actions workflow files
  • Adds ruff and pre-commit to dev dependencies
  • Add yamlfmt.yml config file to retain linebreaks but only keep a single line in groups of many blank lines
  • Add ruff rule set excluding type annotations and documentation
  • Temporarily fixed pyproject.toml's pytest configuration to support Python 3.9 (intend to update when 3.9 support is dropped)
  • Fixed unit test TestViafEntity.test_rdf within test_api
  • Fixed broken GitHub Actions workflow unit_tests.yml
  • Fixed broken GitHub Actions workflow python-publish.yml
  • Otherwise updated files according to pre-commit hooks

Notes

Include any additional notes that will help in the reviewing of this pull request

  • I removed the option for running the python-publish.yml manually since there is no way to restrict to a specific branch.

Reviewer Checklist

  • Verify that pytest can be run locally successfully
  • Confirm the file style changes look reasonable

@laurejt laurejt requested a review from rlskoeser March 24, 2026 14:55
@laurejt laurejt marked this pull request as ready for review March 24, 2026 14:56
Copy link
Copy Markdown
Contributor

@rlskoeser rlskoeser left a comment

Choose a reason for hiding this comment

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

Revisions look good to me.

Comment on lines +26 to +32
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These versions look old. I assume you are holding off on updating, and this PR is solely reformatting? (Want to make sure we're tracking that work somewhere)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, but I'll make a new issue on updating this workflow.

@laurejt laurejt merged commit c74e05e into develop Mar 30, 2026
49 checks passed
@laurejt laurejt deleted the feature/add-precommit-hooks branch March 30, 2026 17:28
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.

2 participants