Improve `format`, `lint`, and `test` commands to make pre-commit setup simple and more efficient

Aperta
#6,020 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, sql
Ambito
cli, tooling

Direzione di ricerca

Start by reading the sqlmesh format, sqlmesh lint, and sqlmesh test command entry points; the issue does not name specific files or tests. Check how each command handles file arguments and how the example pre-commit hooks invoke them. Done means all three commands accept filenames so pre-commit runs can be incremental.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Improvement

Parent issue for 5 improvements to empower pre-commits using sqlmesh

sqlmesh format already takes multiple file paths and can intake filenames.

Goal is to have a simple pre-commit be efficient:

repos:
  - repo: local
    hooks:
      - id: sqlmesh-format
        name: sqlmesh format
        entry: sqlmesh format
        language: system
        files: '^(models|audits)/.*\.sql$'
      - id: sqlmesh-lint
        name: sqlmesh lint
        entry: sqlmesh lint --local --use-project-index
        language: system
        files: '^models/.*\.(sql|py)$'
      - id: sqlmesh-test
        name: sqlmesh test
        entry: sqlmesh test --local --use-project-index
        language: system
        files: '^(models/.*\.(sql|py)|tests/.*\.(yaml|yml))$'

To have each command intake filenames for incremental and efficient pre-commits

Lingua principale
Python
Stelle
3.3k
Fork
471
Merge medio
6g 7h
PR unite (30g)
35

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SQLMesh/sqlmesh

Tutte le issue di SQLMesh/sqlmesh

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.