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

Run one command to test all code #1911

Closed
slowy07 opened this issue Feb 16, 2024 · 2 comments · Fixed by #1912
Closed

Run one command to test all code #1911

slowy07 opened this issue Feb 16, 2024 · 2 comments · Fixed by #1912
Labels
Feature Request New feature or request

Comments

@slowy07
Copy link
Collaborator

slowy07 commented Feb 16, 2024

Description

sorry sir @giswqs for brothering, i have some idea that using one command execution to test all code including lint check, formatting, including yml, python, and etc. just using pre-commit with many configuration, for some reason we can use codespell beside using from github action, for cause for if there's some commit or push have a problem, that changes cannot be pushed (after git commit) until the problem was fixed, mybe its good for development to prevent many bad codes on project, so mybe i can create this pull for that one sir, thanks !

Example

configuring a ruff and codespell
image

installation

local

  • after merge on PR chore: adding pre-commit configuration #1912
  • pull on local and install pre-commit by
    pre-commit install
    and pre-commit will be automatic configure on github hooks,
  • running pre-commit can by:
    • after git command add and commit will be trigger and running
    • or before git comand by
      pre-commit run --all-files
      this command will be run to check all files

remote repository

  • this pre-commit can use as unittesting on push or pull request by install the 3rd apps, see on github marketplace
  • after adding this apps into remote repository, the apps will be automatically detect on .pre-commit-config.yaml configuration, and running by the confi
@slowy07 slowy07 added the Feature Request New feature or request label Feb 16, 2024
@giswqs
Copy link
Member

giswqs commented Feb 16, 2024

Good suggestion! PR is welcome

@slowy07
Copy link
Collaborator Author

slowy07 commented Feb 16, 2024

on .github/workflows/ubuntu.yml on this line can be delete, cause can handle on pre-commit codespell

- name: Discover typos with codespell
              run: |
                  pip install codespell
                  codespell --skip="*.csv,*.geojson,*.json,*.yml*.js,*.html,*cff,*.pdf" --ignore-words-list="aci,acount,acounts,fallow,ges,hart,hist,nd,ned,ois,wqs,watermask"

@giswqs giswqs linked a pull request Feb 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants