question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Start using pre-commit ci app

See original GitHub issue

Description

Astropy should consider using the pre-commit ci app: https://github.com/apps/pre-commit-ci, instead of its current Code style checks github action for PRs.

Additional context

This will provide several benefits including:

  • Automatic fixing of code style issues (current action uses pre-commit to enforce code style). Which should help ease the burden of code style issues on contributors. Note that this is a feature we can choose to disable globally, but might make user contributions easier since contributors would not need to install pre-commit, isort, black, etc if they don’t want to and can just pull fixed PRs from GH.
  • Automated PRs to update our pre-commit configuration.

See https://pre-commit.ci for details on the setup options.

See dev discussion for more details.

Blocked by

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pllimcommented, Aug 11, 2022

At the 2022-08-11 infrastructure tag-up, we revisited https://github.com/astropy/astropy/issues/13320#issuecomment-1171488051 and discussed how to get past Step 3 that seemed stuck.

Path forward now: @WilliamJamieson will open a PR in this repo proposing the precommit config and updating relevant dev docs on how it should be used. But no precommit bot will be enabled yet on this repo until after that PR is merged.

1reaction
pllimcommented, Jun 30, 2022

At the 2022-06-30 infrastructure tag-up, here is the path forward agreed upon between @WilliamJamieson , @saimn , and myself:

  1. @WilliamJamieson will open PR (https://github.com/astropy/asdf-astropy/pull/96) to pre-populate precommit config file at asdf-astropy repository with the following settings:
  • Disable auto PR feature
  • Only let bot auto PR on comment (i.e., a PR has to opt in for it)
  • The check will still fail in CI until stuff is fixed, whether automatically or manually
  1. @WilliamJamieson works with @eteq to enable the precommit app in astropy org but for asdf-astropy only.
  2. Core maintainers can test out this bot over at asdf-astropy and tweak the config to satisfaction.
  3. Once we finalize the config settings, repeat Steps 1 and 2 for astropy repository.
  4. In Step 4, documentation also has to accompany the deployment:
  • Developer doc
  • PR template

Feel free to correct me if I got anything wrong.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pre-commit
We built pre-commit to solve our hook issues. It is a multi-language package manager for pre-commit hooks. You specify a list of hooks...
Read more >
Continuous Integration • precommit - Lorenz Walthert's
Setting up CI. When initializing pre-commit in your repo with precommit::use_precommit() , you can specify the Continuous integration provider with ci ...
Read more >
Running pre-commit hooks as GitHub Actions
To run `pre-commit` as part of git workflow, use `pre-commit install `. All changes made by hooks: diff --git a /terraform/main .tf ...
Read more >
pre-commit.ci
pre-commit.ci both enforces that these issues are discovered (which is opt-in for each developer's workflow via pre-commit) but also fixes the issues ...
Read more >
How to use pre-commit to automatically correct commits and ...
Enabling pre-commit auto-fixes in GitLab · Create a project access token and create a CI/CD variable PRE_COMMIT_ACCESS_TOKEN with the token as a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found