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

Exclude dj_pipeline from precommit hooks #247

Closed
wants to merge 2 commits into from
Closed

Exclude dj_pipeline from precommit hooks #247

wants to merge 2 commits into from

Conversation

JaerongA
Copy link
Contributor

@JaerongA JaerongA commented Sep 3, 2023

@jkbhagatio The recent pr reminded me that we might not want this pre-commit hooks to be applied to files under dj_pipeline, especially files containing schema and table definitions. Sometimes we want things to be imported in a specific order, which may conflict with tools like isort. Some schemas (e.g., streams.py) are dynamically generated so applying hooks may introduce unexpected errors.

Summary by CodeRabbit

  • Chore: Updated the pre-commit configuration to improve code quality checks. The changes specifically exclude certain directories (aeon/dj_pipeline and __pycache__) from pre-commit hooks, ensuring that only relevant files are checked. This will help maintain a clean and efficient codebase.
  • Refactor: Included test and aeon directories in pre-commit checks to ensure that all code modifications in these areas adhere to our coding standards. This enhances the reliability of our tests and core functionalities.

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

Image description CodeRabbit

Walkthrough

The changeset modifies the configuration for pre-commit hooks in the project. The primary focus is on refining the exclusion patterns to ensure that only necessary files are included in the pre-commit checks. This includes excluding certain directories like aeon/dj_pipeline and __pycache__, while ensuring that files under test and aeon directories are not excluded.

Changes

File Summary
.pre-commit-config.yaml The diff modifies the regular expression pattern used to exclude files from pre-commit hooks. It updates the pattern to exclude files under aeon/dj_pipeline but includes files under test and aeon directories. Additionally, it adds an exclusion pattern for __pycache__ directories.

Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between eb306bd and 67a0a32 commits.
Files selected (1)
  • .pre-commit-config.yaml (1)
Files skipped from review due to trivial changes (1)
  • .pre-commit-config.yaml
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@jkbhagatio
Copy link
Member

Ah yes, good point @JaerongA

Do you actually want to specify this under the tooling options for 'black', 'ruff', and 'pyright' in the 'pyproject.toml'? This way this can be implemented for other calls to these tools rather than just from pre-commit (e.g. actions workflows).

Also maybe you want to specify this for particular directories in 'dj_pipeline' rather than all of 'dj_pipeline'?

@JaerongA
Copy link
Contributor Author

JaerongA commented Sep 3, 2023

Ah yes, good point @JaerongA

Do you actually want to specify this under the tooling options for 'black', 'ruff', and 'pyright' in the 'pyproject.toml'? This way this can be implemented for other calls to these tools rather than just from pre-commit (e.g. actions workflows).

Also maybe you want to specify this for particular directories in 'dj_pipeline' rather than all of 'dj_pipeline'?

I see. It may be better to be specified within pyproject.toml then.

@jkbhagatio
Copy link
Member

Ah yes, good point @JaerongA
Do you actually want to specify this under the tooling options for 'black', 'ruff', and 'pyright' in the 'pyproject.toml'? This way this can be implemented for other calls to these tools rather than just from pre-commit (e.g. actions workflows).
Also maybe you want to specify this for particular directories in 'dj_pipeline' rather than all of 'dj_pipeline'?

I see. It may be better to be specified within pyproject.toml then.

Yup, so I guess this change in the '.pre-commit-config.yaml' is good, but if you can also change the exclude settings for those others tools in the 'pyproject.toml' that will be good, then I can merge

@jkbhagatio
Copy link
Member

This branch will essentailly be merged into 'dj_pipeline', so that the new PR from 'dj_pipeline' will include appropriately formatted files and the updated config (e.g. which errors and files to ignore from the CI checks)

@JaerongA JaerongA closed this Sep 19, 2023
@jkbhagatio jkbhagatio deleted the precommit branch July 23, 2024 16:36
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