Skip to content

Conversation

@dbobrenko
Copy link
Contributor

@dbobrenko dbobrenko commented Nov 4, 2024

Changes

  • Fix the whole codebase style/format/isort issues to align with ruff, black, isort;
  • Add ruff, black;
  • Add isort;
  • Add pre-commit hook;
  • Add pre-commit checks on pull-request with Github Actions;
  • Add contribution guide to CONTRIBUTING.md.

Overview

Each git commit will run pre-commit hook locally, and fix all format/style issues.
If commit fails, make sure to add the modified files.

To run pre-commit manually and automatically fix files:
poetry run pre-commit run --all-files

Issues

  • Current code complexity is set to 13, which should be addressed in separate PR to be at least 10.

@dbobrenko dbobrenko changed the base branch from main to staging November 4, 2024 14:03
@dbobrenko dbobrenko force-pushed the feature/SN1-297-enable-linter branch from 01a445d to f106fb9 Compare November 5, 2024 12:12
@dbobrenko dbobrenko self-assigned this Nov 5, 2024
Copy link
Contributor

@richwardle richwardle left a comment

Choose a reason for hiding this comment

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

LGTM

@dbobrenko dbobrenko changed the title Enable pre-commit, linters and formatters [MERGE AFTER v2.12.0] Enable pre-commit, linters and formatters Nov 18, 2024
@dbobrenko dbobrenko force-pushed the feature/SN1-297-enable-linter branch from 1d2b6dd to f1d25ed Compare November 22, 2024 13:43
@dbobrenko dbobrenko force-pushed the feature/SN1-297-enable-linter branch from c9d6824 to 362245a Compare November 22, 2024 14:13
@dbobrenko dbobrenko changed the base branch from staging to SN1-260-rework-validator-to-use-epistula November 22, 2024 14:14
@dbobrenko dbobrenko changed the title [MERGE AFTER v2.12.0] Enable pre-commit, linters and formatters Enable pre-commit, linters and formatters Nov 22, 2024
@bkb2135 bkb2135 merged commit 60a043e into SN1-260-rework-validator-to-use-epistula Nov 22, 2024
2 checks passed
- name: Test with pytest
run: |
# run tests in tests/ dir and only fail if there are failures or errors
Copy link
Contributor

Choose a reason for hiding this comment

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

Moving the cache step before installing dependencies might help pip restore with the cached packages, avoiding redownloading dependencies in following workflow runs. Test this thought I'm not 100%.

@dbobrenko dbobrenko deleted the feature/SN1-297-enable-linter branch February 8, 2025 04:35
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.

4 participants