gee-community/geemap

Run one command to test all code

slowy07 opened this issue · 2 comments

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 #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

Good suggestion! PR is welcome

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"