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

Tidying #153

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Tidying #153

wants to merge 12 commits into from

Conversation

Stoops-ML
Copy link
Collaborator

@Stoops-ML Stoops-ML commented Sep 10, 2024

  • Tox runs ruff format -diff.
  • Remove suggestion to run tox -e reformat from readme.
  • GitHub action automatically applies linting (ruff, trailing-whitespace and end-of-file-fixer) to PRs. Note that a .pre-commit-config.yaml file was added to the repo for running pre-commit. Also, bots must be given read and write permissions to make commits:
    image
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.28%. Comparing base (56632e3) to head (bf9d1e0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #153   +/-   ##
=======================================
  Coverage   99.28%   99.28%           
=======================================
  Files          12       12           
  Lines         837      837           
=======================================
  Hits          831      831           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Stoops-ML
Copy link
Collaborator Author

Stoops-ML commented Sep 10, 2024

Lint GitHub Action fails because it doesn't have read and write permission to make commits:

Error: Error: To https://github.com/poliastro/czml3
!	refs/heads/tidying:refs/heads/tidying	[remote rejected] (refusing to allow a GitHub App to create or update workflow `.github/workflows/workflow.yml` without `workflows` permission)

See top comment to apply the required change to allow the action to make commits. After doing so re-run the action and all checks should pass.

@astrojuanlu
Copy link
Member

Reading from the UI, these are the default permissions. "You can specify more granular permissions in the workflow using YAML."

Can't we just change the YAML?

@astrojuanlu
Copy link
Member

Also while we're at it... is this essentially equivalent to https://pre-commit.ci/ ?

@Stoops-ML
Copy link
Collaborator Author

Reading from the UI, these are the default permissions. "You can specify more granular permissions in the workflow using YAML."

Can't we just change the YAML?

Sure, can you set a new secrets.WORKFLOW_TOKEN (see here).

Also while we're at it... is this essentially equivalent to https://pre-commit.ci/ ?

Yep. The only reason why I added pre-commit was to use the end-of-file-fixer and trailing-whitespace automations they have. If you want I can move ruff into the pre-commit config file too and have all linting done from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants