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

[MNT] Updated husky scripts #419

Merged
merged 16 commits into from
Dec 20, 2024
Merged

[MNT] Updated husky scripts #419

merged 16 commits into from
Dec 20, 2024

Conversation

rmanaem
Copy link
Contributor

@rmanaem rmanaem commented Dec 20, 2024

NOTE: If this pull request is to be released, the release label must be applied once the review process is done to avoid the local and remote from going out of sync as a consequence of the bump version workflow run

Checklist

This section is for the PR reviewer

  • PR has an interpretable title with a prefix ([ENH], [FIX], [REF], [TST], [CI], [MNT], [INF], [MODEL], [DOC]) (see our Contributing Guidelines for more info)
  • PR has a label for the release changelog or skip-release (to be applied by maintainers only)
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass
  • If the PR changes the participant-level and/or the dataset-level result file, the query-tool-results files in the neurobagel_examples repo have been regenerated

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

Summary by Sourcery

Build:

  • Set up Husky to manage Git hooks and run checks before commits and after merges.

@rmanaem rmanaem added the pr-internal Non-user-facing code improvement, will increment patch version when merged (0.0.+1) label Dec 20, 2024
Copy link

sourcery-ai bot commented Dec 20, 2024

Reviewer's Guide by Sourcery

This pull request updates the husky scripts to use npx husky init instead of npx husky install to enable pre-commit and post-merge hooks. It also updates the prepare script in package.json to use husky instead of husky install.

Sequence diagram for updated Husky initialization process

sequenceDiagram
    participant D as Developer
    participant H as Husky
    participant G as Git Hooks

    Note over D,G: Old Flow
    D->>H: npx husky install
    H->>G: Install hooks

    Note over D,G: New Flow
    D->>H: npx husky init
    H->>G: Initialize and install hooks

    Note over D,G: Package.json prepare script
    D->>H: npm run prepare
    H->>G: Setup hooks automatically
Loading

File-Level Changes

Change Details Files
Updated husky initialization command
  • Changed the husky initialization command from npx husky install to npx husky init.
README.md
Updated prepare script
  • Changed the prepare script from husky install to husky.
package.json
Updated husky hooks
  • Updated the post-merge and pre-commit husky hooks.
.husky/post-merge
.husky/pre-commit

Assessment against linked issues

Issue Objective Addressed Explanation
#237 Update husky scripts to remove deprecated configuration that will fail in v10.0.0

Possibly linked issues

  • Update husky scripts #237: The PR closes issue 237 by updating husky scripts to enable pre-commit and post-merge hooks, directly addressing the dependency management and code quality improvements discussed in the issue.
  • Update husky scripts #237: The PR closes the issue by updating husky scripts to resolve the deprecation warning.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

netlify bot commented Dec 20, 2024

Deploy Preview for neurobagel-query ready!

Name Link
🔨 Latest commit 4be9029
🔍 Latest deploy log https://app.netlify.com/sites/neurobagel-query/deploys/6765de8d7b8d840008ee8e72
😎 Deploy Preview https://deploy-preview-419--neurobagel-query.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@surchs surchs self-requested a review December 20, 2024 20:18
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

Very nice, good thing to address. Thanks @rmanaem !

🧑‍🍳

@rmanaem rmanaem added release Create a release when this PR is merged pr-minor Non-breaking feature or enhancement, will increment minor version (0.+1.0) and removed pr-internal Non-user-facing code improvement, will increment patch version when merged (0.0.+1) release Create a release when this PR is merged labels Dec 20, 2024
@rmanaem rmanaem added pr-major-breaking Significant behaviour change that breaks compatibility, will increment major version (+1.0.0) release Create a release when this PR is merged and removed release Create a release when this PR is merged pr-minor Non-breaking feature or enhancement, will increment minor version (0.+1.0) labels Dec 20, 2024
@rmanaem rmanaem added pr-patch Incremental feature improvement, will increment patch version when merged (0.0.+1) release Create a release when this PR is merged and removed pr-major-breaking Significant behaviour change that breaks compatibility, will increment major version (+1.0.0) release Create a release when this PR is merged labels Dec 20, 2024
@rmanaem rmanaem removed release Create a release when this PR is merged pr-patch Incremental feature improvement, will increment patch version when merged (0.0.+1) labels Dec 20, 2024
@rmanaem rmanaem added the release Create a release when this PR is merged label Dec 20, 2024
@rmanaem rmanaem added the pr-minor Non-breaking feature or enhancement, will increment minor version (0.+1.0) label Dec 20, 2024
@rmanaem rmanaem removed release Create a release when this PR is merged pr-minor Non-breaking feature or enhancement, will increment minor version (0.+1.0) labels Dec 20, 2024
@rmanaem rmanaem added release Create a release when this PR is merged pr-major-breaking Significant behaviour change that breaks compatibility, will increment major version (+1.0.0) labels Dec 20, 2024
@rmanaem rmanaem added release Create a release when this PR is merged pr-patch Incremental feature improvement, will increment patch version when merged (0.0.+1) and removed release Create a release when this PR is merged pr-major-breaking Significant behaviour change that breaks compatibility, will increment major version (+1.0.0) labels Dec 20, 2024
@rmanaem rmanaem merged commit 599c3e7 into main Dec 20, 2024
12 checks passed
@rmanaem rmanaem deleted the process-237 branch December 20, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-patch Incremental feature improvement, will increment patch version when merged (0.0.+1) release Create a release when this PR is merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update husky scripts
2 participants